diff --git a/.cproject b/.cproject new file mode 100644 index 0000000..524bedb --- /dev/null +++ b/.cproject @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1a2c551 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +all: openlog_blackbox.zip + +openlog_blackbox.zip : Readme.md OpenLog_v3_Blackbox/OpenLog_v3_Blackbox.ino OpenLog_v3_Blackbox/OpenLog_v3_Blackbox.cpp.hex + zip $@ $^ -r libs/ + +clean: + rm openlog_blackbox.zip \ No newline at end of file diff --git a/Readme.md b/Readme.md index aa4b77b..3bfa32e 100644 --- a/Readme.md +++ b/Readme.md @@ -7,9 +7,9 @@ glitches during OpenLog startup that might mess with the settings. You will find a zip file containing the required libraries, the source-code and the compiled hex file on the "releases" page above. -You'll need to copy the required libraries to your Arduino IDE's library path in order to build this from source. Copy -the `libs/SdFatBeta20120108/SdFat` and `libs/SerialPortBeta20120106/SerialPort` folders to your libraries folder directly -(don't copy the outer folders "SdFatBeta20120108" or "SerialPortBeta20120106".) +You'll need to copy the required libraries to your Arduino [1.0.6] IDE's library path in order to build this from +source. Copy the inner `libs/SdFat-master/SdFat` and `libs/SerialPort-master/SerialPort` folders to your libraries folder +directly (don't copy the outer folders `SdFat-master/` or `SerialPort-master/`.) To flash the firmware to the OpenLog, you can use an FTDI programmer like the [FTDI Basic Breakout][] along with some way of switching the Tx and Rx pins over (since the OpenLog has them switched) like the [FTDI crossover][] . @@ -20,3 +20,4 @@ your programmer if you're using one. Then click Sketch -> Verify/Compile and Fil [OpenLog 3 Light]: https://github.com/sparkfun/OpenLog/tree/master/firmware/OpenLog_v3_Light [FTDI Basic Breakout]: https://www.sparkfun.com/products/9716 [FTDI crossover]: https://www.sparkfun.com/products/10660 +[1.0.6]: http://arduino.cc/en/Main/Software#toc2 diff --git a/libs/SdFat-master/.gitattributes b/libs/SdFat-master/.gitattributes new file mode 100755 index 0000000..412eeda --- /dev/null +++ b/libs/SdFat-master/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/libs/SdFat-master/.gitignore b/libs/SdFat-master/.gitignore new file mode 100755 index 0000000..b9d6bd9 --- /dev/null +++ b/libs/SdFat-master/.gitignore @@ -0,0 +1,215 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg diff --git a/libs/SdFat-master/AnalogBinLoggerExtras/ADC_ENOB.PNG b/libs/SdFat-master/AnalogBinLoggerExtras/ADC_ENOB.PNG new file mode 100755 index 0000000..8f23768 Binary files /dev/null and b/libs/SdFat-master/AnalogBinLoggerExtras/ADC_ENOB.PNG differ diff --git a/libs/SdFat-master/AnalogBinLoggerExtras/ADCdocs/ATmegaADCAccuracy.pdf b/libs/SdFat-master/AnalogBinLoggerExtras/ADCdocs/ATmegaADCAccuracy.pdf new file mode 100755 index 0000000..46ede85 Binary files /dev/null and b/libs/SdFat-master/AnalogBinLoggerExtras/ADCdocs/ATmegaADCAccuracy.pdf differ diff --git a/libs/SdFat-master/AnalogBinLoggerExtras/ADCdocs/ExcelFFT.pdf b/libs/SdFat-master/AnalogBinLoggerExtras/ADCdocs/ExcelFFT.pdf new file mode 100755 index 0000000..5e7c94b Binary files /dev/null and b/libs/SdFat-master/AnalogBinLoggerExtras/ADCdocs/ExcelFFT.pdf differ diff --git a/libs/SdFat-master/AnalogBinLoggerExtras/AdcErrorStudy.txt b/libs/SdFat-master/AnalogBinLoggerExtras/AdcErrorStudy.txt new file mode 100755 index 0000000..d24d1f6 --- /dev/null +++ b/libs/SdFat-master/AnalogBinLoggerExtras/AdcErrorStudy.txt @@ -0,0 +1,98 @@ +Static Tests of the Arduino Internal ADC. + +Several people have asked about the DC accuracy of the Arduino ADC when used in my data logging applications at slow sample rates. + +Here are my results of some "hobby level" measurements of the Arduino ADC. + +One question is how important is the ADC clock rate. I did measurents for an ADC clock rate of 125 kHz to 2MHz. + +Another question is how much does Noise Reduction Mode help. I did a series of measurements using this mode. + +Noise Reduction Mode only reduced the mean absolute error slightly. + +I do calibration to remove Offset Error and Gain Error. Calibration is very important for good accuracy. + +These tests depend on the Arduino voltage regulator providing a stable voltage during the tests. The Arduino ADC reference voltage is Vcc for these tests. This may not be realistic for practical applications + +Integral Non-linearity (INL) is the main remaining source of error. + +Here are my results for static (DC) tests of the internal ADC for three UNOs. + +The Arduinos are powered by a high quality nine volt power supply. + +These tests measure a DC level so do not include problems due to time jitter, S/H time, and other dynamic errors. +There are several studies of the dynamic behavior of the Arduino ADC that determine ENOB (Effective Number Of Bits). + +I used a shield with a 12-bit MCP4921 DAC to generate voltage levels. This ADC has an output buffer so it provides a very low impedance source. + +I measured the voltage of the DAC with a calibrated 18-bit MCP3422 ADC on the shield. + +I used DAC levels from 20 to 4075 to avoid zero offset errors at low voltages and DAC buffer problems at high voltages. + +Each series of measurements has 4056 data points. + +This is a voltage range of about 0.023 to 4.972 volts. + +I calibrated the Arduino ADC for each series of measurements with a linear fit of the form. + +v = a + b*adcValue + +Errors are the difference between the value measured with the 18-bit ADC and the calibrated value measured with the AVR ADC. + +I also show the results for no calibration, the NoCal column, using the datasheet formula. + +Vin = Vref*adcValue/1024 + + +The rows in the tables tables are. + +Min - minimum error in millivolts + +Max - maximum error in millivolts + +MAE - mean absolute error in millivolts + + +The columns in the tables are: + +Ideal - results for a perfect 10-bit ADC for comparison. + +NoCal - datasheet formula (5/1024)*adcValue with Noise Reduction Mode. + +NR128 - Noise Reduction mode with Prescaler of 128 (ADC clock of 125 kHz). + +PS128 - analogRead with Prescaler of 128 (ADC clock of 125 kHz). + +PS64 - analogRead with Prescaler of 64 (ADC clock of 250 kHz). + +PS32 - analogRead with Prescaler of 32 (ADC clock of 500 kHz). + +PS16 - analogRead with Prescaler of 16 (ADC clock of 1 MHz). + +PS8 - analogRead with Prescaler of 8 (ADC clock of 2 MHz). + + +Results for three UNO Arduinos + + First Arduino - Error Millivolts + + Ideal NoCal NR128 PS128 PS64 PS32 PS16 PS8 +Min -2.44 -2.43 -3.72 -4.01 -3.88 -4.53 -6.57 -27.18 +Max 2.44 11.69 3.74 4.24 4.15 5.17 8.69 23.21 +MAE 1.22 5.02 1.33 1.38 1.37 1.44 1.96 4.11 + + Second Arduino - Error Millivolts + + Ideal NoCal NR128 PS128 PS64 PS32 PS16 PS8 +Min -2.44 -9.24 -4.87 -4.86 -5.05 -5.34 -6.52 -24.04 +Max 2.44 11.62 3.95 4.64 4.69 5.71 8.41 21.29 +MAE 1.22 5.33 1.41 1.43 1.44 1.53 2.02 4.05 + + Third Arduino - Error Millivolts + + Ideal NoCal NR128 PS128 PS64 PS32 PS16 PS8 +Min -2.44 -7.88 -4.12 -4.40 -4.32 -4.41 -6.97 -26.93 +Max 2.44 12.53 3.80 4.04 4.18 5.27 8.84 24.59 +MAE 1.22 4.85 1.29 1.33 1.34 1.42 1.91 4.10 + + diff --git a/libs/SdFat-master/AnalogBinLoggerExtras/DATA.png b/libs/SdFat-master/AnalogBinLoggerExtras/DATA.png new file mode 100755 index 0000000..a9b31aa Binary files /dev/null and b/libs/SdFat-master/AnalogBinLoggerExtras/DATA.png differ diff --git a/libs/SdFat-master/AnalogBinLoggerExtras/FFT.png b/libs/SdFat-master/AnalogBinLoggerExtras/FFT.png new file mode 100755 index 0000000..dc481a6 Binary files /dev/null and b/libs/SdFat-master/AnalogBinLoggerExtras/FFT.png differ diff --git a/libs/SdFat-master/AnalogBinLoggerExtras/RateTable.txt b/libs/SdFat-master/AnalogBinLoggerExtras/RateTable.txt new file mode 100755 index 0000000..554ba11 --- /dev/null +++ b/libs/SdFat-master/AnalogBinLoggerExtras/RateTable.txt @@ -0,0 +1,21 @@ +Maximum Sample Rate Table + + ADC clock kHz + 125 250 500 1000 +pins +1 7692 14286 25000 40000 +2 3810 6667 11111 16667 +3 2572 4790 8421 13559 +4 1942 3636 6452 10526 +5 1559 2930 5229 8602 +6 1303 2454 4396 7273 +7 1119 2111 3791 6299 +8 980 1852 3333 5556 +9 872 1649 2974 4969 +10 786 1487 2685 4494 +11 715 1354 2446 4103 +12 656 1242 2247 3774 +13 606 1148 2078 3493 +14 563 1067 1932 3252 +15 525 996 1806 3042 +16 493 935 1695 2857 diff --git a/libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/AnalogBinLogger.h b/libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/AnalogBinLogger.h new file mode 100755 index 0000000..da4d448 --- /dev/null +++ b/libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/AnalogBinLogger.h @@ -0,0 +1,39 @@ +#ifndef AnalogBinLogger_h +#define AnalogBinLogger_h +//------------------------------------------------------------------------------ +// First block of file. +struct metadata_t { + unsigned long adcFrequency; // ADC clock frequency + unsigned long cpuFrequency; // CPU clock frequency + unsigned long sampleInterval; // Sample interval in CPU cycles. + unsigned long recordEightBits; // Size of ADC values, nonzero for 8-bits. + unsigned long pinCount; // Number of analog pins in a sample. + unsigned long pinNumber[123]; // List of pin numbers in a sample. +}; +//------------------------------------------------------------------------------ +// Data block for 8-bit ADC mode. +const size_t DATA_DIM8 = 508; +struct block8_t { + unsigned short count; // count of data bytes + unsigned short overrun; // count of overruns since last block + unsigned char data[DATA_DIM8]; +}; +//------------------------------------------------------------------------------ +// Data block for 10-bit ADC mode. +const size_t DATA_DIM16 = 254; +struct block16_t { + unsigned short count; // count of data bytes + unsigned short overrun; // count of overruns since last block + unsigned short data[DATA_DIM16]; +}; +//------------------------------------------------------------------------------ +// Data block for PC use +struct adcdata_t { + unsigned short count; // count of data bytes + unsigned short overrun; // count of overruns since last block + union { + unsigned char u8[DATA_DIM8]; + unsigned short u16[DATA_DIM16]; + } data; +}; +#endif // AnalogBinLogger_h \ No newline at end of file diff --git a/libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/bintocsv.cpp b/libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/bintocsv.cpp new file mode 100755 index 0000000..922644b --- /dev/null +++ b/libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/bintocsv.cpp @@ -0,0 +1,82 @@ +#include +#include "AnalogBinLogger.h" +FILE *source; +FILE *destination; +int count = 0; + +int main(int argc, char** argv) { + metadata_t meta; + adcdata_t adc; + // Make sure no padding/size problems. + if (sizeof(meta) != 512 || sizeof(adc) != 512) { + printf("block size error\n"); + return 0; + } + if (argc != 3) { + printf("missing arguments:\n"); + printf("%s binFile csvFile\n", argv[0]); + return 0; + } + source = fopen(argv[1], "rb"); + if (!source) { + printf("open failed for %s\n", argv[1]); + return 0; + } + if (fread(&meta, sizeof(meta), 1, source) != 1) { + printf("read meta data failed\n"); + return 0; + } + if ( meta.pinCount == 0 + || meta.pinCount > (sizeof(meta.pinNumber)/sizeof(meta.pinNumber[0])) + || meta.adcFrequency < 50000 || meta.adcFrequency > 4000000) { + printf("Invalid meta data\n"); + return 0; + } + destination = fopen(argv[2], "w"); + if (!destination) { + printf("open failed for %s\n", argv[2]); + return 0; + } + int pinCount = meta.pinCount; + printf("pinCount: %d\n", pinCount); + printf("Sample pins:"); + for (unsigned i = 0; i < meta.pinCount; i++) { + printf(" %d", meta.pinNumber[i]); + } + printf("\n"); + printf("ADC clock rate: %g kHz\n", 0.001*meta.adcFrequency); + float sampleInterval = (float)meta.sampleInterval/(float)meta.cpuFrequency; + printf("Sample rate: %g per sec\n", 1.0/sampleInterval); + printf("Sample interval: %.4f usec\n", 1.0e6*sampleInterval); + + fprintf(destination, "Interval,%.4f,usec\n", 1.0e6*sampleInterval); + // Write header with pin numbers + for (int i = 0; i < ((int)meta.pinCount - 1); i++) { + fprintf(destination, "pin%d,", meta.pinNumber[i]); + } + fprintf(destination, "pin%d\n", meta.pinNumber[meta.pinCount - 1]); + unsigned maxCount = meta.recordEightBits ? DATA_DIM8 : DATA_DIM16; + while (!feof(source)) { + if (fread(&adc, sizeof(adc), 1, source) != 1) break; + if (adc.count > maxCount) { + printf("****Invalid data block****\n"); + return 0; + } + if (adc.overrun) { + fprintf(destination, "Overruns,%d\n", adc.overrun); + } + for (int i = 0; i < adc.count; i++) { + unsigned value = meta.recordEightBits ? adc.data.u8[i] : adc.data.u16[i]; + if ((i + 1)%pinCount) { + fprintf(destination, "%d,", value); + } else { + fprintf(destination, "%d\n", value); + } + } + count += adc.count; + } + printf("%d ADC values read\n", count); + fclose(source); + fclose(destination); + return 0; +} \ No newline at end of file diff --git a/libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/bintocsv.exe b/libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/bintocsv.exe new file mode 100755 index 0000000..cccc192 Binary files /dev/null and b/libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/bintocsv.exe differ diff --git a/libs/SdFat-master/AnalogBinLoggerExtras/readme.txt b/libs/SdFat-master/AnalogBinLoggerExtras/readme.txt new file mode 100755 index 0000000..e7a6fe2 --- /dev/null +++ b/libs/SdFat-master/AnalogBinLoggerExtras/readme.txt @@ -0,0 +1,96 @@ +AnalogBinLogger.ino logs analog data to a binary SD file at high rates. + +Samples are logged at regular intervals by using timer1. Timer/Counter1 +Compare Match B is used to trigger the ADC for the first pin in a sample. +The ADC is triggered for remaining sample pins in the ADC conversion complete +interrupt routine. + +Data is captured in the ADC interrupt routine and saved in 512 byte buffers. + +Buffered data is written to the SD in a function called from loop(). The +entire data set is written to a large contiguous file as a single multi-block +write. This reduces write latency problems. + +Many inexpensive SD cards work well at lower rates. I used a $6.00 +SanDisk 4 GB class 4 card for testing. + +SanDisk class 4 cards work well at fairly high rates. I used the 4 GB SanDisk +card to log a single pin at 40,000 samples per second. + +You may need to increase the time between samples if your card has higher +latency. Using a Mega Arduino can help since it has more buffering. + +The bintocsv folder contains a PC program for converting binary files to +CSV files. I have included a executable for Windows. Linux and Mac users +can build from the included source files. bintocvs is a command line program. + +bintocsv binFile csvFile + +AnalogBinLogger requires a recent version of the SdFat library. The SdFat +folder contains a beta version I used for development. + +The latest stable version is here: +http://code.google.com/p/sdfatlib/downloads/list + +You also need to install the included BufferedWriter library. It provides +fast text formatting. + +Example data for a 2 kHz sine wave logged at 40,000 samples per second is +shown in DATA.PNG and FFT.PNG shows a FFT of the data. See ExcelFFT.pdf +in the ADCdocs folder for details on calculating a FFT. + +The accuracy of the ADC samples depends on the ADC clock rate. See the +ADC_ENOB.PNG file for a plot of accuracy vs ADC clock frequency. + +See files in the ADCdocs folder for more information on ADC accuracy. + +To modify this program you will need a good knowledge of the Arduino +ADC, timer1 and C++ programming. This is not for the newbie. + +I have an LED and resistor connected to pin 3 to signal fatal errors and +data overruns. Fatal errors are indicated by a blinking led. Overrun errors +are indicated by a solid lit led. The count of samples dropped is written +to the SD and data logging continues. + +You can disable the error led feature by setting the error pin number negative: + +To use AnalogBinLogger, install these items. + +Place the BufferWriter and SdFat folders in your sketchbook libraries folder. + +Place the AnalogIsrLogger folder in your sketchbook folder. + +You must edit the configuration constants at the beginning of the program +to set the sample pins, sample rate, and other configuration values. + +Initially the program is setup to log the first five analog pins at 5000 +samples per second. Change these values to suit your needs. + +See RateTable.txt for maximum allowed sample rates vs pin count and ADC clock +frequency. + +The program has four commands: + +c - convert file to CSV +d - dump data to Serial +e - overrun error details +r - record ADC data + +All commands can be terminated by entering a character from the serial monitor. + +The c command converts the current binary file to a text file. Entering a +character on the serial monitor terminates the command. + +The d command converts the binary file to text and displays it on the serial +monitor. Entering a character on the serial monitor terminates the command. + +The e command displays details about overruns in the current binary file. +Data overruns happen when data samples are lost due to long write latency +of the SD. + +The r command will record ADC data to a binary file. It will terminate +when a character is entered on the serial monitor or the the maximum file +block count has been reached. + +A number of program options can be set by changing constants at the beginning +of the program. \ No newline at end of file diff --git a/libs/SdFat-master/ArduinoDue.txt b/libs/SdFat-master/ArduinoDue.txt new file mode 100755 index 0000000..b672f40 --- /dev/null +++ b/libs/SdFat-master/ArduinoDue.txt @@ -0,0 +1,62 @@ +Support has been added for the Arduino Due. + +You must connect your SD socket to the 6-pin "ISP connector". You must have short +wires or a custom shield to run at full speed, 42 MHz. + +If you have problems use a lower SPI speed. You can also check for SPI +errors by editing SdFatCobfig.h to enable CRC checking. + +You should be be able to use any digital pin for SD chip select. The default +pin is SS which is pin 10 for Due. + +The default SPI rate is 42 MHz. You can set SD chip select and the SPI rate +by calling: + +bool SdFat::begin(uint8_t chipSelectPin, uint8_t spiRateID); + +The second argument, spiRateID, sets the SCK rate and can be these symbols: + +SPI_FULL_SPEED - 42 MHz + +SPI_DIV3_SPEED - 28 MHz + +SPI_HALF_SPEED - 21 MHz + +SPI_DIV6_SPEED - 14 MHz + +SPI_QUARTER_SPEED 10.5 MHz + +SPI_EIGHTH_SPEED 5.25 MHz + +Large reads and writes use fast multi-block SD read/write commands. For optimal +speed, use records that are a multiple of 512 bytes. + +Run the bench.ino example to explore large read/write speed. + +Replace this line: + +#define BUF_SIZE 100 + +With a large size like this: + +#define BUF_SIZE 8192 + +For best results the record size should be a power of two (512, 1024, 2048, +4096, 8192). In this case records will be aligned with FAT cluster boundaries. + +Since Due is fast, increase the test file size by editing this line: + +#define FILE_SIZE_MB 5 + +Run the PrintBenchmark.ino example to compare text formatting speed of Due +with AVR boards. + +A number of options are available to configure SPI for the Due board. + +You can use the standard SPI.h library by editing SdFatConfig.h and set +USE_ARDUINO_SPI_LIBRARY nonzero. You must include SPI.h in your sketch. + +Several options can be set in Sd2Card.cpp in the USE_NATIVE_SAM3X_SPI +section. These include USE_SAM3X_DMAC to control use of DMA and +USE_SAM3X_BUS_MATRIX_FIX to change Bus Matrix operation. Most people +will not need to change these. \ No newline at end of file diff --git a/libs/SdFatBeta20120108/MultipleCards.txt b/libs/SdFat-master/MultipleCards.txt similarity index 100% rename from libs/SdFatBeta20120108/MultipleCards.txt rename to libs/SdFat-master/MultipleCards.txt diff --git a/libs/SdFatBeta20120108/QuickStart.txt b/libs/SdFat-master/QuickStart.txt similarity index 85% rename from libs/SdFatBeta20120108/QuickStart.txt rename to libs/SdFat-master/QuickStart.txt index a9d35b0..5a82970 100755 --- a/libs/SdFatBeta20120108/QuickStart.txt +++ b/libs/SdFat-master/QuickStart.txt @@ -5,7 +5,7 @@ subfolder in your main sketches folder. You may need to create the libraries folder. Restart the Arduino IDE if it was open. -Run the QuickStart.pde sketch from the +Run the QuickStart.ino sketch from the libraries/SdFat/examples/QuickStart folder. Click the IDE up-arrow icon then -> libraries -> SdFat -> QuickStart. @@ -18,4 +18,4 @@ http://forums.adafruit.com/ http://arduino.cc/forum/ -If QuickStart.pde runs successfully try more examples. +If QuickStart.ino runs successfully try more examples. diff --git a/libs/SdFat-master/SPI_Transactions.txt b/libs/SdFat-master/SPI_Transactions.txt new file mode 100755 index 0000000..f9bef02 --- /dev/null +++ b/libs/SdFat-master/SPI_Transactions.txt @@ -0,0 +1,23 @@ +To enable support for SPI transactions, edit SfFatCinfig.h and modify these +defines. + +//------------------------------------------------------------------------------ +/** + * Set ENABLE_SPI_TRANSACTION nonzero to enable the SPI transaction feature + * of the standard Arduino SPI library. You must include SPI.h in your + * sketches when ENABLE_SPI_TRANSACTION is nonzero. + */ +#define ENABLE_SPI_TRANSACTION 0 +//------------------------------------------------------------------------------ +/** + * Set ENABLE_SPI_YIELD nonzero to enable release of the SPI bus during + * SD card busy waits. + * + * This will allow interrupt routines to access the SPI bus if + * ENABLE_SPI_TRANSACTION is nonzero. + * + * Setting ENABLE_SPI_YIELD will introduce some extra overhead and will + * slightly slow transfer rates. A few older SD cards may fail when + * ENABLE_SPI_YIELD is nonzero. + */ +#define ENABLE_SPI_YIELD 0 \ No newline at end of file diff --git a/libs/SdFatBeta20120108/SdFat.html b/libs/SdFat-master/SdFat.html similarity index 100% rename from libs/SdFatBeta20120108/SdFat.html rename to libs/SdFat-master/SdFat.html diff --git a/libs/SdFatBeta20120108/SdFat/ArduinoStream.h b/libs/SdFat-master/SdFat/ArduinoStream.h similarity index 80% rename from libs/SdFatBeta20120108/SdFat/ArduinoStream.h rename to libs/SdFat-master/SdFat/ArduinoStream.h index d1c98b8..c6d53b9 100755 --- a/libs/SdFatBeta20120108/SdFat/ArduinoStream.h +++ b/libs/SdFat-master/SdFat/ArduinoStream.h @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -37,33 +37,34 @@ class ArduinoInStream : public ibufstream { * \param[in] buf buffer for input line * \param[in] size size of input buffer */ - ArduinoInStream(Stream &hws, char* buf, uint16_t size) { - hw_ = &hws; - line_ = buf; - size_ = size; + ArduinoInStream(Stream &hws, char* buf, size_t size) { + m_hw = &hws; + m_line = buf; + m_size = size; } /** read a line. */ void readline() { - uint16_t i = 0; + size_t i = 0; uint32_t t; - line_[0] = '\0'; - while (!hw_->available()); + m_line[0] = '\0'; + while (!m_hw->available()) {} while (1) { t = millis(); - while (!hw_->available()) { + while (!m_hw->available()) { if ((millis() - t) > 10) goto done; } - if (i >= (size_ - 1)) { + if (i >= (m_size - 1)) { setstate(failbit); return; } - line_[i++] = hw_->read(); - line_[i] = '\0'; + m_line[i++] = m_hw->read(); + m_line[i] = '\0'; } done: - init(line_); + init(m_line); } + protected: /** Internal - do not use. * \param[in] off @@ -76,10 +77,11 @@ class ArduinoInStream : public ibufstream { * \return true/false. */ bool seekpos(pos_type pos) {return false;} + private: - char *line_; - uint16_t size_; - Stream* hw_; + char *m_line; + size_t m_size; + Stream* m_hw; }; //============================================================================== /** @@ -92,7 +94,8 @@ class ArduinoOutStream : public ostream { * * \param[in] pr Print object for this ArduinoOutStream. */ - explicit ArduinoOutStream(Print& pr) : pr_(&pr) {} + explicit ArduinoOutStream(Print& pr) : m_pr(&pr) {} + protected: /// @cond SHOW_PROTECTED /** @@ -100,10 +103,10 @@ class ArduinoOutStream : public ostream { * \param[in] c */ void putch(char c) { - if (c == '\n') pr_->write('\r'); - pr_->write(c); + if (c == '\n') m_pr->write('\r'); + m_pr->write(c); } - void putstr(const char* str) {pr_->write(str);} + void putstr(const char* str) {m_pr->write(str);} bool seekoff(off_type off, seekdir way) {return false;} bool seekpos(pos_type pos) {return false;} bool sync() {return true;} @@ -111,6 +114,6 @@ class ArduinoOutStream : public ostream { /// @endcond private: ArduinoOutStream() {} - Print* pr_; + Print* m_pr; }; #endif // ArduinoStream_h diff --git a/libs/SdFat-master/SdFat/MinimumSerial.cpp b/libs/SdFat-master/SdFat/MinimumSerial.cpp new file mode 100755 index 0000000..122a8a1 --- /dev/null +++ b/libs/SdFat-master/SdFat/MinimumSerial.cpp @@ -0,0 +1,71 @@ +/* Arduino SdFat Library + * Copyright (C) 2012 by William Greiman + * + * This file is part of the Arduino SdFat Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdFat Library. If not, see + * . + */ +#include +#if defined(UDR0) || defined(DOXYGEN) +#include +//------------------------------------------------------------------------------ +/** + * Set baud rate for serial port zero and enable in non interrupt mode. + * Do not call this function if you use another serial library. + * \param[in] baud rate + */ +void MinimumSerial::begin(uint32_t baud) { + uint16_t baud_setting; + // don't worry, the compiler will squeeze out F_CPU != 16000000UL + if (F_CPU != 16000000UL || baud != 57600) { + // Double the USART Transmission Speed + UCSR0A = 1 << U2X0; + baud_setting = (F_CPU / 4 / baud - 1) / 2; + } else { + // hardcoded exception for compatibility with the bootloader shipped + // with the Duemilanove and previous boards and the firmware on the 8U2 + // on the Uno and Mega 2560. + UCSR0A = 0; + baud_setting = (F_CPU / 8 / baud - 1) / 2; + } + // assign the baud_setting + UBRR0H = baud_setting >> 8; + UBRR0L = baud_setting; + // enable transmit and receive + UCSR0B |= (1 << TXEN0) | (1 << RXEN0); +} +//------------------------------------------------------------------------------ +/** + * Unbuffered read + * \return -1 if no character is available or an available character. + */ +int MinimumSerial::read() { + if (UCSR0A & (1 << RXC0)) return UDR0; + return -1; +} +//------------------------------------------------------------------------------ +/** + * Unbuffered write + * + * \param[in] b byte to write. + * \return 1 + */ +size_t MinimumSerial::write(uint8_t b) { + while (((1 << UDRIE0) & UCSR0B) || !(UCSR0A & (1 << UDRE0))) {} + UDR0 = b; + return 1; +} +MinimumSerial MiniSerial; +#endif // defined(UDR0) || defined(DOXYGEN) diff --git a/libs/SdFatBeta20120108/SdFat/SdFile.h b/libs/SdFat-master/SdFat/MinimumSerial.h similarity index 54% rename from libs/SdFatBeta20120108/SdFat/SdFile.h rename to libs/SdFat-master/SdFat/MinimumSerial.h index 47307e8..57003c8 100755 --- a/libs/SdFatBeta20120108/SdFat/SdFile.h +++ b/libs/SdFat-master/SdFat/MinimumSerial.h @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -17,31 +17,20 @@ * along with the Arduino SdFat Library. If not, see * . */ +#ifndef MinimumSerial_h +#define MinimumSerial_h /** - * \file - * \brief SdFile class + * \class MinimumSerial + * \brief mini serial class for the %SdFat library. */ -#include -#ifndef SdFile_h -#define SdFile_h -//------------------------------------------------------------------------------ -/** - * \class SdFile - * \brief SdBaseFile with Print. - */ -class SdFile : public SdBaseFile, public Print { +class MinimumSerial : public Print { public: - SdFile() {} - SdFile(const char* name, uint8_t oflag); -#if ARDUINO < 100 - void write(uint8_t b); - void write(const char* str); -#else // ARDUINO < 100 + void begin(uint32_t baud); + int read(); size_t write(uint8_t b); - int16_t write(const char* str); -#endif // ARDUINO < 100 - int16_t write(const void* buf, uint16_t nbyte); - void write_P(PGM_P str); - void writeln_P(PGM_P str); + using Print::write; }; -#endif // SdFile_h +#ifdef UDR0 +extern MinimumSerial MiniSerial; +#endif // UDR0 +#endif // MinimumSerial_h diff --git a/libs/SdFatBeta20120108/SdFat/Sd2Card.cpp b/libs/SdFat-master/SdFat/Sd2Card.cpp similarity index 60% rename from libs/SdFatBeta20120108/SdFat/Sd2Card.cpp rename to libs/SdFat-master/SdFat/Sd2Card.cpp index efe13d7..0768d45 100755 --- a/libs/SdFatBeta20120108/SdFat/Sd2Card.cpp +++ b/libs/SdFat-master/SdFat/Sd2Card.cpp @@ -1,5 +1,5 @@ /* Arduino Sd2Card Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino Sd2Card Library * @@ -17,168 +17,228 @@ * along with the Arduino Sd2Card Library. If not, see * . */ -#if ARDUINO < 100 -#include -#else // ARDUINO -#include -#endif // ARDUINO #include -#include -//------------------------------------------------------------------------------ -#ifndef SOFTWARE_SPI -// functions for hardware SPI -//------------------------------------------------------------------------------ -// make sure SPCR rate is in expected bits -#if (SPR0 != 0 || SPR1 != 1) -#error unexpected SPCR bits -#endif -/** - * Initialize hardware SPI - * Set SCK rate to F_CPU/pow(2, 1 + spiRate) for spiRate [0,6] - */ -static void spiInit(uint8_t spiRate) { - // See avr processor documentation - SPCR = (1 << SPE) | (1 << MSTR) | (spiRate >> 1); - SPSR = spiRate & 1 || spiRate == 6 ? 0 : 1 << SPI2X; -} -//------------------------------------------------------------------------------ -/** SPI receive a byte */ -static uint8_t spiRec() { - SPDR = 0XFF; - while (!(SPSR & (1 << SPIF))); - return SPDR; -} -//------------------------------------------------------------------------------ -/** SPI read data - only one call so force inline */ -static inline __attribute__((always_inline)) - void spiRead(uint8_t* buf, uint16_t nbyte) { - if (nbyte-- == 0) return; - SPDR = 0XFF; - for (uint16_t i = 0; i < nbyte; i++) { - while (!(SPSR & (1 << SPIF))); - buf[i] = SPDR; - SPDR = 0XFF; +#include +#if !USE_SOFTWARE_SPI && ENABLE_SPI_TRANSACTION +#include +#endif // !USE_SOFTWARE_SPI && defined(SPI_HAS_TRANSACTION) +// debug trace macro +#define SD_TRACE(m, b) +// #define SD_TRACE(m, b) Serial.print(m);Serial.println(b); +//------------------------------------------------------------------------------ +SdSpi Sd2Card::m_spi; +//============================================================================== +#if USE_SD_CRC +// CRC functions +//------------------------------------------------------------------------------ +static uint8_t CRC7(const uint8_t* data, uint8_t n) { + uint8_t crc = 0; + for (uint8_t i = 0; i < n; i++) { + uint8_t d = data[i]; + for (uint8_t j = 0; j < 8; j++) { + crc <<= 1; + if ((d & 0x80) ^ (crc & 0x80)) crc ^= 0x09; + d <<= 1; + } } - while (!(SPSR & (1 << SPIF))); - buf[nbyte] = SPDR; + return (crc << 1) | 1; } //------------------------------------------------------------------------------ -/** SPI send a byte */ -static void spiSend(uint8_t b) { - SPDR = b; - while (!(SPSR & (1 << SPIF))); +#if USE_SD_CRC == 1 +// slower CRC-CCITT +// uses the x^16,x^12,x^5,x^1 polynomial. +static uint16_t CRC_CCITT(const uint8_t *data, size_t n) { + uint16_t crc = 0; + for (size_t i = 0; i < n; i++) { + crc = (uint8_t)(crc >> 8) | (crc << 8); + crc ^= data[i]; + crc ^= (uint8_t)(crc & 0xff) >> 4; + crc ^= crc << 12; + crc ^= (crc & 0xff) << 5; + } + return crc; } -//------------------------------------------------------------------------------ -/** SPI send block - only one call so force inline */ -static inline __attribute__((always_inline)) - void spiSendBlock(uint8_t token, const uint8_t* buf) { - SPDR = token; - for (uint16_t i = 0; i < 512; i += 2) { - while (!(SPSR & (1 << SPIF))); - SPDR = buf[i]; - while (!(SPSR & (1 << SPIF))); - SPDR = buf[i + 1]; +#elif USE_SD_CRC > 1 // CRC_CCITT +//------------------------------------------------------------------------------ +// faster CRC-CCITT +// uses the x^16,x^12,x^5,x^1 polynomial. +#ifdef __AVR__ +static const uint16_t crctab[] PROGMEM = { +#else // __AVR__ +static const uint16_t crctab[] = { +#endif // __AVR__ + 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, + 0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, + 0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, + 0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE, + 0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485, + 0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D, + 0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4, + 0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC, + 0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823, + 0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B, + 0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12, + 0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A, + 0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41, + 0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49, + 0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70, + 0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78, + 0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F, + 0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067, + 0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E, + 0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256, + 0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D, + 0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, + 0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C, + 0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634, + 0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB, + 0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3, + 0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A, + 0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92, + 0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9, + 0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1, + 0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8, + 0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0 +}; +static uint16_t CRC_CCITT(const uint8_t* data, size_t n) { + uint16_t crc = 0; + for (size_t i = 0; i < n; i++) { +#ifdef __AVR__ + crc = pgm_read_word(&crctab[(crc >> 8 ^ data[i]) & 0XFF]) ^ (crc << 8); +#else // __AVR__ + crc = crctab[(crc >> 8 ^ data[i]) & 0XFF] ^ (crc << 8); +#endif // __AVR__ } - while (!(SPSR & (1 << SPIF))); + return crc; } +#endif // CRC_CCITT +#endif // USE_SD_CRC +//============================================================================== +// Sd2Card member functions //------------------------------------------------------------------------------ -#else // SOFTWARE_SPI -//------------------------------------------------------------------------------ -/** nop to tune soft SPI timing */ -#define nop asm volatile ("nop\n\t") -//------------------------------------------------------------------------------ -/** Soft SPI receive byte */ -static uint8_t spiRec() { - uint8_t data = 0; - // no interrupts during byte receive - about 8 us - cli(); - // output pin high - like sending 0XFF - fastDigitalWrite(SPI_MOSI_PIN, HIGH); - - for (uint8_t i = 0; i < 8; i++) { - fastDigitalWrite(SPI_SCK_PIN, HIGH); +/** + * Initialize an SD flash memory card. + * + * \param[in] chipSelectPin SD chip select pin number. + * \param[in] sckDivisor SPI SCK clock rate divisor. + * + * \return The value one, true, is returned for success and + * the value zero, false, is returned for failure. The reason for failure + * can be determined by calling errorCode() and errorData(). + */ +bool Sd2Card::begin(uint8_t chipSelectPin, uint8_t sckDivisor) { + m_errorCode = m_type = 0; + m_chipSelectPin = chipSelectPin; + // 16-bit init start time allows over a minute + uint16_t t0 = (uint16_t)millis(); + uint32_t arg; - // adjust so SCK is nice - nop; - nop; + pinMode(m_chipSelectPin, OUTPUT); + digitalWrite(m_chipSelectPin, HIGH); + m_spi.begin(); - data <<= 1; + // set SCK rate for initialization commands + m_sckDivisor = SPI_SCK_INIT_DIVISOR; + m_spi.init(m_sckDivisor); - if (fastDigitalRead(SPI_MISO_PIN)) data |= 1; + // must supply min of 74 clock cycles with CS high. + for (uint8_t i = 0; i < 10; i++) m_spi.send(0XFF); - fastDigitalWrite(SPI_SCK_PIN, LOW); + // command to go idle in SPI mode + while (cardCommand(CMD0, 0) != R1_IDLE_STATE) { + if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) { + error(SD_CARD_ERROR_CMD0); + goto fail; + } } - // enable interrupts - sei(); - return data; -} -//------------------------------------------------------------------------------ -/** Soft SPI read data */ -static void spiRead(uint8_t* buf, uint16_t nbyte) { - for (uint16_t i = 0; i < nbyte; i++) { - buf[i] = spiRec(); +#if USE_SD_CRC + if (cardCommand(CMD59, 1) != R1_IDLE_STATE) { + error(SD_CARD_ERROR_CMD59); + goto fail; } -} -//------------------------------------------------------------------------------ -/** Soft SPI send byte */ -static void spiSend(uint8_t data) { - // no interrupts during byte send - about 8 us - cli(); - for (uint8_t i = 0; i < 8; i++) { - fastDigitalWrite(SPI_SCK_PIN, LOW); - - fastDigitalWrite(SPI_MOSI_PIN, data & 0X80); - - data <<= 1; +#endif // USE_SD_CRC + // check SD version + while (1) { + if (cardCommand(CMD8, 0x1AA) == (R1_ILLEGAL_COMMAND | R1_IDLE_STATE)) { + type(SD_CARD_TYPE_SD1); + break; + } + for (uint8_t i = 0; i < 4; i++) m_status = m_spi.receive(); + if (m_status == 0XAA) { + type(SD_CARD_TYPE_SD2); + break; + } + if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) { + error(SD_CARD_ERROR_CMD8); + goto fail; + } + } + // initialize card and send host supports SDHC if SD2 + arg = type() == SD_CARD_TYPE_SD2 ? 0X40000000 : 0; - fastDigitalWrite(SPI_SCK_PIN, HIGH); + while (cardAcmd(ACMD41, arg) != R1_READY_STATE) { + // check for timeout + if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) { + error(SD_CARD_ERROR_ACMD41); + goto fail; + } } - // hold SCK high for a few ns - nop; - nop; - nop; - nop; - - fastDigitalWrite(SPI_SCK_PIN, LOW); - // enable interrupts - sei(); -} -//------------------------------------------------------------------------------ -/** Soft SPI send block */ - void spiSendBlock(uint8_t token, const uint8_t* buf) { - spiSend(token); - for (uint16_t i = 0; i < 512; i++) { - spiSend(buf[i]); + // if SD2 read OCR register to check for SDHC card + if (type() == SD_CARD_TYPE_SD2) { + if (cardCommand(CMD58, 0)) { + error(SD_CARD_ERROR_CMD58); + goto fail; + } + if ((m_spi.receive() & 0XC0) == 0XC0) type(SD_CARD_TYPE_SDHC); + // Discard rest of ocr - contains allowed voltage range. + for (uint8_t i = 0; i < 3; i++) m_spi.receive(); } + chipSelectHigh(); + m_sckDivisor = sckDivisor; + return true; + + fail: + chipSelectHigh(); + return false; } -#endif // SOFTWARE_SPI //------------------------------------------------------------------------------ // send command and return error code. Return zero for OK uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) { // select card chipSelectLow(); - // wait up to 300 ms if busy - waitNotBusy(300); + // wait if busy + waitNotBusy(SD_WRITE_TIMEOUT); + + uint8_t *pa = reinterpret_cast(&arg); + +#if USE_SD_CRC + // form message + uint8_t d[6] = {cmd | 0X40, pa[3], pa[2], pa[1], pa[0]}; + // add crc + d[5] = CRC7(d, 5); + + // send message + for (uint8_t k = 0; k < 6; k++) m_spi.send(d[k]); +#else // USE_SD_CRC // send command - spiSend(cmd | 0x40); + m_spi.send(cmd | 0x40); // send argument - for (int8_t s = 24; s >= 0; s -= 8) spiSend(arg >> s); + for (int8_t i = 3; i >= 0; i--) m_spi.send(pa[i]); - // send CRC - uint8_t crc = 0XFF; - if (cmd == CMD0) crc = 0X95; // correct crc for CMD0 with arg 0 - if (cmd == CMD8) crc = 0X87; // correct crc for CMD8 with arg 0X1AA - spiSend(crc); + // send CRC - correct for CMD0 with arg zero or CMD8 with arg 0X1AA + m_spi.send(cmd == CMD0 ? 0X95 : 0X87); +#endif // USE_SD_CRC // skip stuff byte for stop read - if (cmd == CMD12) spiRec(); + if (cmd == CMD12) m_spi.receive(); // wait for response - for (uint8_t i = 0; ((status_ = spiRec()) & 0X80) && i != 0XFF; i++); - return status_; + for (uint8_t i = 0; ((m_status = m_spi.receive()) & 0X80) && i != 0XFF; i++) { + } + return m_status; } //------------------------------------------------------------------------------ /** @@ -198,8 +258,8 @@ uint32_t Sd2Card::cardSize() { | csd.v1.c_size_mult_low; return (uint32_t)(c_size + 1) << (c_size_mult + read_bl_len - 7); } else if (csd.v2.csd_ver == 1) { - uint32_t c_size = ((uint32_t)csd.v2.c_size_high << 16) - | (csd.v2.c_size_mid << 8) | csd.v2.c_size_low; + uint32_t c_size = 0X10000L * csd.v2.c_size_high + 0X100L + * (uint32_t)csd.v2.c_size_mid + csd.v2.c_size_low; return (c_size + 1) << 10; } else { error(SD_CARD_ERROR_BAD_CSD); @@ -207,17 +267,28 @@ uint32_t Sd2Card::cardSize() { } } //------------------------------------------------------------------------------ +void Sd2Card::spiYield() { +#if ENABLE_SPI_YIELD && !USE_SOFTWARE_SPI && defined(SPI_HAS_TRANSACTION) + chipSelectHigh(); + chipSelectLow(); +#endif // ENABLE_SPI_YIELD && !USE_SOFTWARE_SPI && defined(SPI_HAS_TRANSACTION) +} +//------------------------------------------------------------------------------ void Sd2Card::chipSelectHigh() { - digitalWrite(chipSelectPin_, HIGH); + digitalWrite(m_chipSelectPin, HIGH); // insure MISO goes high impedance - spiSend(0XFF); + m_spi.send(0XFF); +#if !USE_SOFTWARE_SPI && defined(SPI_HAS_TRANSACTION) + SPI.endTransaction(); +#endif // !USE_SOFTWARE_SPI && defined(SPI_HAS_TRANSACTION) } //------------------------------------------------------------------------------ void Sd2Card::chipSelectLow() { -#ifndef SOFTWARE_SPI - spiInit(spiRate_); -#endif // SOFTWARE_SPI - digitalWrite(chipSelectPin_, LOW); +#if !USE_SOFTWARE_SPI && defined(SPI_HAS_TRANSACTION) + SPI.beginTransaction(SPISettings()); +#endif // !USE_SOFTWARE_SPI && defined(SPI_HAS_TRANSACTION) + m_spi.init(m_sckDivisor); + digitalWrite(m_chipSelectPin, LOW); } //------------------------------------------------------------------------------ /** Erase a range of blocks. @@ -246,7 +317,7 @@ bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) { goto fail; } } - if (type_ != SD_CARD_TYPE_SDHC) { + if (m_type != SD_CARD_TYPE_SDHC) { firstBlock <<= 9; lastBlock <<= 9; } @@ -279,94 +350,19 @@ bool Sd2Card::eraseSingleBlockEnable() { } //------------------------------------------------------------------------------ /** - * Initialize an SD flash memory card. - * - * \param[in] sckRateID SPI clock rate selector. See setSckRate(). - * \param[in] chipSelectPin SD chip select pin number. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. The reason for failure - * can be determined by calling errorCode() and errorData(). + * Check for busy. MISO low indicates the card is busy. + * + * \return true if busy else false. */ -bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) { - errorCode_ = type_ = 0; - chipSelectPin_ = chipSelectPin; - // 16-bit init start time allows over a minute - uint16_t t0 = (uint16_t)millis(); - uint32_t arg; - - // set pin modes - pinMode(chipSelectPin_, OUTPUT); - digitalWrite(chipSelectPin_, HIGH); - pinMode(SPI_MISO_PIN, INPUT); - pinMode(SPI_MOSI_PIN, OUTPUT); - pinMode(SPI_SCK_PIN, OUTPUT); - -#ifndef SOFTWARE_SPI - // SS must be in output mode even it is not chip select - pinMode(SS_PIN, OUTPUT); - // set SS high - may be chip select for another SPI device -#if SET_SPI_SS_HIGH - digitalWrite(SS_PIN, HIGH); -#endif // SET_SPI_SS_HIGH - // set SCK rate for initialization commands - spiRate_ = SPI_SD_INIT_RATE; - spiInit(spiRate_); -#endif // SOFTWARE_SPI - - // must supply min of 74 clock cycles with CS high. - for (uint8_t i = 0; i < 10; i++) spiSend(0XFF); - - // command to go idle in SPI mode - while ((status_ = cardCommand(CMD0, 0)) != R1_IDLE_STATE) { - if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) { - error(SD_CARD_ERROR_CMD0); - goto fail; - } - } - // check SD version - if ((cardCommand(CMD8, 0x1AA) & R1_ILLEGAL_COMMAND)) { - type(SD_CARD_TYPE_SD1); - } else { - // only need last byte of r7 response - for (uint8_t i = 0; i < 4; i++) status_ = spiRec(); - if (status_ != 0XAA) { - error(SD_CARD_ERROR_CMD8); - goto fail; - } - type(SD_CARD_TYPE_SD2); - } - // initialize card and send host supports SDHC if SD2 - arg = type() == SD_CARD_TYPE_SD2 ? 0X40000000 : 0; - - while ((status_ = cardAcmd(ACMD41, arg)) != R1_READY_STATE) { - // check for timeout - if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) { - error(SD_CARD_ERROR_ACMD41); - goto fail; - } - } - // if SD2 read OCR register to check for SDHC card - if (type() == SD_CARD_TYPE_SD2) { - if (cardCommand(CMD58, 0)) { - error(SD_CARD_ERROR_CMD58); - goto fail; - } - if ((spiRec() & 0XC0) == 0XC0) type(SD_CARD_TYPE_SDHC); - // discard rest of ocr - contains allowed voltage range - for (uint8_t i = 0; i < 3; i++) spiRec(); +bool Sd2Card::isBusy() { + bool rtn; + chipSelectLow(); + for (uint8_t i = 0; i < 8; i++) { + rtn = m_spi.receive() != 0XFF; + if (!rtn) break; } chipSelectHigh(); - -#ifndef SOFTWARE_SPI - return setSckRate(sckRateID); -#else // SOFTWARE_SPI - return true; -#endif // SOFTWARE_SPI - - fail: - chipSelectHigh(); - return false; + return rtn; } //------------------------------------------------------------------------------ /** @@ -379,6 +375,7 @@ bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) { * the value zero, false, is returned for failure. */ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) { + SD_TRACE("RB", blockNumber); // use address if not SDHC card if (type()!= SD_CARD_TYPE_SDHC) blockNumber <<= 9; if (cardCommand(CMD17, blockNumber)) { @@ -404,25 +401,62 @@ bool Sd2Card::readData(uint8_t *dst) { return readData(dst, 512); } //------------------------------------------------------------------------------ -bool Sd2Card::readData(uint8_t* dst, uint16_t count) { +bool Sd2Card::readData(uint8_t* dst, size_t count) { +#if USE_SD_CRC + uint16_t crc; +#endif // USE_SD_CRC // wait for start block token uint16_t t0 = millis(); - while ((status_ = spiRec()) == 0XFF) { + while ((m_status = m_spi.receive()) == 0XFF) { if (((uint16_t)millis() - t0) > SD_READ_TIMEOUT) { error(SD_CARD_ERROR_READ_TIMEOUT); goto fail; } + spiYield(); } - if (status_ != DATA_START_BLOCK) { + if (m_status != DATA_START_BLOCK) { error(SD_CARD_ERROR_READ); goto fail; } // transfer data - spiRead(dst, count); + if ((m_status = m_spi.receive(dst, count))) { + error(SD_CARD_ERROR_SPI_DMA); + goto fail; + } + +#if USE_SD_CRC + // get crc + crc = (m_spi.receive() << 8) | m_spi.receive(); + if (crc != CRC_CCITT(dst, count)) { + error(SD_CARD_ERROR_READ_CRC); + goto fail; + } +#else + // discard crc + m_spi.receive(); + m_spi.receive(); +#endif // USE_SD_CRC + chipSelectHigh(); + return true; + + fail: + chipSelectHigh(); + return false; +} +//------------------------------------------------------------------------------ +/** Read OCR register. + * + * \param[out] ocr Value of OCR register. + * \return true for success else false. + */ +bool Sd2Card::readOCR(uint32_t* ocr) { + uint8_t *p = reinterpret_cast(ocr); + if (cardCommand(CMD58, 0)) { + error(SD_CARD_ERROR_CMD58); + goto fail; + } + for (uint8_t i = 0; i < 4; i++) p[3-i] = m_spi.receive(); - // discard CRC - spiRec(); - spiRec(); chipSelectHigh(); return true; @@ -456,6 +490,7 @@ bool Sd2Card::readRegister(uint8_t cmd, void* buf) { * the value zero, false, is returned for failure. */ bool Sd2Card::readStart(uint32_t blockNumber) { + SD_TRACE("RS", blockNumber); if (type()!= SD_CARD_TYPE_SDHC) blockNumber <<= 9; if (cardCommand(CMD18, blockNumber)) { error(SD_CARD_ERROR_CMD18); @@ -475,7 +510,6 @@ bool Sd2Card::readStart(uint32_t blockNumber) { * the value zero, false, is returned for failure. */ bool Sd2Card::readStop() { - chipSelectLow(); if (cardCommand(CMD12, 0)) { error(SD_CARD_ERROR_CMD12); goto fail; @@ -488,32 +522,12 @@ bool Sd2Card::readStop() { return false; } //------------------------------------------------------------------------------ -/** - * Set the SPI clock rate. - * - * \param[in] sckRateID A value in the range [0, 6]. - * - * The SPI clock will be set to F_CPU/pow(2, 1 + sckRateID). The maximum - * SPI rate is F_CPU/2 for \a sckRateID = 0 and the minimum rate is F_CPU/128 - * for \a scsRateID = 6. - * - * \return The value one, true, is returned for success and the value zero, - * false, is returned for an invalid value of \a sckRateID. - */ -bool Sd2Card::setSckRate(uint8_t sckRateID) { - if (sckRateID > 6) { - error(SD_CARD_ERROR_SCK_RATE); - return false; - } - spiRate_ = sckRateID; - return true; -} -//------------------------------------------------------------------------------ // wait for card to go not busy bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) { uint16_t t0 = millis(); - while (spiRec() != 0XFF) { + while (m_spi.receive() != 0XFF) { if (((uint16_t)millis() - t0) >= timeoutMillis) goto fail; + spiYield(); } return true; @@ -530,6 +544,7 @@ bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) { * the value zero, false, is returned for failure. */ bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) { + SD_TRACE("WB", blockNumber); // use address if not SDHC card if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; if (cardCommand(CMD24, blockNumber)) { @@ -538,16 +553,20 @@ bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) { } if (!writeData(DATA_START_BLOCK, src)) goto fail; +#define CHECK_PROGRAMMING 0 +#if CHECK_PROGRAMMING // wait for flash programming to complete if (!waitNotBusy(SD_WRITE_TIMEOUT)) { error(SD_CARD_ERROR_WRITE_TIMEOUT); goto fail; } // response is r2 so get and check two bytes for nonzero - if (cardCommand(CMD13, 0) || spiRec()) { + if (cardCommand(CMD13, 0) || m_spi.receive()) { error(SD_CARD_ERROR_WRITE_PROGRAMMING); goto fail; } +#endif // CHECK_PROGRAMMING + chipSelectHigh(); return true; @@ -577,13 +596,18 @@ bool Sd2Card::writeData(const uint8_t* src) { //------------------------------------------------------------------------------ // send one block of data for write block or write multiple blocks bool Sd2Card::writeData(uint8_t token, const uint8_t* src) { - spiSendBlock(token, src); - - spiSend(0xff); // dummy crc - spiSend(0xff); // dummy crc - - status_ = spiRec(); - if ((status_ & DATA_RES_MASK) != DATA_RES_ACCEPTED) { +#if USE_SD_CRC + uint16_t crc = CRC_CCITT(src, 512); +#else // USE_SD_CRC + uint16_t crc = 0XFFFF; +#endif // USE_SD_CRC + m_spi.send(token); + m_spi.send(src, 512); + m_spi.send(crc >> 8); + m_spi.send(crc & 0XFF); + + m_status = m_spi.receive(); + if ((m_status & DATA_RES_MASK) != DATA_RES_ACCEPTED) { error(SD_CARD_ERROR_WRITE); goto fail; } @@ -606,6 +630,7 @@ bool Sd2Card::writeData(uint8_t token, const uint8_t* src) { * the value zero, false, is returned for failure. */ bool Sd2Card::writeStart(uint32_t blockNumber, uint32_t eraseCount) { + SD_TRACE("WS", blockNumber); // send pre-erase count if (cardAcmd(ACMD23, eraseCount)) { error(SD_CARD_ERROR_ACMD23); @@ -633,7 +658,7 @@ bool Sd2Card::writeStart(uint32_t blockNumber, uint32_t eraseCount) { bool Sd2Card::writeStop() { chipSelectLow(); if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto fail; - spiSend(STOP_TRAN_TOKEN); + m_spi.send(STOP_TRAN_TOKEN); if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto fail; chipSelectHigh(); return true; diff --git a/libs/SdFatBeta20120108/SdFat/Sd2Card.h b/libs/SdFat-master/SdFat/Sd2Card.h similarity index 61% rename from libs/SdFatBeta20120108/SdFat/Sd2Card.h rename to libs/SdFat-master/SdFat/Sd2Card.h index 2d57491..7cf74b9 100755 --- a/libs/SdFatBeta20120108/SdFat/Sd2Card.h +++ b/libs/SdFat-master/SdFat/Sd2Card.h @@ -1,5 +1,5 @@ /* Arduino Sd2Card Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino Sd2Card Library * @@ -17,42 +17,23 @@ * along with the Arduino Sd2Card Library. If not, see * . */ -#ifndef Sd2Card_h -#define Sd2Card_h +#ifndef SpiCard_h +#define SpiCard_h /** * \file * \brief Sd2Card class for V2 SD/SDHC cards */ +#include #include #include -//------------------------------------------------------------------------------ -// SPI speed is F_CPU/2^(1 + index), 0 <= index <= 6 -/** Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate(). */ -uint8_t const SPI_FULL_SPEED = 0; -/** Set SCK rate to F_CPU/4. See Sd2Card::setSckRate(). */ -uint8_t const SPI_HALF_SPEED = 1; -/** Set SCK rate to F_CPU/8. See Sd2Card::setSckRate(). */ -uint8_t const SPI_QUARTER_SPEED = 2; -/** Set SCK rate to F_CPU/16. See Sd2Card::setSckRate(). */ -uint8_t const SPI_EIGHTH_SPEED = 3; -/** Set SCK rate to F_CPU/32. See Sd2Card::setSckRate(). */ -uint8_t const SPI_SIXTEENTH_SPEED = 4; -//------------------------------------------------------------------------------ -/** init timeout ms */ -uint16_t const SD_INIT_TIMEOUT = 2000; -/** erase timeout ms */ -uint16_t const SD_ERASE_TIMEOUT = 10000; -/** read timeout ms */ -uint16_t const SD_READ_TIMEOUT = 300; -/** write time out ms */ -uint16_t const SD_WRITE_TIMEOUT = 600; +#include //------------------------------------------------------------------------------ // SD card errors /** timeout error for command CMD0 (initialize card in SPI mode) */ uint8_t const SD_CARD_ERROR_CMD0 = 0X1; /** CMD8 was not accepted - not a valid SD card*/ uint8_t const SD_CARD_ERROR_CMD8 = 0X2; -/** card returned an error response for CMD12 (write stop) */ +/** card returned an error response for CMD12 (stop multiblock read) */ uint8_t const SD_CARD_ERROR_CMD12 = 0X3; /** card returned an error response for CMD17 (read block) */ uint8_t const SD_CARD_ERROR_CMD17 = 0X4; @@ -98,6 +79,12 @@ uint8_t const SD_CARD_ERROR_WRITE_TIMEOUT = 0X17; uint8_t const SD_CARD_ERROR_SCK_RATE = 0X18; /** init() not called */ uint8_t const SD_CARD_ERROR_INIT_NOT_CALLED = 0X19; +/** card returned an error for CMD59 (CRC_ON_OFF) */ +uint8_t const SD_CARD_ERROR_CMD59 = 0X1A; +/** invalid read CRC */ +uint8_t const SD_CARD_ERROR_READ_CRC = 0X1B; +/** SPI DMA error */ +uint8_t const SD_CARD_ERROR_SPI_DMA = 0X1C; //------------------------------------------------------------------------------ // card types /** Standard capacity V1 SD card */ @@ -106,54 +93,6 @@ uint8_t const SD_CARD_TYPE_SD1 = 1; uint8_t const SD_CARD_TYPE_SD2 = 2; /** High Capacity SD card */ uint8_t const SD_CARD_TYPE_SDHC = 3; -/** - * define SOFTWARE_SPI to use bit-bang SPI - */ -//------------------------------------------------------------------------------ -#if MEGA_SOFT_SPI && (defined(__AVR_ATmega1280__)||defined(__AVR_ATmega2560__)) -#define SOFTWARE_SPI -#elif USE_SOFTWARE_SPI -#define SOFTWARE_SPI -#endif // MEGA_SOFT_SPI -//------------------------------------------------------------------------------ -// SPI pin definitions - do not edit here - change in SdFatConfig.h -// -#ifndef SOFTWARE_SPI -// hardware pin defs -#ifdef SS -/** The default chip select pin for the SD card is SS. */ -uint8_t const SD_CHIP_SELECT_PIN = SS; -// The following three pins must not be redefined for hardware SPI. -/** SPI Master Out Slave In pin */ -uint8_t const SPI_MOSI_PIN = MOSI; -/** SPI Master In Slave Out pin */ -uint8_t const SPI_MISO_PIN = MISO; -/** SPI Clock pin */ -uint8_t const SPI_SCK_PIN = SCK; -#else // SS -// pre 1.0 Arduino -#include -/** The default chip select pin for the SD card is SS. */ -uint8_t const SD_CHIP_SELECT_PIN = SS_PIN; -// The following three pins must not be redefined for hardware SPI. -/** SPI Master Out Slave In pin */ -uint8_t const SPI_MOSI_PIN = MOSI_PIN; -/** SPI Master In Slave Out pin */ -uint8_t const SPI_MISO_PIN = MISO_PIN; -/** SPI Clock pin */ -uint8_t const SPI_SCK_PIN = SCK_PIN; -#endif // SS -#else // SOFTWARE_SPI - -/** SPI chip select pin */ -uint8_t const SD_CHIP_SELECT_PIN = SOFT_SPI_CS_PIN; -/** SPI Master Out Slave In pin */ -uint8_t const SPI_MOSI_PIN = SOFT_SPI_MOSI_PIN; -/** SPI Master In Slave Out pin */ -uint8_t const SPI_MISO_PIN = SOFT_SPI_MISO_PIN; -/** SPI Clock pin */ -uint8_t const SPI_SCK_PIN = SOFT_SPI_SCK_PIN; -#endif // SOFTWARE_SPI //------------------------------------------------------------------------------ /** * \class Sd2Card @@ -162,7 +101,9 @@ uint8_t const SPI_SCK_PIN = SOFT_SPI_SCK_PIN; class Sd2Card { public: /** Construct an instance of Sd2Card. */ - Sd2Card() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {} + Sd2Card() : m_errorCode(SD_CARD_ERROR_INIT_NOT_CALLED), m_type(0) {} + bool begin(uint8_t chipSelectPin = SD_CHIP_SELECT_PIN, + uint8_t sckDivisor = SPI_FULL_SPEED); uint32_t cardSize(); bool erase(uint32_t firstBlock, uint32_t lastBlock); bool eraseSingleBlockEnable(); @@ -170,21 +111,28 @@ class Sd2Card { * Set SD error code. * \param[in] code value for error code. */ - void error(uint8_t code) {errorCode_ = code;} + void error(uint8_t code) {m_errorCode = code;} /** * \return error code for last error. See Sd2Card.h for a list of error codes. */ - int errorCode() const {return errorCode_;} + int errorCode() const {return m_errorCode;} /** \return error data for last error. */ - int errorData() const {return status_;} + int errorData() const {return m_status;} /** - * Initialize an SD flash memory card with default clock rate and chip - * select pin. See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin). - * - * \return true for success or false for failure. - */ - bool init(uint8_t sckRateID = SPI_FULL_SPEED, - uint8_t chipSelectPin = SD_CHIP_SELECT_PIN); + * Initialize an SD flash memory card. + * + * \param[in] chipSelectPin SD chip select pin number. + * \param[in] sckDivisor SPI SCK clock rate divisor. + * + * \return The value one, true, is returned for success and + * the value zero, false, is returned for failure. The reason for failure + * can be determined by calling errorCode() and errorData(). + */ + bool init(uint8_t sckDivisor = SPI_FULL_SPEED, + uint8_t chipSelectPin = SD_CHIP_SELECT_PIN) { + return begin(chipSelectPin, sckDivisor); + } + bool isBusy(); bool readBlock(uint32_t block, uint8_t* dst); /** * Read a card's CID register. The CID contains card identification @@ -210,36 +158,45 @@ class Sd2Card { return readRegister(CMD9, csd); } bool readData(uint8_t *dst); + bool readOCR(uint32_t* ocr); bool readStart(uint32_t blockNumber); bool readStop(); - bool setSckRate(uint8_t sckRateID); + /** Return SCK divisor. + * + * \return Requested SCK divisor. + */ + uint8_t sckDivisor() {return m_sckDivisor;} /** Return the card type: SD V1, SD V2 or SDHC * \return 0 - SD V1, 1 - SD V2, or 3 - SDHC. */ - int type() const {return type_;} + int type() const {return m_type;} bool writeBlock(uint32_t blockNumber, const uint8_t* src); bool writeData(const uint8_t* src); bool writeStart(uint32_t blockNumber, uint32_t eraseCount); bool writeStop(); + private: //---------------------------------------------------------------------------- - uint8_t chipSelectPin_; - uint8_t errorCode_; - uint8_t spiRate_; - uint8_t status_; - uint8_t type_; // private functions uint8_t cardAcmd(uint8_t cmd, uint32_t arg) { - if (!cardCommand(CMD55, 0)) return false; + cardCommand(CMD55, 0); return cardCommand(cmd, arg); } uint8_t cardCommand(uint8_t cmd, uint32_t arg); - bool readData(uint8_t* dst, uint16_t count); + bool readData(uint8_t* dst, size_t count); bool readRegister(uint8_t cmd, void* buf); void chipSelectHigh(); void chipSelectLow(); - void type(uint8_t value) {type_ = value;} + void spiYield(); + void type(uint8_t value) {m_type = value;} bool waitNotBusy(uint16_t timeoutMillis); bool writeData(uint8_t token, const uint8_t* src); + // private data + static SdSpi m_spi; + uint8_t m_chipSelectPin; + uint8_t m_errorCode; + uint8_t m_sckDivisor; + uint8_t m_status; + uint8_t m_type; }; -#endif // Sd2Card_h +#endif // SpiCard_h diff --git a/libs/SdFatBeta20120108/SdFat/SdBaseFile.cpp b/libs/SdFat-master/SdFat/SdBaseFile.cpp similarity index 66% rename from libs/SdFatBeta20120108/SdFat/SdBaseFile.cpp rename to libs/SdFat-master/SdFat/SdBaseFile.cpp index 9bd7aca..714630d 100755 --- a/libs/SdFatBeta20120108/SdFat/SdBaseFile.cpp +++ b/libs/SdFat-master/SdFat/SdBaseFile.cpp @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -17,22 +17,23 @@ * along with the Arduino SdFat Library. If not, see * . */ -//#include #include //------------------------------------------------------------------------------ // pointer to cwd directory -SdBaseFile* SdBaseFile::cwd_ = 0; +SdBaseFile* SdBaseFile::m_cwd = 0; // callback function for date/time -void (*SdBaseFile::dateTime_)(uint16_t* date, uint16_t* time) = 0; +void (*SdBaseFile::m_dateTime)(uint16_t* date, uint16_t* time) = 0; //------------------------------------------------------------------------------ // add a cluster to a file bool SdBaseFile::addCluster() { - if (!vol_->allocContiguous(1, &curCluster_)) goto fail; - + if (!m_vol->allocContiguous(1, &m_curCluster)) { + DBG_FAIL_MACRO; + goto fail; + } // if first cluster of file link to directory entry - if (firstCluster_ == 0) { - firstCluster_ = curCluster_; - flags_ |= F_FILE_DIR_DIRTY; + if (m_firstCluster == 0) { + m_firstCluster = m_curCluster; + m_flags |= F_FILE_DIR_DIRTY; } return true; @@ -42,39 +43,50 @@ bool SdBaseFile::addCluster() { //------------------------------------------------------------------------------ // Add a cluster to a directory file and zero the cluster. // return with first block of cluster in the cache -bool SdBaseFile::addDirCluster() { +cache_t* SdBaseFile::addDirCluster() { uint32_t block; + cache_t* pc; // max folder size - if (fileSize_/sizeof(dir_t) >= 0XFFFF) goto fail; - - if (!addCluster()) goto fail; - if (!vol_->cacheFlush()) goto fail; - - block = vol_->clusterStartBlock(curCluster_); - - // set cache to first block of cluster - vol_->cacheSetBlockNumber(block, true); - - // zero first block of cluster - memset(vol_->cacheBuffer_.data, 0, 512); - - // zero rest of cluster - for (uint8_t i = 1; i < vol_->blocksPerCluster_; i++) { - if (!vol_->writeBlock(block + i, vol_->cacheBuffer_.data)) goto fail; + if (m_fileSize/sizeof(dir_t) >= 0XFFFF) { + DBG_FAIL_MACRO; + goto fail; + } + if (!addCluster()) { + DBG_FAIL_MACRO; + goto fail; + } + block = m_vol->clusterStartBlock(m_curCluster); + pc = m_vol->cacheFetch(block, SdVolume::CACHE_RESERVE_FOR_WRITE); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + memset(pc, 0, 512); + // zero rest of clusters + for (uint8_t i = 1; i < m_vol->blocksPerCluster(); i++) { + if (!m_vol->writeBlock(block + i, pc->data)) { + DBG_FAIL_MACRO; + goto fail; + } } // Increase directory file size by cluster size - fileSize_ += 512UL << vol_->clusterSizeShift_; - return true; + m_fileSize += 512UL*m_vol->blocksPerCluster(); + return pc; fail: - return false; + return 0; } //------------------------------------------------------------------------------ // cache a file's directory entry // return pointer to cached entry or null for failure dir_t* SdBaseFile::cacheDirEntry(uint8_t action) { - if (!vol_->cacheRawBlock(dirBlock_, action)) goto fail; - return vol_->cache()->dir + dirIndex_; + cache_t* pc; + pc = m_vol->cacheFetch(m_dirBlock, action); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + return pc->dir + m_dirIndex; fail: return 0; @@ -89,7 +101,7 @@ dir_t* SdBaseFile::cacheDirEntry(uint8_t action) { */ bool SdBaseFile::close() { bool rtn = sync(); - type_ = FAT_FILE_TYPE_CLOSED; + m_type = FAT_FILE_TYPE_CLOSED; return rtn; } //------------------------------------------------------------------------------ @@ -105,19 +117,26 @@ bool SdBaseFile::close() { */ bool SdBaseFile::contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock) { // error if no blocks - if (firstCluster_ == 0) goto fail; - - for (uint32_t c = firstCluster_; ; c++) { + if (m_firstCluster == 0) { + DBG_FAIL_MACRO; + goto fail; + } + for (uint32_t c = m_firstCluster; ; c++) { uint32_t next; - if (!vol_->fatGet(c, &next)) goto fail; - + if (!m_vol->fatGet(c, &next)) { + DBG_FAIL_MACRO; + goto fail; + } // check for contiguous if (next != (c + 1)) { // error if not end of chain - if (!vol_->isEOC(next)) goto fail; - *bgnBlock = vol_->clusterStartBlock(firstCluster_); - *endBlock = vol_->clusterStartBlock(c) - + vol_->blocksPerCluster_ - 1; + if (!m_vol->isEOC(next)) { + DBG_FAIL_MACRO; + goto fail; + } + *bgnBlock = m_vol->clusterStartBlock(m_firstCluster); + *endBlock = m_vol->clusterStartBlock(c) + + m_vol->blocksPerCluster() - 1; return true; } } @@ -147,21 +166,27 @@ bool SdBaseFile::createContiguous(SdBaseFile* dirFile, const char* path, uint32_t size) { uint32_t count; // don't allow zero length file - if (size == 0) goto fail; - if (!open(dirFile, path, O_CREAT | O_EXCL | O_RDWR)) goto fail; - + if (size == 0) { + DBG_FAIL_MACRO; + goto fail; + } + if (!open(dirFile, path, O_CREAT | O_EXCL | O_RDWR)) { + DBG_FAIL_MACRO; + goto fail; + } // calculate number of clusters needed - count = ((size - 1) >> (vol_->clusterSizeShift_ + 9)) + 1; + count = ((size - 1) >> (m_vol->clusterSizeShift() + 9)) + 1; // allocate clusters - if (!vol_->allocContiguous(count, &firstCluster_)) { + if (!m_vol->allocContiguous(count, &m_firstCluster)) { remove(); + DBG_FAIL_MACRO; goto fail; } - fileSize_ = size; + m_fileSize = size; // insure sync() will update dir entry - flags_ |= F_FILE_DIR_DIRTY; + m_flags |= F_FILE_DIR_DIRTY; return sync(); @@ -179,12 +204,16 @@ bool SdBaseFile::createContiguous(SdBaseFile* dirFile, bool SdBaseFile::dirEntry(dir_t* dir) { dir_t* p; // make sure fields on SD are correct - if (!sync()) goto fail; - + if (!sync()) { + DBG_FAIL_MACRO; + goto fail; + } // read entry p = cacheDirEntry(SdVolume::CACHE_FOR_READ); - if (!p) goto fail; - + if (!p) { + DBG_FAIL_MACRO; + goto fail; + } // copy to caller's struct memcpy(dir, p, sizeof(dir_t)); return true; @@ -275,117 +304,33 @@ int16_t SdBaseFile::fgets(char* str, int16_t num, char* delim) { * the value zero, false, is returned for failure. */ bool SdBaseFile::getFilename(char* name) { - if (!isOpen()) return false; - + dir_t* p; + if (!isOpen()) { + DBG_FAIL_MACRO; + goto fail; + } if (isRoot()) { name[0] = '/'; name[1] = '\0'; return true; } // cache entry - dir_t* p = cacheDirEntry(SdVolume::CACHE_FOR_READ); - if (!p) return false; - + p = cacheDirEntry(SdVolume::CACHE_FOR_READ); + if (!p) { + DBG_FAIL_MACRO; + goto fail; + } // format name dirName(*p, name); return true; + + fail: + return false; } //------------------------------------------------------------------------------ -void SdBaseFile::getpos(fpos_t* pos) { - pos->position = curPosition_; - pos->cluster = curCluster_; -} -//------------------------------------------------------------------------------ -/** List directory contents to stdOut. - * - * \param[in] flags The inclusive OR of - * - * LS_DATE - %Print file modification date - * - * LS_SIZE - %Print file size. - * - * LS_R - Recursive list of subdirectories. - */ -void SdBaseFile::ls(uint8_t flags) { - ls(SdFat::stdOut(), flags, 0); -} -//------------------------------------------------------------------------------ -/** List directory contents. - * - * \param[in] pr Print stream for list. - * - * \param[in] flags The inclusive OR of - * - * LS_DATE - %Print file modification date - * - * LS_SIZE - %Print file size. - * - * LS_R - Recursive list of subdirectories. - * - * \param[in] indent Amount of space before file name. Used for recursive - * list to indicate subdirectory level. - */ -void SdBaseFile::ls(Print* pr, uint8_t flags, uint8_t indent) { - rewind(); - int8_t status; - while ((status = lsPrintNext(pr, flags, indent))) { - if (status > 1 && (flags & LS_R)) { - uint16_t index = curPosition()/32 - 1; - SdBaseFile s; - if (s.open(this, index, O_READ)) s.ls(pr, flags, indent + 2); - seekSet(32 * (index + 1)); - } - } -} -//------------------------------------------------------------------------------ -// saves 32 bytes on stack for ls recursion -// return 0 - EOF, 1 - normal file, or 2 - directory -int8_t SdBaseFile::lsPrintNext(Print *pr, uint8_t flags, uint8_t indent) { - dir_t dir; - uint8_t w = 0; - - while (1) { - if (read(&dir, sizeof(dir)) != sizeof(dir)) return 0; - if (dir.name[0] == DIR_NAME_FREE) return 0; - - // skip deleted entry and entries for . and .. - if (dir.name[0] != DIR_NAME_DELETED && dir.name[0] != '.' - && DIR_IS_FILE_OR_SUBDIR(&dir)) break; - } - // indent for dir level - for (uint8_t i = 0; i < indent; i++) pr->write(' '); - - // print name - for (uint8_t i = 0; i < 11; i++) { - if (dir.name[i] == ' ')continue; - if (i == 8) { - pr->write('.'); - w++; - } - pr->write(dir.name[i]); - w++; - } - if (DIR_IS_SUBDIR(&dir)) { - pr->write('/'); - w++; - } - if (flags & (LS_DATE | LS_SIZE)) { - while (w++ < 14) pr->write(' '); - } - // print modify date/time if requested - if (flags & LS_DATE) { - pr->write(' '); - printFatDate(pr, dir.lastWriteDate); - pr->write(' '); - printFatTime(pr, dir.lastWriteTime); - } - // print size if requested - if (!DIR_IS_SUBDIR(&dir) && (flags & LS_SIZE)) { - pr->write(' '); - pr->print(dir.fileSize); - } - pr->println(); - return DIR_IS_FILE(&dir) ? 1 : 2; +void SdBaseFile::getpos(FatPos_t* pos) { + pos->position = m_curPosition; + pos->cluster = m_curCluster; } //------------------------------------------------------------------------------ // format directory name field from a 8.3 name string @@ -399,24 +344,36 @@ bool SdBaseFile::make83Name(const char* str, uint8_t* name, const char** ptr) { while (*str != '\0' && *str != '/') { c = *str++; if (c == '.') { - if (n == 10) goto fail; // only one dot allowed + if (n == 10) { + // only one dot allowed + DBG_FAIL_MACRO; + goto fail; + } n = 10; // max index for full 8.3 name i = 8; // place for extension } else { // illegal FAT characters -#define FLASH_ILLEGAL_CHARS -#ifdef FLASH_ILLEGAL_CHARS +#ifdef __AVR__ // store chars in flash PGM_P p = PSTR("|<>^+=?/[];,*\"\\"); uint8_t b; - while ((b = pgm_read_byte(p++))) if (b == c) goto fail; -#else // FLASH_ILLEGAL_CHARS + while ((b = pgm_read_byte(p++))) if (b == c) { + DBG_FAIL_MACRO; + goto fail; + } +#else // __AVR__ // store chars in RAM - if (strchr("|<>^+=?/[];,*\"\\", c)) goto fail; -#endif // FLASH_ILLEGAL_CHARS + if (strchr("|<>^+=?/[];,*\"\\", c)) { + DBG_FAIL_MACRO; + goto fail; + } +#endif // __AVR__ // check size and only allow ASCII printable characters - if (i > n || c < 0X21 || c > 0X7E)goto fail; + if (i > n || c < 0X21 || c > 0X7E) { + DBG_FAIL_MACRO; + goto fail; + } // only upper case allowed in 8.3 names - convert lower to upper name[i++] = c < 'a' || c > 'z' ? c : c + ('A' - 'a'); } @@ -449,21 +406,30 @@ bool SdBaseFile::mkdir(SdBaseFile* parent, const char* path, bool pFlag) { SdBaseFile* sub = &dir1; SdBaseFile* start = parent; - if (!parent || isOpen()) goto fail; - + if (!parent || isOpen()) { + DBG_FAIL_MACRO; + goto fail; + } if (*path == '/') { while (*path == '/') path++; if (!parent->isRoot()) { - if (!dir2.openRoot(parent->vol_)) goto fail; + if (!dir2.openRoot(parent->m_vol)) { + DBG_FAIL_MACRO; + goto fail; + } parent = &dir2; } } while (1) { - if (!make83Name(path, dname, &path)) goto fail; + if (!make83Name(path, dname, &path)) { + DBG_FAIL_MACRO; + goto fail; + } while (*path == '/') path++; if (!*path) break; if (!sub->open(parent, dname, O_READ)) { if (!pFlag || !sub->mkdir(parent, dname)) { + DBG_FAIL_MACRO; goto fail; } } @@ -473,7 +439,7 @@ bool SdBaseFile::mkdir(SdBaseFile* parent, const char* path, bool pFlag) { } return mkdir(parent, dname); - fail: + fail: return false; } //------------------------------------------------------------------------------ @@ -481,26 +447,37 @@ bool SdBaseFile::mkdir(SdBaseFile* parent, const uint8_t dname[11]) { uint32_t block; dir_t d; dir_t* p; + cache_t* pc; - if (!parent->isDir()) goto fail; - + if (!parent->isDir()) { + DBG_FAIL_MACRO; + goto fail; + } // create a normal file - if (!open(parent, dname, O_CREAT | O_EXCL | O_RDWR)) goto fail; - + if (!open(parent, dname, O_CREAT | O_EXCL | O_RDWR)) { + DBG_FAIL_MACRO; + goto fail; + } // convert file to directory - flags_ = O_READ; - type_ = FAT_FILE_TYPE_SUBDIR; + m_flags = O_READ; + m_type = FAT_FILE_TYPE_SUBDIR; // allocate and zero first cluster - if (!addDirCluster())goto fail; - + if (!addDirCluster()) { + DBG_FAIL_MACRO; + goto fail; + } // force entry to SD - if (!sync()) goto fail; - + if (!sync()) { + DBG_FAIL_MACRO; + goto fail; + } // cache entry - should already be in cache due to sync() call p = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!p) goto fail; - + if (!p) { + DBG_FAIL_MACRO; + goto fail; + } // change directory entry attribute p->attributes = DIR_ATT_DIRECTORY; @@ -510,26 +487,27 @@ bool SdBaseFile::mkdir(SdBaseFile* parent, const uint8_t dname[11]) { for (uint8_t i = 1; i < 11; i++) d.name[i] = ' '; // cache block for '.' and '..' - block = vol_->clusterStartBlock(firstCluster_); - if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_WRITE)) goto fail; - + block = m_vol->clusterStartBlock(m_firstCluster); + pc = m_vol->cacheFetch(block, SdVolume::CACHE_FOR_WRITE); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } // copy '.' to block - memcpy(&vol_->cache()->dir[0], &d, sizeof(d)); - + memcpy(&pc->dir[0], &d, sizeof(d)); // make entry for '..' d.name[1] = '.'; if (parent->isRoot()) { d.firstClusterLow = 0; d.firstClusterHigh = 0; } else { - d.firstClusterLow = parent->firstCluster_ & 0XFFFF; - d.firstClusterHigh = parent->firstCluster_ >> 16; + d.firstClusterLow = parent->m_firstCluster & 0XFFFF; + d.firstClusterHigh = parent->m_firstCluster >> 16; } // copy '..' to block - memcpy(&vol_->cache()->dir[1], &d, sizeof(d)); - + memcpy(&pc->dir[1], &d, sizeof(d)); // write first block - return vol_->cacheFlush(); + return m_vol->cacheSync(); fail: return false; @@ -546,7 +524,7 @@ bool SdBaseFile::mkdir(SdBaseFile* parent, const uint8_t dname[11]) { * the value zero, false, is returned for failure. */ bool SdBaseFile::open(const char* path, uint8_t oflag) { - return open(cwd_, path, oflag); + return open(m_cwd, path, oflag); } //------------------------------------------------------------------------------ /** Open a file or directory by name. @@ -588,7 +566,7 @@ bool SdBaseFile::mkdir(SdBaseFile* parent, const uint8_t dname[11]) { * successfully opened and is not read only, its length shall be truncated to 0. * * WARNING: A given file must not be opened by more than one SdBaseFile object - * of file corruption may occur. + * or file corruption may occur. * * \note Directory files must be opened read only. Write and truncation is * not allowed for directory files. @@ -605,23 +583,37 @@ bool SdBaseFile::open(SdBaseFile* dirFile, const char* path, uint8_t oflag) { SdBaseFile *parent = dirFile; SdBaseFile *sub = &dir1; - if (!dirFile) goto fail; - + if (!dirFile) { + DBG_FAIL_MACRO; + goto fail; + } // error if already open - if (isOpen()) goto fail; - + if (isOpen()) { + DBG_FAIL_MACRO; + goto fail; + } if (*path == '/') { while (*path == '/') path++; + if (*path == 0) return openRoot(dirFile->m_vol); if (!dirFile->isRoot()) { - if (!dir2.openRoot(dirFile->vol_)) goto fail; + if (!dir2.openRoot(dirFile->m_vol)) { + DBG_FAIL_MACRO; + goto fail; + } parent = &dir2; } } while (1) { - if (!make83Name(path, dname, &path)) goto fail; + if (!make83Name(path, dname, &path)) { + DBG_FAIL_MACRO; + goto fail; + } while (*path == '/') path++; if (!*path) break; - if (!sub->open(parent, dname, O_READ)) goto fail; + if (!sub->open(parent, dname, O_READ)) { + DBG_FAIL_MACRO; + goto fail; + } if (parent != dirFile) parent->close(); parent = sub; sub = parent != &dir1 ? &dir1 : &dir2; @@ -635,53 +627,79 @@ bool SdBaseFile::open(SdBaseFile* dirFile, const char* path, uint8_t oflag) { // open with filename in dname bool SdBaseFile::open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag) { + cache_t* pc; bool emptyFound = false; bool fileFound = false; uint8_t index; dir_t* p; - vol_ = dirFile->vol_; + m_vol = dirFile->m_vol; dirFile->rewind(); // search for file - while (dirFile->curPosition_ < dirFile->fileSize_) { - index = 0XF & (dirFile->curPosition_ >> 5); - p = dirFile->readDirCache(); - if (!p) goto fail; - - if (p->name[0] == DIR_NAME_FREE || p->name[0] == DIR_NAME_DELETED) { - // remember first empty slot - if (!emptyFound) { - dirBlock_ = dirFile->vol_->cacheBlockNumber(); - dirIndex_ = index; - emptyFound = true; + while (dirFile->m_curPosition < dirFile->m_fileSize) { + // Cache directory block. + if (dirFile->read() < 0) { + DBG_FAIL_MACRO; + goto fail; + } + // Position to to next block + dirFile->m_curPosition += 511; + + for (index = 0; index < 16; index++) { + p = &m_vol->cacheAddress()->dir[index]; + if (p->name[0] == DIR_NAME_FREE || p->name[0] == DIR_NAME_DELETED) { + // remember first empty slot + if (!emptyFound) { + m_dirBlock = m_vol->cacheBlockNumber(); + m_dirIndex = index; + emptyFound = true; + } + // done if no entries follow + if (p->name[0] == DIR_NAME_FREE) { + goto done; + } + } else if (!memcmp(dname, p->name, 11)) { + fileFound = true; + goto done; } - // done if no entries follow - if (p->name[0] == DIR_NAME_FREE) break; - } else if (!memcmp(dname, p->name, 11)) { - fileFound = true; - break; } } + done: + if (fileFound) { // don't open existing file if O_EXCL - if (oflag & O_EXCL) goto fail; + if (oflag & O_EXCL) { + DBG_FAIL_MACRO; + goto fail; + } } else { // don't create unless O_CREAT and O_WRITE - if (!(oflag & O_CREAT) || !(oflag & O_WRITE)) goto fail; + if (!(oflag & O_CREAT) || !(oflag & O_WRITE)) { + DBG_FAIL_MACRO; + goto fail; + } if (emptyFound) { - index = dirIndex_; + index = m_dirIndex; p = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!p) goto fail; + if (!p) { + DBG_FAIL_MACRO; + goto fail; + } } else { - if (dirFile->type_ == FAT_FILE_TYPE_ROOT_FIXED) goto fail; - + if (dirFile->m_type == FAT_FILE_TYPE_ROOT_FIXED) { + DBG_FAIL_MACRO; + goto fail; + } // add and zero cluster for dirFile - first cluster is in cache for write - if (!dirFile->addDirCluster()) goto fail; - + pc = dirFile->addDirCluster(); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } // use first entry in cluster - p = dirFile->vol_->cache()->dir; + p = pc->dir; index = 0; } // initialize as empty file @@ -689,9 +707,9 @@ bool SdBaseFile::open(SdBaseFile* dirFile, memcpy(p->name, dname, 11); // set timestamps - if (dateTime_) { + if (m_dateTime) { // call user date/time function - dateTime_(&p->creationDate, &p->creationTime); + m_dateTime(&p->creationDate, &p->creationTime); } else { // use default date/time p->creationDate = FAT_DEFAULT_DATE; @@ -702,7 +720,10 @@ bool SdBaseFile::open(SdBaseFile* dirFile, p->lastWriteTime = p->creationTime; // write entry to SD - if (!dirFile->vol_->cacheFlush()) goto fail; + if (!dirFile->m_vol->cacheSync()) { + DBG_FAIL_MACRO; + goto fail; + } } // open entry in cache return openCachedEntry(index, oflag); @@ -727,24 +748,34 @@ bool SdBaseFile::open(SdBaseFile* dirFile, bool SdBaseFile::open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag) { dir_t* p; - vol_ = dirFile->vol_; + m_vol = dirFile->m_vol; // error if already open - if (isOpen() || !dirFile) goto fail; + if (isOpen() || !dirFile) { + DBG_FAIL_MACRO; + goto fail; + } // don't open existing file if O_EXCL - user call error - if (oflag & O_EXCL) goto fail; - + if (oflag & O_EXCL) { + DBG_FAIL_MACRO; + goto fail; + } // seek to location of entry - if (!dirFile->seekSet(32 * index)) goto fail; - + if (!dirFile->seekSet(32 * index)) { + DBG_FAIL_MACRO; + goto fail; + } // read entry into cache p = dirFile->readDirCache(); - if (!p) goto fail; - + if (!p) { + DBG_FAIL_MACRO; + goto fail; + } // error if empty slot or '.' or '..' if (p->name[0] == DIR_NAME_FREE || p->name[0] == DIR_NAME_DELETED || p->name[0] == '.') { + DBG_FAIL_MACRO; goto fail; } // open cached entry @@ -754,44 +785,54 @@ bool SdBaseFile::open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag) { return false; } //------------------------------------------------------------------------------ -// open a cached directory entry. Assumes vol_ is initialized +// open a cached directory entry. Assumes m_vol is initialized bool SdBaseFile::openCachedEntry(uint8_t dirIndex, uint8_t oflag) { // location of entry in cache - dir_t* p = &vol_->cache()->dir[dirIndex]; + dir_t* p = &m_vol->cacheAddress()->dir[dirIndex]; // write or truncate is an error for a directory or read-only file if (p->attributes & (DIR_ATT_READ_ONLY | DIR_ATT_DIRECTORY)) { - if (oflag & (O_WRITE | O_TRUNC)) goto fail; + if (oflag & (O_WRITE | O_TRUNC)) { + DBG_FAIL_MACRO; + goto fail; + } } // remember location of directory entry on SD - dirBlock_ = vol_->cacheBlockNumber(); - dirIndex_ = dirIndex; + m_dirBlock = m_vol->cacheBlockNumber(); + m_dirIndex = dirIndex; // copy first cluster number for directory fields - firstCluster_ = (uint32_t)p->firstClusterHigh << 16; - firstCluster_ |= p->firstClusterLow; + m_firstCluster = (uint32_t)p->firstClusterHigh << 16; + m_firstCluster |= p->firstClusterLow; // make sure it is a normal file or subdirectory if (DIR_IS_FILE(p)) { - fileSize_ = p->fileSize; - type_ = FAT_FILE_TYPE_NORMAL; + m_fileSize = p->fileSize; + m_type = FAT_FILE_TYPE_NORMAL; } else if (DIR_IS_SUBDIR(p)) { - if (!vol_->chainSize(firstCluster_, &fileSize_)) goto fail; - type_ = FAT_FILE_TYPE_SUBDIR; + if (!setDirSize()) { + DBG_FAIL_MACRO; + goto fail; + } + m_type = FAT_FILE_TYPE_SUBDIR; } else { + DBG_FAIL_MACRO; goto fail; } // save open flags for read/write - flags_ = oflag & F_OFLAG; + m_flags = oflag & F_OFLAG; // set to start of file - curCluster_ = 0; - curPosition_ = 0; - if ((oflag & O_TRUNC) && !truncate(0)) return false; + m_curCluster = 0; + m_curPosition = 0; + if ((oflag & O_TRUNC) && !truncate(0)) { + DBG_FAIL_MACRO; + goto fail; + } return oflag & O_AT_END ? seekEnd(0) : true; fail: - type_ = FAT_FILE_TYPE_CLOSED; + m_type = FAT_FILE_TYPE_CLOSED; return false; } //------------------------------------------------------------------------------ @@ -810,23 +851,31 @@ bool SdBaseFile::openNext(SdBaseFile* dirFile, uint8_t oflag) { dir_t* p; uint8_t index; - if (!dirFile) goto fail; - + if (!dirFile) { + DBG_FAIL_MACRO; + goto fail; + } // error if already open - if (isOpen()) goto fail; - - vol_ = dirFile->vol_; + if (isOpen()) { + DBG_FAIL_MACRO; + goto fail; + } + m_vol = dirFile->m_vol; while (1) { - index = 0XF & (dirFile->curPosition_ >> 5); + index = 0XF & (dirFile->m_curPosition >> 5); // read entry into cache p = dirFile->readDirCache(); - if (!p) goto fail; - + if (!p) { + DBG_FAIL_MACRO; + goto fail; + } // done if last entry - if (p->name[0] == DIR_NAME_FREE) goto fail; - + if (p->name[0] == DIR_NAME_FREE) { + DBG_FAIL_MACRO; + goto fail; + } // skip empty slot or '.' or '..' if (p->name[0] == DIR_NAME_DELETED || p->name[0] == '.') { continue; @@ -855,37 +904,64 @@ bool SdBaseFile::openParent(SdBaseFile* dir) { uint32_t c; uint32_t cluster; uint32_t lbn; + cache_t* pc; // error if already open or dir is root or dir is not a directory - if (isOpen() || !dir || dir->isRoot() || !dir->isDir()) goto fail; - vol_ = dir->vol_; + if (isOpen() || !dir || dir->isRoot() || !dir->isDir()) { + DBG_FAIL_MACRO; + goto fail; + } + m_vol = dir->m_vol; // position to '..' - if (!dir->seekSet(32)) goto fail; + if (!dir->seekSet(32)) { + DBG_FAIL_MACRO; + goto fail; + } // read '..' entry - if (dir->read(&entry, sizeof(entry)) != 32) goto fail; + if (dir->read(&entry, sizeof(entry)) != 32) { + DBG_FAIL_MACRO; + goto fail; + } // verify it is '..' - if (entry.name[0] != '.' || entry.name[1] != '.') goto fail; + if (entry.name[0] != '.' || entry.name[1] != '.') { + DBG_FAIL_MACRO; + goto fail; + } // start cluster for '..' cluster = entry.firstClusterLow; cluster |= (uint32_t)entry.firstClusterHigh << 16; - if (cluster == 0) return openRoot(vol_); + if (cluster == 0) return openRoot(m_vol); // start block for '..' - lbn = vol_->clusterStartBlock(cluster); + lbn = m_vol->clusterStartBlock(cluster); // first block of parent dir - if (!vol_->cacheRawBlock(lbn, SdVolume::CACHE_FOR_READ)) { + pc = m_vol->cacheFetch(lbn, SdVolume::CACHE_FOR_READ); + if (!pc) { + DBG_FAIL_MACRO; goto fail; } - p = &vol_->cacheBuffer_.dir[1]; + p = &pc->dir[1]; // verify name for '../..' - if (p->name[0] != '.' || p->name[1] != '.') goto fail; + if (p->name[0] != '.' || p->name[1] != '.') { + DBG_FAIL_MACRO; + goto fail; + } // '..' is pointer to first cluster of parent. open '../..' to find parent if (p->firstClusterHigh == 0 && p->firstClusterLow == 0) { - if (!file.openRoot(dir->volume())) goto fail; + if (!file.openRoot(dir->volume())) { + DBG_FAIL_MACRO; + goto fail; + } } else { - if (!file.openCachedEntry(1, O_READ)) goto fail; + if (!file.openCachedEntry(1, O_READ)) { + DBG_FAIL_MACRO; + goto fail; + } } // search for parent in '../..' do { - if (file.readDir(&entry) != 32) goto fail; + if (file.readDir(&entry) != 32) { + DBG_FAIL_MACRO; + goto fail; + } c = entry.firstClusterLow; c |= (uint32_t)entry.firstClusterHigh << 16; } while (c != cluster); @@ -907,31 +983,37 @@ bool SdBaseFile::openParent(SdBaseFile* dir) { */ bool SdBaseFile::openRoot(SdVolume* vol) { // error if file is already open - if (isOpen()) goto fail; - + if (isOpen()) { + DBG_FAIL_MACRO; + goto fail; + } + m_vol = vol; if (vol->fatType() == 16 || (FAT12_SUPPORT && vol->fatType() == 12)) { - type_ = FAT_FILE_TYPE_ROOT_FIXED; - firstCluster_ = 0; - fileSize_ = 32 * vol->rootDirEntryCount(); + m_type = FAT_FILE_TYPE_ROOT_FIXED; + m_firstCluster = 0; + m_fileSize = 32 * vol->rootDirEntryCount(); } else if (vol->fatType() == 32) { - type_ = FAT_FILE_TYPE_ROOT32; - firstCluster_ = vol->rootDirStart(); - if (!vol->chainSize(firstCluster_, &fileSize_)) goto fail; + m_type = FAT_FILE_TYPE_ROOT32; + m_firstCluster = vol->rootDirStart(); + if (!setDirSize()) { + DBG_FAIL_MACRO; + goto fail; + } } else { // volume is not initialized, invalid, or FAT12 without support - return false; + DBG_FAIL_MACRO; + goto fail; } - vol_ = vol; // read only - flags_ = O_READ; + m_flags = O_READ; // set to start of file - curCluster_ = 0; - curPosition_ = 0; + m_curCluster = 0; + m_curPosition = 0; // root has no directory entry - dirBlock_ = 0; - dirIndex_ = 0; + m_dirBlock = 0; + m_dirIndex = 0; return true; fail: @@ -943,120 +1025,13 @@ bool SdBaseFile::openRoot(SdVolume* vol) { * \return The byte if no error and not at eof else -1; */ int SdBaseFile::peek() { - fpos_t pos; + FatPos_t pos; getpos(&pos); int c = read(); if (c >= 0) setpos(&pos); return c; } //------------------------------------------------------------------------------ -/** %Print the name field of a directory entry in 8.3 format to stdOut. - * - * \param[in] dir The directory structure containing the name. - * \param[in] width Blank fill name if length is less than \a width. - * \param[in] printSlash Print '/' after directory names if true. - */ -void SdBaseFile::printDirName(const dir_t& dir, - uint8_t width, bool printSlash) { - printDirName(SdFat::stdOut(), dir, width, printSlash); -} -//------------------------------------------------------------------------------ -/** %Print the name field of a directory entry in 8.3 format. - * \param[in] pr Print stream for output. - * \param[in] dir The directory structure containing the name. - * \param[in] width Blank fill name if length is less than \a width. - * \param[in] printSlash Print '/' after directory names if true. - */ -void SdBaseFile::printDirName(Print* pr, const dir_t& dir, - uint8_t width, bool printSlash) { - uint8_t w = 0; - for (uint8_t i = 0; i < 11; i++) { - if (dir.name[i] == ' ')continue; - if (i == 8) { - pr->write('.'); - w++; - } - pr->write(dir.name[i]); - w++; - } - if (DIR_IS_SUBDIR(&dir) && printSlash) { - pr->write('/'); - w++; - } - while (w < width) { - pr->write(' '); - w++; - } -} -//------------------------------------------------------------------------------ -// print uint8_t with width 2 -static void print2u(Print* pr, uint8_t v) { - if (v < 10) pr->write('0'); - pr->print(v, DEC); -} -//------------------------------------------------------------------------------ -/** %Print a directory date field to stdOut. - * - * Format is yyyy-mm-dd. - * - * \param[in] fatDate The date field from a directory entry. - */ -void SdBaseFile::printFatDate(uint16_t fatDate) { - printFatDate(SdFat::stdOut(), fatDate); -} -//------------------------------------------------------------------------------ -/** %Print a directory date field. - * - * Format is yyyy-mm-dd. - * - * \param[in] pr Print stream for output. - * \param[in] fatDate The date field from a directory entry. - */ -void SdBaseFile::printFatDate(Print* pr, uint16_t fatDate) { - pr->print(FAT_YEAR(fatDate)); - pr->write('-'); - print2u(pr, FAT_MONTH(fatDate)); - pr->write('-'); - print2u(pr, FAT_DAY(fatDate)); -} -//------------------------------------------------------------------------------ -/** %Print a directory time field to stdOut. - * - * Format is hh:mm:ss. - * - * \param[in] fatTime The time field from a directory entry. - */ -void SdBaseFile::printFatTime(uint16_t fatTime) { - printFatTime(SdFat::stdOut(), fatTime); -} -//------------------------------------------------------------------------------ -/** %Print a directory time field. - * - * Format is hh:mm:ss. - * - * \param[in] pr Print stream for output. - * \param[in] fatTime The time field from a directory entry. - */ -void SdBaseFile::printFatTime(Print* pr, uint16_t fatTime) { - print2u(pr, FAT_HOUR(fatTime)); - pr->write(':'); - print2u(pr, FAT_MINUTE(fatTime)); - pr->write(':'); - print2u(pr, FAT_SECOND(fatTime)); -} -//------------------------------------------------------------------------------ -/** Print a file's name to stdOut - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool SdBaseFile::printName() { - char name[13]; - if (!getFilename(name)) return false; - SdFat::stdOut()->print(name); - return true; -} -//------------------------------------------------------------------------------ /** Read the next byte from a file. * * \return For success read returns the next byte in the file as an int. @@ -1080,55 +1055,99 @@ int16_t SdBaseFile::read() { * read() called before a file has been opened, corrupt file system * or an I/O error occurred. */ -int16_t SdBaseFile::read(void* buf, uint16_t nbyte) { +int SdBaseFile::read(void* buf, size_t nbyte) { + uint8_t blockOfCluster; uint8_t* dst = reinterpret_cast(buf); uint16_t offset; - uint16_t toRead; + size_t toRead; uint32_t block; // raw device block number + cache_t* pc; // error if not open or write only - if (!isOpen() || !(flags_ & O_READ)) goto fail; - + if (!isOpen() || !(m_flags & O_READ)) { + DBG_FAIL_MACRO; + goto fail; + } // max bytes left in file - if (nbyte >= (fileSize_ - curPosition_)) { - nbyte = fileSize_ - curPosition_; + if (nbyte >= (m_fileSize - m_curPosition)) { + nbyte = m_fileSize - m_curPosition; } // amount left to read toRead = nbyte; while (toRead > 0) { - offset = curPosition_ & 0X1FF; // offset in block - if (type_ == FAT_FILE_TYPE_ROOT_FIXED) { - block = vol_->rootDirStart() + (curPosition_ >> 9); + size_t n; + offset = m_curPosition & 0X1FF; // offset in block + blockOfCluster = m_vol->blockOfCluster(m_curPosition); + if (m_type == FAT_FILE_TYPE_ROOT_FIXED) { + block = m_vol->rootDirStart() + (m_curPosition >> 9); } else { - uint8_t blockOfCluster = vol_->blockOfCluster(curPosition_); if (offset == 0 && blockOfCluster == 0) { // start of new cluster - if (curPosition_ == 0) { + if (m_curPosition == 0) { // use first cluster in file - curCluster_ = firstCluster_; + m_curCluster = m_firstCluster; } else { // get next cluster from FAT - if (!vol_->fatGet(curCluster_, &curCluster_)) goto fail; + if (!m_vol->fatGet(m_curCluster, &m_curCluster)) { + DBG_FAIL_MACRO; + goto fail; + } } } - block = vol_->clusterStartBlock(curCluster_) + blockOfCluster; - } - uint16_t n = toRead; - - // amount to be read from current block - if (n > (512 - offset)) n = 512 - offset; - // no buffering needed if n == 512 - if (n == 512 && block != vol_->cacheBlockNumber()) { - if (!vol_->readBlock(block, dst)) goto fail; - } else { + block = m_vol->clusterStartBlock(m_curCluster) + blockOfCluster; + } + if (offset != 0 || toRead < 512 || block == m_vol->cacheBlockNumber()) { + // amount to be read from current block + n = 512 - offset; + if (n > toRead) n = toRead; // read block to cache and copy data to caller - if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_READ)) goto fail; - uint8_t* src = vol_->cache()->data + offset; + pc = m_vol->cacheFetch(block, SdVolume::CACHE_FOR_READ); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + uint8_t* src = pc->data + offset; memcpy(dst, src, n); + } else if (!USE_MULTI_BLOCK_SD_IO || toRead < 1024) { + // read single block + n = 512; + if (!m_vol->readBlock(block, dst)) { + DBG_FAIL_MACRO; + goto fail; + } + } else { + uint8_t nb = toRead >> 9; + if (m_type != FAT_FILE_TYPE_ROOT_FIXED) { + uint8_t mb = m_vol->blocksPerCluster() - blockOfCluster; + if (mb < nb) nb = mb; + } + n = 512*nb; + if (m_vol->cacheBlockNumber() <= block + && block < (m_vol->cacheBlockNumber() + nb)) { + // flush cache if a block is in the cache + if (!m_vol->cacheSync()) { + DBG_FAIL_MACRO; + goto fail; + } + } + if (!m_vol->sdCard()->readStart(block)) { + DBG_FAIL_MACRO; + goto fail; + } + for (uint8_t b = 0; b < nb; b++) { + if (!m_vol->sdCard()->readData(dst + b*512)) { + DBG_FAIL_MACRO; + goto fail; + } + } + if (!m_vol->sdCard()->readStop()) { + DBG_FAIL_MACRO; + goto fail; + } } dst += n; - curPosition_ += n; + m_curPosition += n; toRead -= n; } return nbyte; @@ -1150,7 +1169,7 @@ int16_t SdBaseFile::read(void* buf, uint16_t nbyte) { int8_t SdBaseFile::readDir(dir_t* dir) { int16_t n; // if not a directory file or miss-positioned return an error - if (!isDir() || (0X1F & curPosition_)) return -1; + if (!isDir() || (0X1F & m_curPosition)) return -1; while (1) { n = read(dir, sizeof(dir_t)); @@ -1169,19 +1188,23 @@ int8_t SdBaseFile::readDir(dir_t* dir) { dir_t* SdBaseFile::readDirCache() { uint8_t i; // error if not directory - if (!isDir()) goto fail; - + if (!isDir()) { + DBG_FAIL_MACRO; + goto fail; + } // index of entry in cache - i = (curPosition_ >> 5) & 0XF; + i = (m_curPosition >> 5) & 0XF; // use read to locate and cache block - if (read() < 0) goto fail; - + if (read() < 0) { + DBG_FAIL_MACRO; + goto fail; + } // advance to next entry - curPosition_ += 31; + m_curPosition += 31; // return pointer to entry - return vol_->cache()->dir + i; + return m_vol->cacheAddress()->dir + i; fail: return 0; @@ -1203,20 +1226,24 @@ dir_t* SdBaseFile::readDirCache() { bool SdBaseFile::remove() { dir_t* d; // free any clusters - will fail if read-only or directory - if (!truncate(0)) goto fail; - + if (!truncate(0)) { + DBG_FAIL_MACRO; + goto fail; + } // cache directory entry d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; - + if (!d) { + DBG_FAIL_MACRO; + goto fail; + } // mark entry deleted d->name[0] = DIR_NAME_DELETED; // set this file closed - type_ = FAT_FILE_TYPE_CLOSED; + m_type = FAT_FILE_TYPE_CLOSED; // write entry to SD - return vol_->cacheFlush(); + return m_vol->cacheSync(); return true; fail: @@ -1242,11 +1269,13 @@ bool SdBaseFile::remove() { */ bool SdBaseFile::remove(SdBaseFile* dirFile, const char* path) { SdBaseFile file; - if (!file.open(dirFile, path, O_WRITE)) goto fail; + if (!file.open(dirFile, path, O_WRITE)) { + DBG_FAIL_MACRO; + goto fail; + } return file.remove(); fail: - // can't set iostate - static function return false; } //------------------------------------------------------------------------------ @@ -1264,19 +1293,26 @@ bool SdBaseFile::rename(SdBaseFile* dirFile, const char* newPath) { dir_t entry; uint32_t dirCluster = 0; SdBaseFile file; + cache_t* pc; dir_t* d; // must be an open file or subdirectory - if (!(isFile() || isSubDir())) goto fail; - + if (!(isFile() || isSubDir())) { + DBG_FAIL_MACRO; + goto fail; + } // can't move file - if (vol_ != dirFile->vol_) goto fail; - + if (m_vol != dirFile->m_vol) { + DBG_FAIL_MACRO; + goto fail; + } // sync() and cache directory entry sync(); d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; - + if (!d) { + DBG_FAIL_MACRO; + goto fail; + } // save directory entry memcpy(&entry, d, sizeof(entry)); @@ -1294,45 +1330,60 @@ bool SdBaseFile::rename(SdBaseFile* dirFile, const char* newPath) { goto restore; } // save cluster containing new dot dot - dirCluster = file.firstCluster_; + dirCluster = file.m_firstCluster; } // change to new directory entry - dirBlock_ = file.dirBlock_; - dirIndex_ = file.dirIndex_; + m_dirBlock = file.m_dirBlock; + m_dirIndex = file.m_dirIndex; // mark closed to avoid possible destructor close call - file.type_ = FAT_FILE_TYPE_CLOSED; + file.m_type = FAT_FILE_TYPE_CLOSED; // cache new directory entry d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; - + if (!d) { + DBG_FAIL_MACRO; + goto fail; + } // copy all but name field to new directory entry memcpy(&d->attributes, &entry.attributes, sizeof(entry) - sizeof(d->name)); // update dot dot if directory if (dirCluster) { // get new dot dot - uint32_t block = vol_->clusterStartBlock(dirCluster); - if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_READ)) goto fail; - memcpy(&entry, &vol_->cache()->dir[1], sizeof(entry)); + uint32_t block = m_vol->clusterStartBlock(dirCluster); + pc = m_vol->cacheFetch(block, SdVolume::CACHE_FOR_READ); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + memcpy(&entry, &pc->dir[1], sizeof(entry)); // free unused cluster - if (!vol_->freeChain(dirCluster)) goto fail; - + if (!m_vol->freeChain(dirCluster)) { + DBG_FAIL_MACRO; + goto fail; + } // store new dot dot - block = vol_->clusterStartBlock(firstCluster_); - if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_WRITE)) goto fail; - memcpy(&vol_->cache()->dir[1], &entry, sizeof(entry)); + block = m_vol->clusterStartBlock(m_firstCluster); + pc = m_vol->cacheFetch(block, SdVolume::CACHE_FOR_WRITE); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + memcpy(&pc->dir[1], &entry, sizeof(entry)); } - return vol_->cacheFlush(); + return m_vol->cacheSync(); restore: d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; + if (!d) { + DBG_FAIL_MACRO; + goto fail; + } // restore entry d->name[0] = entry.name[0]; - vol_->cacheFlush(); + m_vol->cacheSync(); fail: return false; @@ -1355,24 +1406,32 @@ bool SdBaseFile::rename(SdBaseFile* dirFile, const char* newPath) { */ bool SdBaseFile::rmdir() { // must be open subdirectory - if (!isSubDir()) goto fail; - + if (!isSubDir()) { + DBG_FAIL_MACRO; + goto fail; + } rewind(); // make sure directory is empty - while (curPosition_ < fileSize_) { + while (m_curPosition < m_fileSize) { dir_t* p = readDirCache(); - if (!p) goto fail; + if (!p) { + DBG_FAIL_MACRO; + goto fail; + } // done if past last used entry if (p->name[0] == DIR_NAME_FREE) break; // skip empty slot, '.' or '..' if (p->name[0] == DIR_NAME_DELETED || p->name[0] == '.') continue; // error not empty - if (DIR_IS_FILE_OR_SUBDIR(p)) goto fail; + if (DIR_IS_FILE_OR_SUBDIR(p)) { + DBG_FAIL_MACRO; + goto fail; + } } // convert empty directory to normal file for remove - type_ = FAT_FILE_TYPE_NORMAL; - flags_ |= O_WRITE; + m_type = FAT_FILE_TYPE_NORMAL; + m_flags |= O_WRITE; return remove(); fail: @@ -1398,13 +1457,15 @@ bool SdBaseFile::rmRfStar() { uint16_t index; SdBaseFile f; rewind(); - while (curPosition_ < fileSize_) { + while (m_curPosition < m_fileSize) { // remember position - index = curPosition_/32; + index = m_curPosition/32; dir_t* p = readDirCache(); - if (!p) goto fail; - + if (!p) { + DBG_FAIL_MACRO; + goto fail; + } // done if past last entry if (p->name[0] == DIR_NAME_FREE) break; @@ -1414,23 +1475,38 @@ bool SdBaseFile::rmRfStar() { // skip if part of long file name or volume label in root if (!DIR_IS_FILE_OR_SUBDIR(p)) continue; - if (!f.open(this, index, O_READ)) goto fail; + if (!f.open(this, index, O_READ)) { + DBG_FAIL_MACRO; + goto fail; + } if (f.isSubDir()) { // recursively delete - if (!f.rmRfStar()) goto fail; + if (!f.rmRfStar()) { + DBG_FAIL_MACRO; + goto fail; + } } else { // ignore read-only - f.flags_ |= O_WRITE; - if (!f.remove()) goto fail; + f.m_flags |= O_WRITE; + if (!f.remove()) { + DBG_FAIL_MACRO; + goto fail; + } } // position to next entry if required - if (curPosition_ != (32*(index + 1))) { - if (!seekSet(32*(index + 1))) goto fail; + if (m_curPosition != (32UL*(index + 1))) { + if (!seekSet(32UL*(index + 1))) { + DBG_FAIL_MACRO; + goto fail; + } } } // don't try to delete root if (!isRoot()) { - if (!rmdir()) goto fail; + if (!rmdir()) { + DBG_FAIL_MACRO; + goto fail; + } } return true; @@ -1446,7 +1522,7 @@ bool SdBaseFile::rmRfStar() { * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t). */ SdBaseFile::SdBaseFile(const char* path, uint8_t oflag) { - type_ = FAT_FILE_TYPE_CLOSED; + m_type = FAT_FILE_TYPE_CLOSED; writeError = false; open(path, oflag); } @@ -1462,33 +1538,38 @@ bool SdBaseFile::seekSet(uint32_t pos) { uint32_t nCur; uint32_t nNew; // error if file not open or seek past end of file - if (!isOpen() || pos > fileSize_) goto fail; - - if (type_ == FAT_FILE_TYPE_ROOT_FIXED) { - curPosition_ = pos; + if (!isOpen() || pos > m_fileSize) { + DBG_FAIL_MACRO; + goto fail; + } + if (m_type == FAT_FILE_TYPE_ROOT_FIXED) { + m_curPosition = pos; goto done; } if (pos == 0) { // set position to start of file - curCluster_ = 0; - curPosition_ = 0; + m_curCluster = 0; + m_curPosition = 0; goto done; } // calculate cluster index for cur and new position - nCur = (curPosition_ - 1) >> (vol_->clusterSizeShift_ + 9); - nNew = (pos - 1) >> (vol_->clusterSizeShift_ + 9); + nCur = (m_curPosition - 1) >> (m_vol->clusterSizeShift() + 9); + nNew = (pos - 1) >> (m_vol->clusterSizeShift() + 9); - if (nNew < nCur || curPosition_ == 0) { + if (nNew < nCur || m_curPosition == 0) { // must follow chain from first cluster - curCluster_ = firstCluster_; + m_curCluster = m_firstCluster; } else { // advance from curPosition nNew -= nCur; } while (nNew--) { - if (!vol_->fatGet(curCluster_, &curCluster_)) goto fail; + if (!m_vol->fatGet(m_curCluster, &m_curCluster)) { + DBG_FAIL_MACRO; + goto fail; + } } - curPosition_ = pos; + m_curPosition = pos; done: return true; @@ -1497,9 +1578,32 @@ bool SdBaseFile::seekSet(uint32_t pos) { return false; } //------------------------------------------------------------------------------ -void SdBaseFile::setpos(fpos_t* pos) { - curPosition_ = pos->position; - curCluster_ = pos->cluster; +// set m_fileSize for a directory +bool SdBaseFile::setDirSize() { + uint16_t s = 0; + uint32_t cluster = m_firstCluster; + do { + if (!m_vol->fatGet(cluster, &cluster)) { + DBG_FAIL_MACRO; + goto fail; + } + s += m_vol->blocksPerCluster(); + // max size if a directory file is 4096 blocks + if (s >= 4096) { + DBG_FAIL_MACRO; + goto fail; + } + } while (!m_vol->isEOC(cluster)); + m_fileSize = 512L*s; + return true; + + fail: + return false; +} +//------------------------------------------------------------------------------ +void SdBaseFile::setpos(FatPos_t* pos) { + m_curPosition = pos->position; + m_curCluster = pos->cluster; } //------------------------------------------------------------------------------ /** The sync() call causes all modified data and directory fields @@ -1512,29 +1616,33 @@ void SdBaseFile::setpos(fpos_t* pos) { */ bool SdBaseFile::sync() { // only allow open files and directories - if (!isOpen()) goto fail; - - if (flags_ & F_FILE_DIR_DIRTY) { + if (!isOpen()) { + DBG_FAIL_MACRO; + goto fail; + } + if (m_flags & F_FILE_DIR_DIRTY) { dir_t* d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); // check for deleted by another open file object - if (!d || d->name[0] == DIR_NAME_DELETED) goto fail; - + if (!d || d->name[0] == DIR_NAME_DELETED) { + DBG_FAIL_MACRO; + goto fail; + } // do not set filesize for dir files - if (!isDir()) d->fileSize = fileSize_; + if (!isDir()) d->fileSize = m_fileSize; // update first cluster fields - d->firstClusterLow = firstCluster_ & 0XFFFF; - d->firstClusterHigh = firstCluster_ >> 16; + d->firstClusterLow = m_firstCluster & 0XFFFF; + d->firstClusterHigh = m_firstCluster >> 16; // set modify time if user supplied a callback date/time function - if (dateTime_) { - dateTime_(&d->lastWriteDate, &d->lastWriteTime); + if (m_dateTime) { + m_dateTime(&d->lastWriteDate, &d->lastWriteTime); d->lastAccessDate = d->lastWriteDate; } // clear directory dirty - flags_ &= ~F_FILE_DIR_DIRTY; + m_flags &= ~F_FILE_DIR_DIRTY; } - return vol_->cacheFlush(); + return m_vol->cacheSync(); fail: writeError = true; @@ -1557,14 +1665,20 @@ bool SdBaseFile::timestamp(SdBaseFile* file) { dir_t dir; // get timestamps - if (!file->dirEntry(&dir)) goto fail; - + if (!file->dirEntry(&dir)) { + DBG_FAIL_MACRO; + goto fail; + } // update directory fields - if (!sync()) goto fail; - + if (!sync()) { + DBG_FAIL_MACRO; + goto fail; + } d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; - + if (!d) { + DBG_FAIL_MACRO; + goto fail; + } // copy timestamps d->lastAccessDate = dir.lastAccessDate; d->creationDate = dir.creationDate; @@ -1574,7 +1688,7 @@ bool SdBaseFile::timestamp(SdBaseFile* file) { d->lastWriteTime = dir.lastWriteTime; // write back entry - return vol_->cacheFlush(); + return m_vol->cacheSync(); fail: return false; @@ -1629,14 +1743,19 @@ bool SdBaseFile::timestamp(uint8_t flags, uint16_t year, uint8_t month, || hour > 23 || minute > 59 || second > 59) { + DBG_FAIL_MACRO; goto fail; } // update directory entry - if (!sync()) goto fail; - + if (!sync()) { + DBG_FAIL_MACRO; + goto fail; + } d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; - + if (!d) { + DBG_FAIL_MACRO; + goto fail; + } dirDate = FAT_DATE(year, month, day); dirTime = FAT_TIME(hour, minute, second); if (flags & T_ACCESS) { @@ -1652,7 +1771,7 @@ bool SdBaseFile::timestamp(uint8_t flags, uint16_t year, uint8_t month, d->lastWriteDate = dirDate; d->lastWriteTime = dirTime; } - return vol_->cacheFlush(); + return m_vol->cacheSync(); fail: return false; @@ -1672,43 +1791,61 @@ bool SdBaseFile::timestamp(uint8_t flags, uint16_t year, uint8_t month, bool SdBaseFile::truncate(uint32_t length) { uint32_t newPos; // error if not a normal file or read-only - if (!isFile() || !(flags_ & O_WRITE)) goto fail; - + if (!isFile() || !(m_flags & O_WRITE)) { + DBG_FAIL_MACRO; + goto fail; + } // error if length is greater than current size - if (length > fileSize_) goto fail; - + if (length > m_fileSize) { + DBG_FAIL_MACRO; + goto fail; + } // fileSize and length are zero - nothing to do - if (fileSize_ == 0) return true; + if (m_fileSize == 0) return true; // remember position for seek after truncation - newPos = curPosition_ > length ? length : curPosition_; + newPos = m_curPosition > length ? length : m_curPosition; // position to last cluster in truncated file - if (!seekSet(length)) goto fail; - + if (!seekSet(length)) { + DBG_FAIL_MACRO; + goto fail; + } if (length == 0) { // free all clusters - if (!vol_->freeChain(firstCluster_)) goto fail; - firstCluster_ = 0; + if (!m_vol->freeChain(m_firstCluster)) { + DBG_FAIL_MACRO; + goto fail; + } + m_firstCluster = 0; } else { uint32_t toFree; - if (!vol_->fatGet(curCluster_, &toFree)) goto fail; - - if (!vol_->isEOC(toFree)) { + if (!m_vol->fatGet(m_curCluster, &toFree)) { + DBG_FAIL_MACRO; + goto fail; + } + if (!m_vol->isEOC(toFree)) { // free extra clusters - if (!vol_->freeChain(toFree)) goto fail; - + if (!m_vol->freeChain(toFree)) { + DBG_FAIL_MACRO; + goto fail; + } // current cluster is end of chain - if (!vol_->fatPutEOC(curCluster_)) goto fail; + if (!m_vol->fatPutEOC(m_curCluster)) { + DBG_FAIL_MACRO; + goto fail; + } } } - fileSize_ = length; + m_fileSize = length; // need to update directory entry - flags_ |= F_FILE_DIR_DIRTY; - - if (!sync()) goto fail; + m_flags |= F_FILE_DIR_DIRTY; + if (!sync()) { + DBG_FAIL_MACRO; + goto fail; + } // set file to correct position return seekSet(newPos); @@ -1731,87 +1868,152 @@ bool SdBaseFile::truncate(uint32_t length) { * for a read-only file, device is full, a corrupt file system or an I/O error. * */ -int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) { +int SdBaseFile::write(const void* buf, size_t nbyte) { // convert void* to uint8_t* - must be before goto statements const uint8_t* src = reinterpret_cast(buf); - + cache_t* pc; + uint8_t cacheOption; // number of bytes left to write - must be before goto statements - uint16_t nToWrite = nbyte; - + size_t nToWrite = nbyte; + size_t n; // error if not a normal file or is read-only - if (!isFile() || !(flags_ & O_WRITE)) goto fail; - + if (!isFile() || !(m_flags & O_WRITE)) { + DBG_FAIL_MACRO; + goto fail; + } // seek to end of file if append flag - if ((flags_ & O_APPEND) && curPosition_ != fileSize_) { - if (!seekEnd()) goto fail; + if ((m_flags & O_APPEND) && m_curPosition != m_fileSize) { + if (!seekEnd()) { + DBG_FAIL_MACRO; + goto fail; + } } - - while (nToWrite > 0) { - uint8_t blockOfCluster = vol_->blockOfCluster(curPosition_); - uint16_t blockOffset = curPosition_ & 0X1FF; + // Don't exceed max fileSize. + if (nbyte > (0XFFFFFFFF - m_curPosition)) { + DBG_FAIL_MACRO; + goto fail; + } + while (nToWrite) { + uint8_t blockOfCluster = m_vol->blockOfCluster(m_curPosition); + uint16_t blockOffset = m_curPosition & 0X1FF; if (blockOfCluster == 0 && blockOffset == 0) { // start of new cluster - if (curCluster_ != 0) { + if (m_curCluster != 0) { uint32_t next; - if (!vol_->fatGet(curCluster_, &next)) goto fail; - if (vol_->isEOC(next)) { + if (!m_vol->fatGet(m_curCluster, &next)) { + DBG_FAIL_MACRO; + goto fail; + } + if (m_vol->isEOC(next)) { // add cluster if at end of chain - if (!addCluster()) goto fail; + if (!addCluster()) { + DBG_FAIL_MACRO; + goto fail; + } } else { - curCluster_ = next; + m_curCluster = next; } } else { - if (firstCluster_ == 0) { + if (m_firstCluster == 0) { // allocate first cluster of file - if (!addCluster()) goto fail; + if (!addCluster()) { + DBG_FAIL_MACRO; + goto fail; + } } else { - curCluster_ = firstCluster_; + m_curCluster = m_firstCluster; } } } - // max space in block - uint16_t n = 512 - blockOffset; - - // lesser of space and amount to write - if (n > nToWrite) n = nToWrite; - // block for data write - uint32_t block = vol_->clusterStartBlock(curCluster_) + blockOfCluster; - if (n == 512) { - // full block - don't need to use cache - if (vol_->cacheBlockNumber() == block) { - // invalidate cache if block is in cache - vol_->cacheSetBlockNumber(0XFFFFFFFF, false); - } - if (!vol_->writeBlock(block, src)) goto fail; - } else { - if (blockOffset == 0 && curPosition_ >= fileSize_) { + uint32_t block = m_vol->clusterStartBlock(m_curCluster) + blockOfCluster; + + if (blockOffset != 0 || nToWrite < 512) { + // partial block - must use cache + if (blockOffset == 0 && m_curPosition >= m_fileSize) { // start of new block don't need to read into cache - if (!vol_->cacheFlush()) goto fail; - // set cache dirty and SD address of block - vol_->cacheSetBlockNumber(block, true); + cacheOption = SdVolume::CACHE_RESERVE_FOR_WRITE; } else { // rewrite part of block - if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_WRITE)) goto fail; + cacheOption = SdVolume::CACHE_FOR_WRITE; + } + pc = m_vol->cacheFetch(block, cacheOption); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; } - uint8_t* dst = vol_->cache()->data + blockOffset; + + // max space in block + uint16_t space = 512 - blockOffset; + + // lesser of space and amount to write + n = space < nToWrite ? space : nToWrite; + + uint8_t* dst = pc->data + blockOffset; memcpy(dst, src, n); + + // flush cache if all space used. + if (n == space) { + if (!m_vol->cacheWriteData()) { + DBG_FAIL_MACRO; + goto fail; + } + } + + } else if (!USE_MULTI_BLOCK_SD_IO || nToWrite < 1024) { + // use single block write command + n = 512; + if (m_vol->cacheBlockNumber() == block) { + m_vol->cacheInvalidate(); + } + if (!m_vol->writeBlock(block, src)) { + DBG_FAIL_MACRO; + goto fail; + } + } else { + // use multiple block write command + uint8_t maxBlocks = m_vol->blocksPerCluster() - blockOfCluster; + uint8_t nBlock = nToWrite >> 9; + if (nBlock > maxBlocks) nBlock = maxBlocks; + + n = 512*nBlock; + if (!m_vol->sdCard()->writeStart(block, nBlock)) { + DBG_FAIL_MACRO; + goto fail; + } + for (uint8_t b = 0; b < nBlock; b++) { + // invalidate cache if block is in cache + if ((block + b) == m_vol->cacheBlockNumber()) { + m_vol->cacheInvalidate(); + } + if (!m_vol->sdCard()->writeData(src + 512*b)) { + DBG_FAIL_MACRO; + goto fail; + } + } + if (!m_vol->sdCard()->writeStop()) { + DBG_FAIL_MACRO; + goto fail; + } } - curPosition_ += n; + m_curPosition += n; src += n; nToWrite -= n; } - if (curPosition_ > fileSize_) { + if (m_curPosition > m_fileSize) { // update fileSize and insure sync will update dir entry - fileSize_ = curPosition_; - flags_ |= F_FILE_DIR_DIRTY; - } else if (dateTime_ && nbyte) { + m_fileSize = m_curPosition; + m_flags |= F_FILE_DIR_DIRTY; + } else if (m_dateTime && nbyte) { // insure sync will update modified date and time - flags_ |= F_FILE_DIR_DIRTY; + m_flags |= F_FILE_DIR_DIRTY; } - if (flags_ & O_SYNC) { - if (!sync()) goto fail; + if (m_flags & O_SYNC) { + if (!sync()) { + DBG_FAIL_MACRO; + goto fail; + } } return nbyte; @@ -1820,8 +2022,3 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) { writeError = true; return -1; } -//------------------------------------------------------------------------------ -// suppress cpplint warnings with NOLINT comment -#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN) -void (*SdBaseFile::oldDateTime_)(uint16_t& date, uint16_t& time) = 0; // NOLINT -#endif // ALLOW_DEPRECATED_FUNCTIONS diff --git a/libs/SdFat-master/SdFat/SdBaseFile.h b/libs/SdFat-master/SdFat/SdBaseFile.h new file mode 100755 index 0000000..74bcaec --- /dev/null +++ b/libs/SdFat-master/SdFat/SdBaseFile.h @@ -0,0 +1,289 @@ +/* Arduino SdFat Library + * Copyright (C) 2012 by William Greiman + * + * This file is part of the Arduino SdFat Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdFat Library. If not, see + * . + */ +#ifndef SdBaseFile_h +#define SdBaseFile_h +/** + * \file + * \brief SdBaseFile class + */ +#ifdef __AVR__ +#include +#else // __AVR__ +#ifndef PGM_P +/** pointer to flash for ARM */ +#define PGM_P const char* +#endif // PGM_P +#ifndef PSTR +/** store literal string in flash for ARM */ +#define PSTR(x) (x) +#endif // PSTR +#ifndef pgm_read_byte +/** read 8-bits from flash for ARM */ +#define pgm_read_byte(addr) (*(const unsigned char*)(addr)) +#endif // pgm_read_byte +#ifndef pgm_read_word +/** read 16-bits from flash for ARM */ +#define pgm_read_word(addr) (*(const uint16_t*)(addr)) +#endif // pgm_read_word +#ifndef PROGMEM +/** store in flash for ARM */ +#define PROGMEM const +#endif // PROGMEM +#endif // __AVR__ +#include +#include +#include +#include +//------------------------------------------------------------------------------ +/** + * \struct FatPos_t + * \brief internal type for istream + * do not use in user apps + */ +struct FatPos_t { + /** stream position */ + uint32_t position; + /** cluster for position */ + uint32_t cluster; + FatPos_t() : position(0), cluster(0) {} +}; + +// values for m_type +/** This file has not been opened. */ +uint8_t const FAT_FILE_TYPE_CLOSED = 0; +/** A normal file */ +uint8_t const FAT_FILE_TYPE_NORMAL = 1; +/** A FAT12 or FAT16 root directory */ +uint8_t const FAT_FILE_TYPE_ROOT_FIXED = 2; +/** A FAT32 root directory */ +uint8_t const FAT_FILE_TYPE_ROOT32 = 3; +/** A subdirectory file*/ +uint8_t const FAT_FILE_TYPE_SUBDIR = 4; +/** Test value for directory type */ +uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED; + +//------------------------------------------------------------------------------ +/** + * \class SdBaseFile + * \brief Base class for SdFile with Print and C++ streams. + */ +class SdBaseFile { + public: + /** Create an instance. */ + SdBaseFile() : writeError(false), m_type(FAT_FILE_TYPE_CLOSED) {} + SdBaseFile(const char* path, uint8_t oflag); +#if DESTRUCTOR_CLOSES_FILE + ~SdBaseFile() {if(isOpen()) close();} +#endif // DESTRUCTOR_CLOSES_FILE + /** + * writeError is set to true if an error occurs during a write(). + * Set writeError to false before calling print() and/or write() and check + * for true after calls to print() and/or write(). + */ + bool writeError; + /** \return value of writeError */ + bool getWriteError() {return writeError;} + /** Set writeError to zero */ + void clearWriteError() {writeError = 0;} + //---------------------------------------------------------------------------- + // helpers for stream classes + /** get position for streams + * \param[out] pos struct to receive position + */ + void getpos(FatPos_t* pos); + /** set position for streams + * \param[out] pos struct with value for new position + */ + void setpos(FatPos_t* pos); + //---------------------------------------------------------------------------- + /** \return number of bytes available from yhe current position to EOF */ + uint32_t available() {return fileSize() - curPosition();} + bool close(); + bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock); + bool createContiguous(SdBaseFile* dirFile, + const char* path, uint32_t size); + /** \return The current cluster number for a file or directory. */ + uint32_t curCluster() const {return m_curCluster;} + /** \return The current position for a file or directory. */ + uint32_t curPosition() const {return m_curPosition;} + /** \return Current working directory */ + static SdBaseFile* cwd() {return m_cwd;} + /** Set the date/time callback function + * + * \param[in] dateTime The user's call back function. The callback + * function is of the form: + * + * \code + * void dateTime(uint16_t* date, uint16_t* time) { + * uint16_t year; + * uint8_t month, day, hour, minute, second; + * + * // User gets date and time from GPS or real-time clock here + * + * // return date using FAT_DATE macro to format fields + * *date = FAT_DATE(year, month, day); + * + * // return time using FAT_TIME macro to format fields + * *time = FAT_TIME(hour, minute, second); + * } + * \endcode + * + * Sets the function that is called when a file is created or when + * a file's directory entry is modified by sync(). All timestamps, + * access, creation, and modify, are set when a file is created. + * sync() maintains the last access date and last modify date/time. + * + * See the timestamp() function. + */ + static void dateTimeCallback( + void (*dateTime)(uint16_t* date, uint16_t* time)) { + m_dateTime = dateTime; + } + /** Cancel the date/time callback function. */ + static void dateTimeCallbackCancel() {m_dateTime = 0;} + bool dirEntry(dir_t* dir); + static void dirName(const dir_t& dir, char* name); + bool exists(const char* name); + int16_t fgets(char* str, int16_t num, char* delim = 0); + /** \return The total number of bytes in a file or directory. */ + uint32_t fileSize() const {return m_fileSize;} + /** \return The first cluster number for a file or directory. */ + uint32_t firstCluster() const {return m_firstCluster;} + bool getFilename(char* name); + /** \return True if this is a directory else false. */ + bool isDir() const {return m_type >= FAT_FILE_TYPE_MIN_DIR;} + /** \return True if this is a normal file else false. */ + bool isFile() const {return m_type == FAT_FILE_TYPE_NORMAL;} + /** \return True if this is an open file/directory else false. */ + bool isOpen() const {return m_type != FAT_FILE_TYPE_CLOSED;} + /** \return True if this is a subdirectory else false. */ + bool isSubDir() const {return m_type == FAT_FILE_TYPE_SUBDIR;} + /** \return True if this is the root directory. */ + bool isRoot() const { + return m_type == FAT_FILE_TYPE_ROOT_FIXED || m_type == FAT_FILE_TYPE_ROOT32; + } + void ls(Print* pr, uint8_t flags = 0, uint8_t indent = 0); + void ls(uint8_t flags = 0); + bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true); + // alias for backward compactability + bool makeDir(SdBaseFile* dir, const char* path) { + return mkdir(dir, path, false); + } + bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag); + bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag); + bool open(const char* path, uint8_t oflag = O_READ); + bool openNext(SdBaseFile* dirFile, uint8_t oflag); + bool openRoot(SdVolume* vol); + int peek(); + bool printCreateDateTime(Print* pr); + static void printFatDate(uint16_t fatDate); + static void printFatDate(Print* pr, uint16_t fatDate); + static void printFatTime(uint16_t fatTime); + static void printFatTime(Print* pr, uint16_t fatTime); + int printField(float value, char term, uint8_t prec = 2); + int printField(int16_t value, char term); + int printField(uint16_t value, char term); + int printField(int32_t value, char term); + int printField(uint32_t value, char term); + bool printModifyDateTime(Print* pr); + size_t printName(); + size_t printName(Print* pr); + size_t printFileSize(Print* pr); + int16_t read(); + int read(void* buf, size_t nbyte); + int8_t readDir(dir_t* dir); + static bool remove(SdBaseFile* dirFile, const char* path); + bool remove(); + /** Set the file's current position to zero. */ + void rewind() {seekSet(0);} + bool rename(SdBaseFile* dirFile, const char* newPath); + bool rmdir(); + // for backward compatibility + bool rmDir() {return rmdir();} + bool rmRfStar(); + /** Set the files position to current position + \a pos. See seekSet(). + * \param[in] offset The new position in bytes from the current position. + * \return true for success or false for failure. + */ + bool seekCur(int32_t offset) { + return seekSet(m_curPosition + offset); + } + /** Set the files position to end-of-file + \a offset. See seekSet(). + * \param[in] offset The new position in bytes from end-of-file. + * \return true for success or false for failure. + */ + bool seekEnd(int32_t offset = 0) {return seekSet(m_fileSize + offset);} + bool seekSet(uint32_t pos); + bool sync(); + bool timestamp(SdBaseFile* file); + bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, + uint8_t hour, uint8_t minute, uint8_t second); + /** Type of file. You should use isFile() or isDir() instead of type() + * if possible. + * + * \return The file or directory type. + */ + uint8_t type() const {return m_type;} + bool truncate(uint32_t size); + /** \return SdVolume that contains this file. */ + SdVolume* volume() const {return m_vol;} + int write(const void* buf, size_t nbyte); +//------------------------------------------------------------------------------ + private: + // allow SdFat to set m_cwd + friend class SdFat; + /** experimental don't use */ + bool openParent(SdBaseFile* dir); + + // private functions + bool addCluster(); + cache_t* addDirCluster(); + dir_t* cacheDirEntry(uint8_t action); + int8_t lsPrintNext(Print *pr, uint8_t flags, uint8_t indent); + static bool make83Name(const char* str, uint8_t* name, const char** ptr); + bool mkdir(SdBaseFile* parent, const uint8_t dname[11]); + bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag); + bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags); + dir_t* readDirCache(); + static void setCwd(SdBaseFile* cwd) {m_cwd = cwd;} + bool setDirSize(); + + // bits defined in m_flags + // should be 0X0F + static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC); + // sync of directory entry required + static uint8_t const F_FILE_DIR_DIRTY = 0X80; + + // global pointer to cwd dir + static SdBaseFile* m_cwd; + // data time callback function + static void (*m_dateTime)(uint16_t* date, uint16_t* time); + // private data + uint8_t m_flags; // See above for definition of m_flags bits + uint8_t m_type; // type of file see above for values + uint8_t m_dirIndex; // index of directory entry in dirBlock + SdVolume* m_vol; // volume where file is located + uint32_t m_curCluster; // cluster for current file position + uint32_t m_curPosition; // current file position in bytes from beginning + uint32_t m_dirBlock; // block for this files directory entry + uint32_t m_fileSize; // file size in bytes + uint32_t m_firstCluster; // first cluster of file +}; +#endif // SdBaseFile_h diff --git a/libs/SdFat-master/SdFat/SdBaseFilePrint.cpp b/libs/SdFat-master/SdFat/SdBaseFilePrint.cpp new file mode 100755 index 0000000..fbf5f5f --- /dev/null +++ b/libs/SdFat-master/SdFat/SdBaseFilePrint.cpp @@ -0,0 +1,351 @@ +/* Arduino SdFat Library + * Copyright (C) 2012 by William Greiman + * + * This file is part of the Arduino SdFat Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdFat Library. If not, see + * . + */ +#include +#include +//------------------------------------------------------------------------------ +/** List directory contents to stdOut. + * + * \param[in] flags The inclusive OR of + * + * LS_DATE - %Print file modification date + * + * LS_SIZE - %Print file size. + * + * LS_R - Recursive list of subdirectories. + */ +void SdBaseFile::ls(uint8_t flags) { + ls(SdFat::stdOut(), flags, 0); +} +//------------------------------------------------------------------------------ +/** List directory contents. + * + * \param[in] pr Print stream for list. + * + * \param[in] flags The inclusive OR of + * + * LS_DATE - %Print file modification date + * + * LS_SIZE - %Print file size. + * + * LS_R - Recursive list of subdirectories. + * + * \param[in] indent Amount of space before file name. Used for recursive + * list to indicate subdirectory level. + */ +void SdBaseFile::ls(Print* pr, uint8_t flags, uint8_t indent) { + if (!isDir()) { + pr->println(F("bad dir")); + return; + } + rewind(); + int8_t status; + while ((status = lsPrintNext(pr, flags, indent))) { + if (status > 1 && (flags & LS_R)) { + uint16_t index = curPosition()/32 - 1; + SdBaseFile s; + if (s.open(this, index, O_READ)) s.ls(pr, flags, indent + 2); + seekSet(32 * (index + 1)); + } + } +} +//------------------------------------------------------------------------------ +// saves 32 bytes on stack for ls recursion +// return 0 - EOF, 1 - normal file, or 2 - directory +int8_t SdBaseFile::lsPrintNext(Print *pr, uint8_t flags, uint8_t indent) { + dir_t dir; + uint8_t w = 0; + + while (1) { + if (read(&dir, sizeof(dir)) != sizeof(dir)) return 0; + if (dir.name[0] == DIR_NAME_FREE) return 0; + + // skip deleted entry and entries for . and .. + if (dir.name[0] != DIR_NAME_DELETED && dir.name[0] != '.' + && DIR_IS_FILE_OR_SUBDIR(&dir)) break; + } + // indent for dir level + for (uint8_t i = 0; i < indent; i++) pr->write(' '); + + // print name + for (uint8_t i = 0; i < 11; i++) { + if (dir.name[i] == ' ')continue; + if (i == 8) { + pr->write('.'); + w++; + } + pr->write(dir.name[i]); + w++; + } + if (DIR_IS_SUBDIR(&dir)) { + pr->write('/'); + w++; + } + if (flags & (LS_DATE | LS_SIZE)) { + while (w++ < 14) pr->write(' '); + } + // print modify date/time if requested + if (flags & LS_DATE) { + pr->write(' '); + printFatDate(pr, dir.lastWriteDate); + pr->write(' '); + printFatTime(pr, dir.lastWriteTime); + } + // print size if requested + if (!DIR_IS_SUBDIR(&dir) && (flags & LS_SIZE)) { + pr->write(' '); + pr->print(dir.fileSize); + } + pr->println(); + return DIR_IS_FILE(&dir) ? 1 : 2; +} +//------------------------------------------------------------------------------ +// print uint8_t with width 2 +static void print2u(Print* pr, uint8_t v) { + if (v < 10) pr->write('0'); + pr->print(v, DEC); +} +//------------------------------------------------------------------------------ +/** Print a file's creation date and time + * + * \param[in] pr Print stream for output. + * + * \return The value one, true, is returned for success and + * the value zero, false, is returned for failure. + */ +bool SdBaseFile::printCreateDateTime(Print* pr) { + dir_t dir; + if (!dirEntry(&dir)) { + DBG_FAIL_MACRO; + goto fail; + } + printFatDate(pr, dir.creationDate); + pr->write(' '); + printFatTime(pr, dir.creationTime); + return true; + + fail: + return false; +} +//------------------------------------------------------------------------------ +/** %Print a directory date field to stdOut. + * + * Format is yyyy-mm-dd. + * + * \param[in] fatDate The date field from a directory entry. + */ +void SdBaseFile::printFatDate(uint16_t fatDate) { + printFatDate(SdFat::stdOut(), fatDate); +} +//------------------------------------------------------------------------------ +/** %Print a directory date field. + * + * Format is yyyy-mm-dd. + * + * \param[in] pr Print stream for output. + * \param[in] fatDate The date field from a directory entry. + */ +void SdBaseFile::printFatDate(Print* pr, uint16_t fatDate) { + pr->print(FAT_YEAR(fatDate)); + pr->write('-'); + print2u(pr, FAT_MONTH(fatDate)); + pr->write('-'); + print2u(pr, FAT_DAY(fatDate)); +} +//------------------------------------------------------------------------------ +/** %Print a directory time field to stdOut. + * + * Format is hh:mm:ss. + * + * \param[in] fatTime The time field from a directory entry. + */ +void SdBaseFile::printFatTime(uint16_t fatTime) { + printFatTime(SdFat::stdOut(), fatTime); +} +//------------------------------------------------------------------------------ +/** %Print a directory time field. + * + * Format is hh:mm:ss. + * + * \param[in] pr Print stream for output. + * \param[in] fatTime The time field from a directory entry. + */ +void SdBaseFile::printFatTime(Print* pr, uint16_t fatTime) { + print2u(pr, FAT_HOUR(fatTime)); + pr->write(':'); + print2u(pr, FAT_MINUTE(fatTime)); + pr->write(':'); + print2u(pr, FAT_SECOND(fatTime)); +} +//------------------------------------------------------------------------------ +/** Template for SdBaseFile::printField() */ +template +static int printFieldT(SdBaseFile* file, char sign, Type value, char term) { + char buf[3*sizeof(Type) + 3]; + char* str = &buf[sizeof(buf)]; + + if (term) { + *--str = term; + if (term == '\n') { + *--str = '\r'; + } + } +#ifdef OLD_FMT + do { + Type m = value; + value /= 10; + *--str = '0' + m - 10*value; + } while (value); +#else // OLD_FMT + str = fmtDec(value, str); +#endif // OLD_FMT + if (sign) { + *--str = sign; + } + return file->write(str, &buf[sizeof(buf)] - str); +} +//------------------------------------------------------------------------------ +/** Print a number followed by a field terminator. + * \param[in] value The number to be printed. + * \param[in] term The field terminator. Use '\\n' for CR LF. + * \param[in] prec Number of digits after decimal point. + * \return The number of bytes written or -1 if an error occurs. + */ +int SdBaseFile::printField(float value, char term, uint8_t prec) { + char buf[24]; + char* str = &buf[sizeof(buf)]; + if (term) { + *--str = term; + if (term == '\n') { + *--str = '\r'; + } + } + str = fmtFloat(value, str, prec); + return write(str, buf + sizeof(buf) - str); +} +//------------------------------------------------------------------------------ +/** Print a number followed by a field terminator. + * \param[in] value The number to be printed. + * \param[in] term The field terminator. Use '\\n' for CR LF. + * \return The number of bytes written or -1 if an error occurs. + */ +int SdBaseFile::printField(uint16_t value, char term) { + return printFieldT(this, 0, value, term); +} +//------------------------------------------------------------------------------ +/** Print a number followed by a field terminator. + * \param[in] value The number to be printed. + * \param[in] term The field terminator. Use '\\n' for CR LF. + * \return The number of bytes written or -1 if an error occurs. + */ +int SdBaseFile::printField(int16_t value, char term) { + char sign = 0; + if (value < 0) { + sign = '-'; + value = -value; + } + return printFieldT(this, sign, (uint16_t)value, term); +} +//------------------------------------------------------------------------------ +/** Print a number followed by a field terminator. + * \param[in] value The number to be printed. + * \param[in] term The field terminator. Use '\\n' for CR LF. + * \return The number of bytes written or -1 if an error occurs. + */ +int SdBaseFile::printField(uint32_t value, char term) { + return printFieldT(this, 0, value, term); +} +//------------------------------------------------------------------------------ +/** Print a number followed by a field terminator. + * \param[in] value The number to be printed. + * \param[in] term The field terminator. Use '\\n' for CR LF. + * \return The number of bytes written or -1 if an error occurs. + */ +int SdBaseFile::printField(int32_t value, char term) { + char sign = 0; + if (value < 0) { + sign = '-'; + value = -value; + } + return printFieldT(this, sign, (uint32_t)value, term); +} +//------------------------------------------------------------------------------ +/** Print a file's modify date and time + * + * \param[in] pr Print stream for output. + * + * \return The value one, true, is returned for success and + * the value zero, false, is returned for failure. + */ +bool SdBaseFile::printModifyDateTime(Print* pr) { + dir_t dir; + if (!dirEntry(&dir)) { + DBG_FAIL_MACRO; + goto fail; + } + printFatDate(pr, dir.lastWriteDate); + pr->write(' '); + printFatTime(pr, dir.lastWriteTime); + return true; + + fail: + return false; +} +//------------------------------------------------------------------------------ +/** Print a file's name + * + * \param[in] pr Print stream for output. + * + * \return The value one, true, is returned for success and + * the value zero, false, is returned for failure. + */ +size_t SdBaseFile::printName(Print* pr) { + char name[13]; + if (!getFilename(name)) { + DBG_FAIL_MACRO; + goto fail; + } + return pr->print(name); + + fail: + return 0; +} +//------------------------------------------------------------------------------ +/** Print a file's name to stdOut + * + * \return The value one, true, is returned for success and + * the value zero, false, is returned for failure. + */ +size_t SdBaseFile::printName() { + return printName(SdFat::stdOut()); +} +//------------------------------------------------------------------------------ +/** Print a file's size. + * + * \param[in] pr Print stream for output. + * + * \return The value one, true, is returned for success and + * the value zero, false, is returned for failure. + */ +size_t SdBaseFile::printFileSize(Print* pr) { + char buf[10]; + char *ptr = fmtDec(fileSize(), buf + sizeof(buf)); + while (ptr > buf) *--ptr = ' '; + return pr->write(reinterpret_cast(buf), sizeof(buf)); +} diff --git a/libs/SdFatBeta20120108/SdFat/SdFat.cpp b/libs/SdFat-master/SdFat/SdFat.cpp similarity index 59% rename from libs/SdFatBeta20120108/SdFat/SdFat.cpp rename to libs/SdFat-master/SdFat/SdFat.cpp index 7d4c376..30c54c1 100755 --- a/libs/SdFatBeta20120108/SdFat/SdFat.cpp +++ b/libs/SdFat-master/SdFat/SdFat.cpp @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -18,43 +18,28 @@ * . */ #include - //------------------------------------------------------------------------------ #if USE_SERIAL_FOR_STD_OUT || !defined(UDR0) -Print* SdFat::stdOut_ = &Serial; +Print* SdFat::m_stdOut = &Serial; #else // USE_SERIAL_FOR_STD_OUT -#if ARDUINO < 100 -class DefaultSerial : public Print { - public: - void write(uint8_t b); -}; -void DefaultSerial::write(uint8_t b) { - while (((1 << UDRIE0) & UCSR0B) || !(UCSR0A & (1 << UDRE0))) {} - UDR0 = b; -} -#else // ARDUINO < 100 -class DefaultSerial : public Print { - public: - size_t write(uint8_t b); -}; -size_t DefaultSerial::write(uint8_t b) { - while (((1 << UDRIE0) & UCSR0B) || !(UCSR0A & (1 << UDRE0))) {} - UDR0 = b; - return 1; -} -#endif // ARDUINO < 100 -//------------------------------------------------------------------------------ -static DefaultSerial defaultStdOut; - -Print* SdFat::stdOut_ = &defaultStdOut;//&Serial; +#include +Print* SdFat::m_stdOut = &MiniSerial; #endif // USE_SERIAL_FOR_STD_OUT //------------------------------------------------------------------------------ -static void pstrPrint(PGM_P str) { - for (uint8_t c; (c = pgm_read_byte(str)); str++) SdFat::stdOut()->write(c); -} -static void pstrPrintln(PGM_P str) { - pstrPrint(str); - SdFat::stdOut()->println(); +/** + * Initialize an SdFat object. + * + * Initializes the SD card, SD volume, and root directory. + * + * \param[in] chipSelectPin SD chip select pin. See Sd2Card::init(). + * \param[in] sckDivisor value for SPI SCK divisor. See Sd2Card::init(). + * + * \return The value one, true, is returned for success and + * the value zero, false, is returned for failure. + */ +bool SdFat::begin(uint8_t chipSelectPin, uint8_t sckDivisor) { + return m_card.begin(chipSelectPin, sckDivisor) + && m_vol.init(&m_card) && chdir(1); } //------------------------------------------------------------------------------ /** Change a volume's working directory to root @@ -70,9 +55,9 @@ static void pstrPrintln(PGM_P str) { * the value zero, false, is returned for failure. */ bool SdFat::chdir(bool set_cwd) { - if (set_cwd) SdBaseFile::cwd_ = &vwd_; - vwd_.close(); - return vwd_.openRoot(&vol_); + if (set_cwd) SdBaseFile::setCwd(&m_vwd); + if (m_vwd.isOpen()) m_vwd.close(); + return m_vwd.openRoot(&m_vol); } //------------------------------------------------------------------------------ /** Change a volume's working directory @@ -97,11 +82,11 @@ bool SdFat::chdir(bool set_cwd) { */ bool SdFat::chdir(const char *path, bool set_cwd) { SdBaseFile dir; - if (path[0] == '/' && path[1] == '\0') return chdir(set_cwd); - if (!dir.open(&vwd_, path, O_READ)) goto fail; + dir.open(&m_vwd, path, O_READ); + // Check for correctly open directory. if (!dir.isDir()) goto fail; - vwd_ = dir; - if (set_cwd) SdBaseFile::cwd_ = &vwd_; + m_vwd = dir; + if (set_cwd) SdBaseFile::setCwd(&m_vwd); return true; fail: @@ -117,58 +102,7 @@ bool SdFat::chdir(const char *path, bool set_cwd) { * This is like the Windows/DOS \: command. */ void SdFat::chvol() { - SdBaseFile::cwd_ = &vwd_; -} -//------------------------------------------------------------------------------ -/** %Print any SD error code and halt. */ -void SdFat::errorHalt() { - errorPrint(); - while (1); -} -//------------------------------------------------------------------------------ -/** %Print msg, any SD error code, and halt. - * - * \param[in] msg Message to print. - */ -void SdFat::errorHalt(char const* msg) { - errorPrint(msg); - while (1); -} -//------------------------------------------------------------------------------ -/** %Print msg, any SD error code, and halt. - * - * \param[in] msg Message in program space (flash memory) to print. - */ -void SdFat::errorHalt_P(PGM_P msg) { - errorPrint_P(msg); - while (1); -} -//------------------------------------------------------------------------------ -/** %Print any SD error code. */ -void SdFat::errorPrint() { - if (!card_.errorCode()) return; - pstrPrint(PSTR("SD errorCode: 0X")); - stdOut_->println(card_.errorCode(), HEX); -} -//------------------------------------------------------------------------------ -/** %Print msg, any SD error code. - * - * \param[in] msg Message to print. - */ -void SdFat::errorPrint(char const* msg) { - pstrPrint(PSTR("error: ")); - stdOut_->println(msg); - errorPrint(); -} -//------------------------------------------------------------------------------ -/** %Print msg, any SD error code. - * - * \param[in] msg Message in program space (flash memory) to print. - */ -void SdFat::errorPrint_P(PGM_P msg) { - pstrPrint(PSTR("error: ")); - pstrPrintln(msg); - errorPrint(); + SdBaseFile::setCwd(&m_vwd); } //------------------------------------------------------------------------------ /** @@ -179,84 +113,42 @@ void SdFat::errorPrint_P(PGM_P msg) { * \return true if the file exists else false. */ bool SdFat::exists(const char* name) { - return vwd_.exists(name); + return m_vwd.exists(name); } //------------------------------------------------------------------------------ -/** - * Initialize an SdFat object. +/** List the directory contents of the volume working directory to stdOut. * - * Initializes the SD card, SD volume, and root directory. + * \param[in] flags The inclusive OR of * - * \param[in] sckRateID value for SPI SCK rate. See Sd2Card::init(). - * \param[in] chipSelectPin SD chip select pin. See Sd2Card::init(). + * LS_DATE - %Print file modification date * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool SdFat::init(uint8_t sckRateID, uint8_t chipSelectPin) { - return card_.init(sckRateID, chipSelectPin) && vol_.init(&card_) && chdir(1); -} -//------------------------------------------------------------------------------ -/** %Print error details and halt after SdFat::init() fails. */ -void SdFat::initErrorHalt() { - initErrorPrint(); - while (1); -} -//------------------------------------------------------------------------------ -/**Print message, error details, and halt after SdFat::init() fails. + * LS_SIZE - %Print file size. * - * \param[in] msg Message to print. + * LS_R - Recursive list of subdirectories. */ -void SdFat::initErrorHalt(char const *msg) { - stdOut_->println(msg); - initErrorHalt(); +void SdFat::ls(uint8_t flags) { + m_vwd.ls(m_stdOut, flags); } //------------------------------------------------------------------------------ -/**Print message, error details, and halt after SdFat::init() fails. +/** List the directory contents of the volume working directory to stdOut. * - * \param[in] msg Message in program space (flash memory) to print. - */ -void SdFat::initErrorHalt_P(PGM_P msg) { - pstrPrintln(msg); - initErrorHalt(); -} -//------------------------------------------------------------------------------ -/** Print error details after SdFat::init() fails. */ -void SdFat::initErrorPrint() { - if (card_.errorCode()) { - pstrPrintln(PSTR("Can't access SD card. Do not reformat.")); - if (card_.errorCode() == SD_CARD_ERROR_CMD0) { - pstrPrintln(PSTR("No card, wrong chip select pin, or SPI problem?")); - } - errorPrint(); - } else if (vol_.fatType() == 0) { - pstrPrintln(PSTR("Invalid format, reformat SD.")); - } else if (!vwd_.isOpen()) { - pstrPrintln(PSTR("Can't open root directory.")); - } else { - pstrPrintln(PSTR("No error found.")); - } -} -//------------------------------------------------------------------------------ -/**Print message and error details and halt after SdFat::init() fails. + * \param[in] path directory to list. * - * \param[in] msg Message to print. - */ -void SdFat::initErrorPrint(char const *msg) { - stdOut_->println(msg); - initErrorPrint(); -} -//------------------------------------------------------------------------------ -/**Print message and error details after SdFat::init() fails. + * \param[in] flags The inclusive OR of * - * \param[in] msg Message in program space (flash memory) to print. + * LS_DATE - %Print file modification date + * + * LS_SIZE - %Print file size. + * + * LS_R - Recursive list of subdirectories. */ -void SdFat::initErrorPrint_P(PGM_P msg) { - pstrPrintln(msg); - initErrorHalt(); +void SdFat::ls(const char* path, uint8_t flags) { + ls(m_stdOut, path, flags); } //------------------------------------------------------------------------------ -/** List the directory contents of the volume working directory to stdOut. +/** List the directory contents of the volume working directory. + * + * \param[in] pr Print stream for the list. * * \param[in] flags The inclusive OR of * @@ -266,13 +158,15 @@ void SdFat::initErrorPrint_P(PGM_P msg) { * * LS_R - Recursive list of subdirectories. */ -void SdFat::ls(uint8_t flags) { - vwd_.ls(stdOut_, flags); +void SdFat::ls(Print* pr, uint8_t flags) { + m_vwd.ls(pr, flags); } //------------------------------------------------------------------------------ -/** List the directory contents of the volume working directory. +/** List the directory contents of the volume working directory to stdOut. * - * \param[in] pr Print stream for list. + * \param[in] pr Print stream for the list. + * + * \param[in] path directory to list. * * \param[in] flags The inclusive OR of * @@ -282,8 +176,9 @@ void SdFat::ls(uint8_t flags) { * * LS_R - Recursive list of subdirectories. */ -void SdFat::ls(Print* pr, uint8_t flags) { - vwd_.ls(pr, flags); +void SdFat::ls(Print* pr, const char* path, uint8_t flags) { + SdBaseFile dir(path, O_READ); + dir.ls(pr, flags); } //------------------------------------------------------------------------------ /** Make a subdirectory in the volume working directory. @@ -297,7 +192,7 @@ void SdFat::ls(Print* pr, uint8_t flags) { */ bool SdFat::mkdir(const char* path, bool pFlag) { SdBaseFile sub; - return sub.mkdir(&vwd_, path, pFlag); + return sub.mkdir(&m_vwd, path, pFlag); } //------------------------------------------------------------------------------ /** Remove a file from the volume working directory. @@ -308,7 +203,7 @@ bool SdFat::mkdir(const char* path, bool pFlag) { * the value zero, false, is returned for failure. */ bool SdFat::remove(const char* path) { - return SdBaseFile::remove(&vwd_, path); + return SdBaseFile::remove(&m_vwd, path); } //------------------------------------------------------------------------------ /** Rename a file or subdirectory. @@ -329,7 +224,7 @@ bool SdFat::remove(const char* path) { bool SdFat::rename(const char *oldPath, const char *newPath) { SdBaseFile file; if (!file.open(oldPath, O_READ)) return false; - return file.rename(&vwd_, newPath); + return file.rename(&m_vwd, newPath); } //------------------------------------------------------------------------------ /** Remove a subdirectory from the volume's working directory. diff --git a/libs/SdFatBeta20120108/SdFat/SdFat.h b/libs/SdFat-master/SdFat/SdFat.h similarity index 61% rename from libs/SdFatBeta20120108/SdFat/SdFat.h rename to libs/SdFat-master/SdFat/SdFat.h index 019108f..535f6d9 100755 --- a/libs/SdFatBeta20120108/SdFat/SdFat.h +++ b/libs/SdFat-master/SdFat/SdFat.h @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -23,12 +23,23 @@ * \file * \brief SdFat class */ +//------------------------------------------------------------------------------ +/** Macro for debug. */ +#define DBG_FAIL_MACRO // Serial.print(__FILE__);Serial.println(__LINE__) +//------------------------------------------------------------------------------ +/** SdFat version YYYYMMDD */ +#define SD_FAT_VERSION 20141111 +//------------------------------------------------------------------------------ +/** error if old IDE */ +#if !defined(ARDUINO) || ARDUINO < 100 +#error Arduino IDE must be 1.0 or greater +#endif // ARDUINO < 100 +//------------------------------------------------------------------------------ #include #include +#include #include -//------------------------------------------------------------------------------ -/** SdFat version YYYYMMDD */ -#define SD_FAT_VERSION 20120108 +#include //------------------------------------------------------------------------------ /** * \class SdFat @@ -38,50 +49,64 @@ class SdFat { public: SdFat() {} /** \return a pointer to the Sd2Card object. */ - Sd2Card* card() {return &card_;} + Sd2Card* card() {return &m_card;} bool chdir(bool set_cwd = false); bool chdir(const char* path, bool set_cwd = false); void chvol(); void errorHalt(); - void errorHalt_P(PGM_P msg); void errorHalt(char const *msg); void errorPrint(); - void errorPrint_P(PGM_P msg); void errorPrint(char const *msg); bool exists(const char* name); - bool init(uint8_t sckRateID = SPI_FULL_SPEED, - uint8_t chipSelectPin = SD_CHIP_SELECT_PIN); + bool begin(uint8_t chipSelectPin = SD_CHIP_SELECT_PIN, + uint8_t sckDivisor = SPI_FULL_SPEED); void initErrorHalt(); void initErrorHalt(char const *msg); - void initErrorHalt_P(PGM_P msg); void initErrorPrint(); void initErrorPrint(char const *msg); - void initErrorPrint_P(PGM_P msg); void ls(uint8_t flags = 0); + void ls(const char* path, uint8_t flags = 0); void ls(Print* pr, uint8_t flags = 0); + void ls(Print* pr, const char* path, uint8_t flags = 0); bool mkdir(const char* path, bool pFlag = true); bool remove(const char* path); bool rename(const char *oldPath, const char *newPath); bool rmdir(const char* path); - bool truncate(const char* path, uint32_t length); /** \return a pointer to the SdVolume object. */ - SdVolume* vol() {return &vol_;} + SdVolume* vol() {return &m_vol;} /** \return a pointer to the volume working directory. */ - SdBaseFile* vwd() {return &vwd_;} + SdBaseFile* vwd() {return &m_vwd;} + //---------------------------------------------------------------------------- + void errorHalt_P(PGM_P msg); + void errorPrint_P(PGM_P msg); + void initErrorHalt_P(PGM_P msg); + void initErrorPrint_P(PGM_P msg); //---------------------------------------------------------------------------- - // static functions for stdOut /** * Set stdOut Print stream for messages. * \param[in] stream The new Print stream. */ - static void setStdOut(Print* stream) {stdOut_ = stream;} + static void setStdOut(Print* stream) {m_stdOut = stream;} /** \return Print stream for messages. */ - static Print* stdOut() {return stdOut_;} + static Print* stdOut() {return m_stdOut;} + //---------------------------------------------------------------------------- + /** open a file + * + * \param[in] path location of file to be opened. + * \param[in] mode open mode flags. + * \return a File object. + */ + File open(const char *path, uint8_t mode = FILE_READ) { + File tmpFile; + tmpFile.open(&m_vwd, path, mode); + return tmpFile; + } + private: - Sd2Card card_; - SdVolume vol_; - SdBaseFile vwd_; - static Print* stdOut_; + Sd2Card m_card; + SdVolume m_vol; + SdBaseFile m_vwd; + static Print* m_stdOut; }; #endif // SdFat_h diff --git a/libs/SdFat-master/SdFat/SdFatConfig.h b/libs/SdFat-master/SdFat/SdFatConfig.h new file mode 100755 index 0000000..376eb5a --- /dev/null +++ b/libs/SdFat-master/SdFat/SdFatConfig.h @@ -0,0 +1,205 @@ +/* Arduino SdFat Library + * Copyright (C) 2012 by William Greiman + * + * This file is part of the Arduino SdFat Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdFat Library. If not, see + * . + */ +/** + * \file + * \brief configuration definitions + */ +#ifndef SdFatConfig_h +#define SdFatConfig_h +#include +#ifdef __AVR__ +#include +#endif // __AVR__ +//------------------------------------------------------------------------------ +/** + * Set SD_FILE_USES_STREAM nonzero to use Stream instead of Print for SdFile. + * Using Stream will use more flash and may cause compatibility problems + * with code written for older versions of SdFat. + */ +#define SD_FILE_USES_STREAM 0 + +//------------------------------------------------------------------------------ +/** + * To enable SD card CRC checking set USE_SD_CRC nonzero. + * + * Set USE_SD_CRC to 1 to use a smaller slower CRC-CCITT function. + * + * Set USE_SD_CRC to 2 to used a larger faster table driven CRC-CCITT function. + */ +#define USE_SD_CRC 0 +//------------------------------------------------------------------------------ +/** + * To use multiple SD cards set USE_MULTIPLE_CARDS nonzero. + * + * Using multiple cards costs about 200 bytes of flash. + * + * Each card requires about 550 bytes of SRAM so use of a Mega is recommended. + */ +#define USE_MULTIPLE_CARDS 0 +//------------------------------------------------------------------------------ +/** + * Set DESTRUCTOR_CLOSES_FILE nonzero to close a file in its destructor. + * + * Causes use of lots of heap in ARM. + */ +#define DESTRUCTOR_CLOSES_FILE 0 +//------------------------------------------------------------------------------ +/** + * For AVR + * + * Set USE_SERIAL_FOR_STD_OUT nonzero to use Serial (the HardwareSerial class) + * for error messages and output from print functions like ls(). + * + * If USE_SERIAL_FOR_STD_OUT is zero, a small non-interrupt driven class + * is used to output messages to serial port zero. This allows an alternate + * Serial library like SerialPort to be used with SdFat. + * + * You can redirect stdOut with SdFat::setStdOut(Print* stream) and + * get the current stream with SdFat::stdOut(). + */ +#define USE_SERIAL_FOR_STD_OUT 0 +//------------------------------------------------------------------------------ +/** + * Set FAT12_SUPPORT nonzero to enable use if FAT12 volumes. + * FAT12 has not been well tested and requires additional flash. + */ +#define FAT12_SUPPORT 0 +//------------------------------------------------------------------------------ +/** + * Set ENABLE_SPI_TRANSACTION nonzero to enable the SPI transaction feature + * of the standard Arduino SPI library. You must include SPI.h in your + * sketches when ENABLE_SPI_TRANSACTION is nonzero. + */ +#define ENABLE_SPI_TRANSACTION 0 +//------------------------------------------------------------------------------ +/** + * Set ENABLE_SPI_YIELD nonzero to enable release of the SPI bus during + * SD card busy waits. + * + * This will allow interrupt routines to access the SPI bus if + * ENABLE_SPI_TRANSACTION is nonzero. + * + * Setting ENABLE_SPI_YIELD will introduce some extra overhead and will + * slightly slow transfer rates. A few older SD cards may fail when + * ENABLE_SPI_YIELD is nonzero. + */ +#define ENABLE_SPI_YIELD 0 +//------------------------------------------------------------------------------ +/** + * Set USE_ARDUINO_SPI_LIBRARY nonzero to force use of Arduino Standard + * SPI library. This will override native and software SPI for all boards. + */ +#define USE_ARDUINO_SPI_LIBRARY 0 +//------------------------------------------------------------------------------ +/** + * Set AVR_SOFT_SPI nonzero to use software SPI on all AVR Arduinos. + */ +#define AVR_SOFT_SPI 0 +//------------------------------------------------------------------------------ +/** + * Set DUE_SOFT_SPI nonzero to use software SPI on Due Arduinos. + */ +#define DUE_SOFT_SPI 0 +//------------------------------------------------------------------------------ + +/** + * Set LEONARDO_SOFT_SPI nonzero to use software SPI on Leonardo Arduinos. + * LEONARDO_SOFT_SPI allows an unmodified 328 Shield to be used + * on Leonardo Arduinos. + */ +#define LEONARDO_SOFT_SPI 0 +//------------------------------------------------------------------------------ +/** + * Set MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos. + * MEGA_SOFT_SPI allows an unmodified 328 Shield to be used + * on Mega Arduinos. + */ +#define MEGA_SOFT_SPI 0 +//------------------------------------------------------------------------------ +/** + * Set TEENSY3_SOFT_SPI nonzero to use software SPI on Teensy 3.x boards. + */ +#define TEENSY3_SOFT_SPI 0 +//------------------------------------------------------------------------------ +/** + * Define software SPI pins. Default allows Uno shields to be used on other + * boards. + */ +// define software SPI pins +/** Default Software SPI chip select pin */ +uint8_t const SOFT_SPI_CS_PIN = 10; +/** Software SPI Master Out Slave In pin */ +uint8_t const SOFT_SPI_MOSI_PIN = 11; +/** Software SPI Master In Slave Out pin */ +uint8_t const SOFT_SPI_MISO_PIN = 12; +/** Software SPI Clock pin */ +uint8_t const SOFT_SPI_SCK_PIN = 13; +//------------------------------------------------------------------------------ +/** + * Call flush for endl if ENDL_CALLS_FLUSH is nonzero + * + * The standard for iostreams is to call flush. This is very costly for + * SdFat. Each call to flush causes 2048 bytes of I/O to the SD. + * + * SdFat has a single 512 byte buffer for SD I/O so it must write the current + * data block to the SD, read the directory block from the SD, update the + * directory entry, write the directory block to the SD and read the data + * block back into the buffer. + * + * The SD flash memory controller is not designed for this many rewrites + * so performance may be reduced by more than a factor of 100. + * + * If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force + * all data to be written to the SD. + */ +#define ENDL_CALLS_FLUSH 0 +//------------------------------------------------------------------------------ +/** + * SPI SCK divisor for SD initialization commands. + * or greater + */ +#ifdef __AVR__ +const uint8_t SPI_SCK_INIT_DIVISOR = 64; +#else +const uint8_t SPI_SCK_INIT_DIVISOR = 128; +#endif +//------------------------------------------------------------------------------ +/** + * Set USE_SEPARATE_FAT_CACHE nonzero to use a second 512 byte cache + * for FAT table entries. Improves performance for large writes that + * are not a multiple of 512 bytes. + */ +#ifdef __arm__ +#define USE_SEPARATE_FAT_CACHE 1 +#else // __arm__ +#define USE_SEPARATE_FAT_CACHE 0 +#endif // __arm__ +//------------------------------------------------------------------------------ +/** + * Set USE_MULTI_BLOCK_SD_IO nonzero to use multi-block SD read/write. + * + * Don't use mult-block read/write on small AVR boards. + */ +#if defined(RAMEND) && RAMEND < 3000 +#define USE_MULTI_BLOCK_SD_IO 0 +#else // RAMEND +#define USE_MULTI_BLOCK_SD_IO 1 +#endif // RAMEND +#endif // SdFatConfig_h diff --git a/libs/SdFat-master/SdFat/SdFatErrorPrint.cpp b/libs/SdFat-master/SdFat/SdFatErrorPrint.cpp new file mode 100755 index 0000000..9240301 --- /dev/null +++ b/libs/SdFat-master/SdFat/SdFatErrorPrint.cpp @@ -0,0 +1,145 @@ +/* Arduino SdFat Library + * Copyright (C) 2012 by William Greiman + * + * This file is part of the Arduino SdFat Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdFat Library. If not, see + * . + */ +#include +#ifndef PSTR +#define PSTR(x) x +#define PGM_P const char* +#endif +//------------------------------------------------------------------------------ +static void pstrPrint(PGM_P str) { + for (uint8_t c; (c = pgm_read_byte(str)); str++) SdFat::stdOut()->write(c); +} +//------------------------------------------------------------------------------ +static void pstrPrintln(PGM_P str) { + pstrPrint(str); + SdFat::stdOut()->println(); +} +//------------------------------------------------------------------------------ +/** %Print any SD error code and halt. */ +void SdFat::errorHalt() { + errorPrint(); + while (1) {} +} +//------------------------------------------------------------------------------ +/** %Print msg, any SD error code, and halt. + * + * \param[in] msg Message to print. + */ +void SdFat::errorHalt(char const* msg) { + errorPrint(msg); + while (1) {} +} +//------------------------------------------------------------------------------ +/** %Print msg, any SD error code, and halt. + * + * \param[in] msg Message in program space (flash memory) to print. + */ +void SdFat::errorHalt_P(PGM_P msg) { + errorPrint_P(msg); + while (1) {} +} +//------------------------------------------------------------------------------ +/** %Print any SD error code. */ +void SdFat::errorPrint() { + if (!m_card.errorCode()) return; + pstrPrint(PSTR("SD errorCode: 0X")); + m_stdOut->print(m_card.errorCode(), HEX); + pstrPrint(PSTR(",0X")); + m_stdOut->println(m_card.errorData(), HEX); +} +//------------------------------------------------------------------------------ +/** %Print msg, any SD error code. + * + * \param[in] msg Message to print. + */ +void SdFat::errorPrint(char const* msg) { + pstrPrint(PSTR("error: ")); + m_stdOut->println(msg); + errorPrint(); +} +//------------------------------------------------------------------------------ +/** %Print msg, any SD error code. + * + * \param[in] msg Message in program space (flash memory) to print. + */ +void SdFat::errorPrint_P(PGM_P msg) { + pstrPrint(PSTR("error: ")); + pstrPrintln(msg); + errorPrint(); +} +//------------------------------------------------------------------------------ +/** %Print error details and halt after SdFat::init() fails. */ +void SdFat::initErrorHalt() { + initErrorPrint(); + while (1) {} +} +//------------------------------------------------------------------------------ +/**Print message, error details, and halt after SdFat::init() fails. + * + * \param[in] msg Message to print. + */ +void SdFat::initErrorHalt(char const *msg) { + m_stdOut->println(msg); + initErrorHalt(); +} +//------------------------------------------------------------------------------ +/**Print message, error details, and halt after SdFat::init() fails. + * + * \param[in] msg Message in program space (flash memory) to print. + */ +void SdFat::initErrorHalt_P(PGM_P msg) { + pstrPrintln(msg); + initErrorHalt(); +} +//------------------------------------------------------------------------------ +/** Print error details after SdFat::init() fails. */ +void SdFat::initErrorPrint() { + if (m_card.errorCode()) { + pstrPrintln(PSTR("Can't access SD card. Do not reformat.")); + if (m_card.errorCode() == SD_CARD_ERROR_CMD0) { + pstrPrintln(PSTR("No card, wrong chip select pin, or SPI problem?")); + } + errorPrint(); + } else if (m_vol.fatType() == 0) { + pstrPrintln(PSTR("Invalid format, reformat SD.")); + } else if (!m_vwd.isOpen()) { + pstrPrintln(PSTR("Can't open root directory.")); + } else { + pstrPrintln(PSTR("No error found.")); + } +} +//------------------------------------------------------------------------------ +/**Print message and error details and halt after SdFat::init() fails. + * + * \param[in] msg Message to print. + */ +void SdFat::initErrorPrint(char const *msg) { + m_stdOut->println(msg); + initErrorPrint(); +} +//------------------------------------------------------------------------------ +/**Print message and error details after SdFat::init() fails. + * + * \param[in] msg Message in program space (flash memory) to print. + */ +void SdFat::initErrorPrint_P(PGM_P msg) { + pstrPrintln(msg); + initErrorHalt(); +} diff --git a/libs/SdFatBeta20120108/SdFat/SdFatUtil.cpp b/libs/SdFat-master/SdFat/SdFatUtil.cpp similarity index 81% rename from libs/SdFatBeta20120108/SdFat/SdFatUtil.cpp rename to libs/SdFat-master/SdFat/SdFatUtil.cpp index 96ad149..b0b2aa8 100755 --- a/libs/SdFatBeta20120108/SdFat/SdFatUtil.cpp +++ b/libs/SdFat-master/SdFat/SdFatUtil.cpp @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2008 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -17,26 +17,27 @@ * along with the Arduino SdFat Library. If not, see * . */ +#include #include #include +#ifdef __arm__ +// should use uinstd.h to define sbrk but Due causes a conflict +extern "C" char* sbrk(int incr); +#else // __ARM__ +extern char *__brkval; +extern char __bss_end; +#endif // __arm__ //------------------------------------------------------------------------------ /** Amount of free RAM * \return The number of free bytes. */ int SdFatUtil::FreeRam() { - extern int __bss_end; - extern int* __brkval; - int free_memory; - if (reinterpret_cast(__brkval) == 0) { - // if no heap use from end of bss section - free_memory = reinterpret_cast(&free_memory) - - reinterpret_cast(&__bss_end); - } else { - // use from top of stack to heap - free_memory = reinterpret_cast(&free_memory) - - reinterpret_cast(__brkval); - } - return free_memory; + char top; +#ifdef __arm__ + return &top - reinterpret_cast(sbrk(0)); +#else // __arm__ + return __brkval ? &top - __brkval : &top - &__bss_end; +#endif // __arm__ } //------------------------------------------------------------------------------ /** %Print a string in flash memory. diff --git a/libs/SdFatBeta20120108/SdFat/SdFatUtil.h b/libs/SdFat-master/SdFat/SdFatUtil.h similarity index 88% rename from libs/SdFatBeta20120108/SdFat/SdFatUtil.h rename to libs/SdFat-master/SdFat/SdFatUtil.h index 7c4064f..54dbab6 100755 --- a/libs/SdFatBeta20120108/SdFat/SdFatUtil.h +++ b/libs/SdFat-master/SdFat/SdFatUtil.h @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2008 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -23,12 +23,7 @@ * \file * \brief Useful utility functions. */ -#include -#if ARDUINO < 100 -#include -#else // ARDUINO -#include -#endif // ARDUINO +#include /** Store and print a string in flash memory.*/ #define PgmPrint(x) SerialPrint_P(PSTR(x)) /** Store and print a string in flash memory followed by a CR/LF.*/ @@ -41,6 +36,5 @@ namespace SdFatUtil { void SerialPrint_P(PGM_P str); void SerialPrintln_P(PGM_P str); } - using namespace SdFatUtil; // NOLINT #endif // #define SdFatUtil_h diff --git a/libs/SdFat-master/SdFat/SdFatmainpage.h b/libs/SdFat-master/SdFat/SdFatmainpage.h new file mode 100755 index 0000000..cbad290 --- /dev/null +++ b/libs/SdFat-master/SdFat/SdFatmainpage.h @@ -0,0 +1,264 @@ +/* Arduino SdFat Library + * Copyright (C) 2012 by William Greiman + * + * This file is part of the Arduino SdFat Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdFat Library. If not, see + * . + */ + +/** +\mainpage Arduino %SdFat Library +
Copyright © 2012, 2013, 2014 by William Greiman +
+ +\section Intro Introduction +The Arduino %SdFat Library is a minimal implementation of FAT16 and FAT32 +file systems on SD flash memory cards. Standard SD and high capacity SDHC +cards are supported. + +Experimental support for FAT12 can be enabled by setting FAT12_SUPPORT +nonzero in SdFatConfig.h. + +The %SdFat library only supports short 8.3 names. + +The main classes in %SdFat are SdFat, SdBaseFile, SdFile, File, StdioStream, +\ref fstream, \ref ifstream, and \ref ofstream. + +The SdFat class maintains a FAT volume, a current working directory, +and simplifies initialization of other classes. + +The SdBaseFile class provides basic file access functions such as open(), +binary read(), binary write(), close(), remove(), and sync(). SdBaseFile +is the smallest file class. + +The SdFile class has all the SdBaseFile class functions plus the Arduino +Print class functions. + +The File class has all the SdBaseFile functions plus the functions in +the Arduino SD.h File class. This provides compatibility with the +Arduino SD.h library. + +The StdioStream class implements functions similar to Linux/Unix standard +buffered input/output. + +The \ref fstream class implements C++ iostreams for both reading and writing +text files. + +The \ref ifstream class implements C++ iostreams for reading text files. + +The \ref ofstream class implements C++ iostreams for writing text files. + +The classes \ref ibufstream and \ref obufstream format and parse character + strings in memory buffers. + +the classes ArduinoInStream and ArduinoOutStream provide iostream functions +for Serial, LiquidCrystal, and other devices. + +A number of example are provided in the %SdFat/examples folder. These were +developed to test %SdFat and illustrate its use. + +\section Install Installation + +You must manually install SdFat by copying the SdFat folder from the download +package to the Arduino libraries folder in you sketch book. + +See the Manual installation section of this guide. + +http://arduino.cc/en/Guide/Libraries + +\section SDconfig SdFat Configuration + +Several configuration options may be changed by editing the SdFatConfig.h +file in the SdFat folder. + +Set SD_FILE_USES_STREAM nonzero to use Stream instead of Print for SdFile. +Using Stream will use more flash. + +To enable SD card CRC checking set USE_SD_CRC nonzero. + +To use multiple SD cards set USE_MULTIPLE_CARDS nonzero. + +Set FAT12_SUPPORT nonzero to enable use of FAT12 volumes. +FAT12 has not been well tested and requires additional flash. + +Set USE_ARDUINO_SPI_LIBRARY nonzero to force use of Arduino Standard +SPI library. This will override native and software SPI for all boards. + +Use of software SPI can be enabled for selected boards by setting the symbols +AVR_SOFT_SPI, DUE_SOFT_SPI, LEONARDO_SOFT_SPI, MEGA_SOFT_SPI, +and TEENSY3_SOFT_SPI. + +Set ENABLE_SPI_TRANSACTION nonzero to enable the SPI transaction feature +of the standard Arduino SPI library. You must include SPI.h in your +sketches when ENABLE_SPI_TRANSACTION is nonzero. + +Set ENABLE_SPI_YIELD nonzero to enable release of the SPI bus during +SD card busy waits. + +\section SDcard SD\SDHC Cards + +Arduinos access SD cards using the cards SPI protocol. PCs, Macs, and +most consumer devices use the 4-bit parallel SD protocol. A card that +functions well on A PC or Mac may not work well on the Arduino. + +Most cards have good SPI read performance but cards vary widely in SPI +write performance. Write performance is limited by how efficiently the +card manages internal erase/remapping operations. The Arduino cannot +optimize writes to reduce erase operations because of its limit RAM. + +SanDisk cards generally have good write performance. They seem to have +more internal RAM buffering than other cards and therefore can limit +the number of flash erase operations that the Arduino forces due to its +limited RAM. + +\section Hardware Hardware Configuration + +%SdFat was developed using an + Adafruit Industries +Data Logging Shield. + +The hardware interface to the SD card should not use a resistor based level +shifter. %SdFat sets the SPI bus frequency to 8 MHz which results in signal +rise times that are too slow for the edge detectors in many newer SD card +controllers when resistor voltage dividers are used. + +The 5 to 3.3 V level shifter for 5 V Arduinos should be IC based like the +74HC4050N based circuit shown in the file SdLevel.png. The Adafruit Wave Shield +uses a 74AHC125N. Gravitech sells SD and MicroSD Card Adapters based on the +74LCX245. + +If you are using a resistor based level shifter and are having problems try +setting the SPI bus frequency to 4 MHz. This can be done by using +card.init(SPI_HALF_SPEED) to initialize the SD card. + +\section comment Bugs and Comments + +If you wish to report bugs or have comments, send email to fat16lib@sbcglobal.net. + +\section SdFatClass SdFat Usage + +%SdFat uses a slightly restricted form of short names. +Short names are limited to 8 characters followed by an optional period (.) +and extension of up to 3 characters. The characters may be any combination +of letters and digits. The following special characters are also allowed: + +$ % ' - _ @ ~ ` ! ( ) { } ^ # & + +Short names are always converted to upper case and their original case +value is lost. + +An application which writes to a file using print(), println() or +\link SdFile::write write() \endlink must call \link SdFile::sync() sync() \endlink +at the appropriate time to force data and directory information to be written +to the SD Card. Data and directory information are also written to the SD card +when \link SdFile::close() close() \endlink is called. + +Applications must use care calling \link SdFile::sync() sync() \endlink +since 2048 bytes of I/O is required to update file and +directory information. This includes writing the current data block, reading +the block that contains the directory entry for update, writing the directory +block back and reading back the current data block. + +It is possible to open a file with two or more instances of a file object. +A file may be corrupted if data is written to the file by more than one +instance of a file object. + +\section HowTo How to format SD Cards as FAT Volumes + +The best way to restore an SD card's format on a PC or Mac is to use +SDFormatter which can be downloaded from: + +http://www.sdcard.org/downloads + +A formatter sketch, SdFormatter.ino, is included in the +%SdFat/examples/SdFormatter directory. This sketch attempts to +emulate SD Association's SDFormatter. + +SDFormatter aligns flash erase boundaries with file +system structures which reduces write latency and file system overhead. + +The PC/Mac SDFormatter does not have an option for FAT type so it may format +very small cards as FAT12. Use the SdFat formatter to force FAT16 +formatting of small cards. + +Do not format the SD card with an OS utility, OS utilities do not format SD +cards in conformance with the SD standard. + +You should use a freshly formatted SD card for best performance. FAT +file systems become slower if many files have been created and deleted. +This is because the directory entry for a deleted file is marked as deleted, +but is not deleted. When a new file is created, these entries must be scanned +before creating the file. Also files can become +fragmented which causes reads and writes to be slower. + +\section ExampleFilder Examples + +A number of examples are provided in the SdFat/examples folder. +See the html documentation for a list. + +To access these examples from the Arduino development environment +go to: %File -> Examples -> %SdFat -> \ + +Compile, upload to your Arduino and click on Serial Monitor to run +the example. + +Here is a list: + +AnalogBinLogger - Fast AVR ADC logger - see the AnalogBinLoggerExtras folder. + +bench - A read/write benchmark. + +cin_cout - Demo of ArduinoInStream and ArduinoOutStream. + +dataLogger - A simple modifiable data logger. + +directoryFunctions - Demo of chdir(), ls(), mkdir(), and rmdir(). + +fgets - Demo of the fgets read line/string function. + +formating - Print a table with various formatting options. + +getline - Example of getline from section 27.7.1.3 of the C++ standard. + +LowLatencyLogger - A modifiable data logger for higher data rates. + +OpenNext - Open all files in the root dir and print their filename. + +PrintBenchmark - A simple benchmark for printing to a text file. + +QuickStart - A sketch to quickly test your SD card and SD shield/module. + +RawWrite - A test of raw write functions for contiguous files. + +readCSV - Read a comma-separated value file using iostream extractors. + +ReadWriteSdFat - SdFat version of Arduino SD ReadWrite example. + +rename - A demo of SdFat::rename(old, new) and SdFile::rename(dirFile, newPath). + +SdFormatter - This sketch will format an SD or SDHC card. + +SdInfo - Initialize an SD card and analyze its structure for trouble shooting. + +StdioBench - Demo and test of stdio style stream. + +StreamParseInt - Simple demo of parseInt() Stream member function. + +StressTest - Create and write files until the SD is full. + +Timestamp - Sets file create, modify, and access timestamps. + +TwoCards - Example using two SD cards. + */ diff --git a/libs/SdFatBeta20120108/SdFat/SdFile.cpp b/libs/SdFat-master/SdFat/SdFile.cpp similarity index 83% rename from libs/SdFatBeta20120108/SdFat/SdFile.cpp rename to libs/SdFat-master/SdFat/SdFile.cpp index 2a9dd58..3ad7b65 100755 --- a/libs/SdFatBeta20120108/SdFat/SdFile.cpp +++ b/libs/SdFat-master/SdFat/SdFile.cpp @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -43,41 +43,31 @@ SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) { * for a read-only file, device is full, a corrupt file system or an I/O error. * */ -int16_t SdFile::write(const void* buf, uint16_t nbyte) { +int SdFile::write(const void* buf, size_t nbyte) { return SdBaseFile::write(buf, nbyte); } //------------------------------------------------------------------------------ /** Write a byte to a file. Required by the Arduino Print class. * \param[in] b the byte to be written. - * Use writeError to check for errors. + * Use getWriteError to check for errors. + * \return 1 for success and 0 for failure. */ -#if ARDUINO < 100 -void SdFile::write(uint8_t b) { - SdBaseFile::write(&b, 1); -} -#else // ARDUINO < 100 size_t SdFile::write(uint8_t b) { return SdBaseFile::write(&b, 1) == 1 ? 1 : 0; } -#endif // ARDUINO < 100 //------------------------------------------------------------------------------ /** Write a string to a file. Used by the Arduino Print class. * \param[in] str Pointer to the string. - * Use writeError to check for errors. + * Use getWriteError to check for errors. + * \return count of characters written for success or -1 for failure. */ -#if ARDUINO < 100 -void SdFile::write(const char* str) { - SdBaseFile::write(str, strlen(str)); -} -#else // ARDUINO < 100 -int16_t SdFile::write(const char* str) { +int SdFile::write(const char* str) { return SdBaseFile::write(str, strlen(str)); } -#endif // ARDUINO < 100 //------------------------------------------------------------------------------ /** Write a PROGMEM string to a file. * \param[in] str Pointer to the PROGMEM string. - * Use writeError to check for errors. + * Use getWriteError to check for errors. */ void SdFile::write_P(PGM_P str) { for (uint8_t c; (c = pgm_read_byte(str)); str++) write(c); @@ -85,7 +75,7 @@ void SdFile::write_P(PGM_P str) { //------------------------------------------------------------------------------ /** Write a PROGMEM string followed by CR/LF to a file. * \param[in] str Pointer to the PROGMEM string. - * Use writeError to check for errors. + * Use getWriteError to check for errors. */ void SdFile::writeln_P(PGM_P str) { write_P(str); diff --git a/libs/SdFat-master/SdFat/SdFile.h b/libs/SdFat-master/SdFat/SdFile.h new file mode 100755 index 0000000..8a2dd04 --- /dev/null +++ b/libs/SdFat-master/SdFat/SdFile.h @@ -0,0 +1,257 @@ +/* Arduino SdFat Library + * Copyright (C) 2012 by William Greiman + * + * This file is part of the Arduino SdFat Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdFat Library. If not, see + * . + */ +/** + * \file + * \brief SdFile class + */ +#ifndef SdFile_h +#define SdFile_h +#include +#include +//------------------------------------------------------------------------------ +/** + * \class SdFile + * \brief SdBaseFile with Arduino Stream. + */ +#if SD_FILE_USES_STREAM +class SdFile : public SdBaseFile, public Stream { +#else // SD_FILE_USES_STREAM +class SdFile : public SdBaseFile, public Print { +#endif // SD_FILE_USES_STREAM + public: + SdFile() {} + SdFile(const char* name, uint8_t oflag); +#if DESTRUCTOR_CLOSES_FILE + ~SdFile() {} +#endif // DESTRUCTOR_CLOSES_FILE + /** \return number of bytes available from the current position to EOF + * or INT_MAX if more than INT_MAX bytes are available. + */ + int available() { + uint32_t n = SdBaseFile::available(); + return n > INT_MAX ? INT_MAX : n; + } + /** Ensure that any bytes written to the file are saved to the SD card. */ + void flush() {SdBaseFile::sync();} + /** Return the next available byte without consuming it. + * + * \return The byte if no error and not at eof else -1; + */ + int peek() {return SdBaseFile::peek();} + /** Read the next byte from a file. + * + * \return For success return the next byte in the file as an int. + * If an error occurs or end of file is reached return -1. + */ + int read() {return SdBaseFile::read();} + /** Read data from a file starting at the current position. + * + * \param[out] buf Pointer to the location that will receive the data. + * + * \param[in] nbyte Maximum number of bytes to read. + * + * \return For success read() returns the number of bytes read. + * A value less than \a nbyte, including zero, will be returned + * if end of file is reached. + * If an error occurs, read() returns -1. Possible errors include + * read() called before a file has been opened, corrupt file system + * or an I/O error occurred. + */ + int read(void* buf, size_t nbyte) {return SdBaseFile::read(buf, nbyte);} + /** \return value of writeError */ + bool getWriteError() {return SdBaseFile::getWriteError();} + /** Set writeError to zero */ + void clearWriteError() {SdBaseFile::clearWriteError();} + size_t write(uint8_t b); + + int write(const char* str); + /** Write data to an open file. + * + * \note Data is moved to the cache but may not be written to the + * storage device until sync() is called. + * + * \param[in] buf Pointer to the location of the data to be written. + * + * \param[in] nbyte Number of bytes to write. + * + * \return For success write() returns the number of bytes written, always + * \a nbyte. If an error occurs, write() returns -1. Possible errors + * include write() is called before a file has been opened, write is called + * for a read-only file, device is full, a corrupt file system or an + * I/O error. + */ + int write(const void* buf, size_t nbyte); + /** Write data to an open file. Form required by Print. + * + * \note Data is moved to the cache but may not be written to the + * storage device until sync() is called. + * + * \param[in] buf Pointer to the location of the data to be written. + * + * \param[in] size Number of bytes to write. + * + * \return For success write() returns the number of bytes written, always + * \a nbyte. If an error occurs, write() returns -1. Possible errors + * include write() is called before a file has been opened, write is called + * for a read-only file, device is full, a corrupt file system or an + * I/O error. + */ + size_t write(const uint8_t *buf, size_t size) { + return SdBaseFile::write(buf, size);} + void write_P(PGM_P str); + void writeln_P(PGM_P str); +}; +//------------------------------------------------------------------------------ +/** Arduino SD.h style flag for open for read. */ +#define FILE_READ O_READ +/** Arduino SD.h style flag for open at EOF for read/write with create. */ +#define FILE_WRITE (O_RDWR | O_CREAT | O_AT_END) +/** + * \class File + * \brief Arduino SD.h style File API + */ +class File : public SdBaseFile, public Stream { + public: + /** The parenthesis operator. + * + * \return true if a file is open. + */ + operator bool() {return isOpen();} + /** \return number of bytes available from the current position to EOF + * or INT_MAX if more than INT_MAX bytes are available. + */ + int available() { + uint32_t n = SdBaseFile::available(); + return n > INT_MAX ? INT_MAX : n; + } + /** Set writeError to zero */ + void clearWriteError() {SdBaseFile::clearWriteError();} + /** Ensure that any bytes written to the file are saved to the SD card. */ + void flush() {sync();} + /** \return value of writeError */ + bool getWriteError() {return SdBaseFile::getWriteError();} + /** This function reports if the current file is a directory or not. + * \return true if the file is a directory. + */ + bool isDirectory() {return isDir();} + /** \return a pointer to the file's name. */ + char* name() { + m_name[0] = 0; + getFilename(m_name); + return m_name; + } + /** Return the next available byte without consuming it. + * + * \return The byte if no error and not at eof else -1; + */ + int peek() {return SdBaseFile::peek();} + /** \return the current file position. */ + uint32_t position() {return curPosition();} + /** Opens the next file or folder in a directory. + * + * \param[in] mode open mode flags. + * \return a File object. + */ + File openNextFile(uint8_t mode = O_READ) { + File tmpFile; + tmpFile.openNext(this, mode); + return tmpFile; + } + /** Read the next byte from a file. + * + * \return For success return the next byte in the file as an int. + * If an error occurs or end of file is reached return -1. + */ + int read() {return SdBaseFile::read();} + /** Read data from a file starting at the current position. + * + * \param[out] buf Pointer to the location that will receive the data. + * + * \param[in] nbyte Maximum number of bytes to read. + * + * \return For success read() returns the number of bytes read. + * A value less than \a nbyte, including zero, will be returned + * if end of file is reached. + * If an error occurs, read() returns -1. Possible errors include + * read() called before a file has been opened, corrupt file system + * or an I/O error occurred. + */ + int read(void* buf, size_t nbyte) {return SdBaseFile::read(buf, nbyte);} + /** Rewind a file if it is a directory */ + void rewindDirectory() { + if (isDir()) rewind(); + } + /** + * Seek to a new position in the file, which must be between + * 0 and the size of the file (inclusive). + * + * \param[in] pos the new file position. + * \return true for success else false. + */ + bool seek(uint32_t pos) {return seekSet(pos);} + /** \return the file's size. */ + uint32_t size() {return fileSize();} + /** Write a byte to a file. Required by the Arduino Print class. + * \param[in] b the byte to be written. + * Use getWriteError to check for errors. + * \return 1 for success and 0 for failure. + */ + size_t write(uint8_t b) { + return SdBaseFile::write(&b, 1) == 1 ? 1 : 0; + } + /** Write data to an open file. + * + * \note Data is moved to the cache but may not be written to the + * storage device until sync() is called. + * + * \param[in] buf Pointer to the location of the data to be written. + * + * \param[in] nbyte Number of bytes to write. + * + * \return For success write() returns the number of bytes written, always + * \a nbyte. If an error occurs, write() returns -1. Possible errors + * include write() is called before a file has been opened, write is called + * for a read-only file, device is full, a corrupt file system or an + * I/O error. + */ + int write(const void* buf, size_t nbyte); + /** Write data to an open file. Form required by Print. + * + * \note Data is moved to the cache but may not be written to the + * storage device until sync() is called. + * + * \param[in] buf Pointer to the location of the data to be written. + * + * \param[in] size Number of bytes to write. + * + * \return For success write() returns the number of bytes written, always + * \a nbyte. If an error occurs, write() returns -1. Possible errors + * include write() is called before a file has been opened, write is called + * for a read-only file, device is full, a corrupt file system or an + * I/O error. + */ + size_t write(const uint8_t *buf, size_t size) { + return SdBaseFile::write(buf, size); + } + + private: + char m_name[13]; +}; +#endif // SdFile_h diff --git a/libs/SdFatBeta20120108/SdFat/SdInfo.h b/libs/SdFat-master/SdFat/SdInfo.h similarity index 88% rename from libs/SdFatBeta20120108/SdFat/SdInfo.h rename to libs/SdFat-master/SdFat/SdInfo.h index 9d8a882..7c518da 100755 --- a/libs/SdFatBeta20120108/SdFat/SdInfo.h +++ b/libs/SdFat-master/SdFat/SdInfo.h @@ -1,5 +1,5 @@ /* Arduino Sd2Card Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino Sd2Card Library * @@ -31,6 +31,32 @@ // // http://www.sdcard.org/developers/tech/sdcard/pls/simplified_specs //------------------------------------------------------------------------------ +// SPI divisor constants +/** Set SCK to max rate of F_CPU/2. */ +uint8_t const SPI_FULL_SPEED = 2; +/** Set SCK rate to F_CPU/3 for Due */ +uint8_t const SPI_DIV3_SPEED = 3; +/** Set SCK rate to F_CPU/4. */ +uint8_t const SPI_HALF_SPEED = 4; +/** Set SCK rate to F_CPU/6 for Due */ +uint8_t const SPI_DIV6_SPEED = 6; +/** Set SCK rate to F_CPU/8. */ +uint8_t const SPI_QUARTER_SPEED = 8; +/** Set SCK rate to F_CPU/16. */ +uint8_t const SPI_EIGHTH_SPEED = 16; +/** Set SCK rate to F_CPU/32. */ +uint8_t const SPI_SIXTEENTH_SPEED = 32; +//------------------------------------------------------------------------------ +// SD operation timeouts +/** init timeout ms */ +uint16_t const SD_INIT_TIMEOUT = 2000; +/** erase timeout ms */ +uint16_t const SD_ERASE_TIMEOUT = 10000; +/** read timeout ms */ +uint16_t const SD_READ_TIMEOUT = 300; +/** write time out ms */ +uint16_t const SD_WRITE_TIMEOUT = 600; +//------------------------------------------------------------------------------ // SD card commands /** GO_IDLE_STATE - init card in spi mode if CS low */ uint8_t const CMD0 = 0X00; @@ -63,6 +89,8 @@ uint8_t const CMD38 = 0X26; uint8_t const CMD55 = 0X37; /** READ_OCR - read the OCR register of a card */ uint8_t const CMD58 = 0X3A; +/** CRC_ON_OFF - enable or disable CRC checking */ +uint8_t const CMD59 = 0X3B; /** SET_WR_BLK_ERASE_COUNT - Set the number of write blocks to be pre-erased before writing */ uint8_t const ACMD23 = 0X17; @@ -121,7 +149,7 @@ typedef struct CID { unsigned char always1 : 1; /** CRC7 checksum */ unsigned char crc : 7; -}cid_t; +}__attribute__((packed)) cid_t; //------------------------------------------------------------------------------ /** CSD for version 1.00 cards */ typedef struct CSDV1 { @@ -183,7 +211,7 @@ typedef struct CSDV1 { // byte 15 unsigned char always1 : 1; unsigned char crc : 7; -}csd1_t; +}__attribute__((packed)) csd1_t; //------------------------------------------------------------------------------ /** CSD for version 2.00 cards */ typedef struct CSDV2 { @@ -215,10 +243,10 @@ typedef struct CSDV2 { /** fixed to 0 - no partial read */ unsigned char read_bl_partial : 1; // byte 7 - /** not used */ - unsigned char reserved3 : 2; /** high part of card size */ unsigned char c_size_high : 6; + /** not used */ + unsigned char reserved3 : 2; // byte 8 /** middle part of card size */ unsigned char c_size_mid; @@ -265,7 +293,7 @@ typedef struct CSDV2 { unsigned char always1 : 1; /** checksum */ unsigned char crc : 7; -}csd2_t; +}__attribute__((packed)) csd2_t; //------------------------------------------------------------------------------ /** union of old and new style CSD register */ union csd_t { diff --git a/libs/SdFat-master/SdFat/SdSpi.h b/libs/SdFat-master/SdFat/SdSpi.h new file mode 100755 index 0000000..61c4f95 --- /dev/null +++ b/libs/SdFat-master/SdFat/SdSpi.h @@ -0,0 +1,173 @@ +/* Arduino SdSpi Library + * Copyright (C) 2013 by William Greiman + * + * This file is part of the Arduino SdSpi Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdSpi Library. If not, see + * . + */ + /** + * \file + * \brief SdSpi class for V2 SD/SDHC cards + */ +#ifndef SdSpi_h +#define SdSpi_h +#include +#include + +#if !USE_ARDUINO_SPI_LIBRARY +// AVR Arduinos +#ifdef __AVR__ +#if AVR_SOFT_SPI +#define USE_SOFTWARE_SPI 1 +#elif LEONARDO_SOFT_SPI && defined(__AVR_ATmega32U4__) && !defined(CORE_TEENSY) +#define USE_SOFTWARE_SPI 1 +#elif MEGA_SOFT_SPI && (defined(__AVR_ATmega1280__)\ + ||defined(__AVR_ATmega2560__)) +#define USE_SOFTWARE_SPI 1 +#else // USE_SOFTWARE_SPI +#define USE_NATIVE_AVR_SPI 1 +#endif // USE_SOFTWARE_SPI +#endif // __AVR__ +// Due +#if defined(__arm__) && !defined(CORE_TEENSY) +#if DUE_SOFT_SPI +#define USE_SOFTWARE_SPI 1 +#else // DUE_SOFT_SPI +/** Nonzero - use native SAM3X SPI */ +#define USE_NATIVE_SAM3X_SPI 1 +#endif // DUE_SOFT_SPI +#endif // defined(__arm__) && !defined(CORE_TEENSY) +// Teensy 3.0 +#if defined(__arm__) && defined(CORE_TEENSY) +#if TEENSY3_SOFT_SPI +#define USE_SOFTWARE_SPI 1 +#else // TEENSY3_SOFT_SPI +/** Nonzero - use native MK20DX128 SPI */ +#define USE_NATIVE_TEENSY3_SPI 1 +#endif // TEENSY3_SOFT_SPI +#endif // defined(__arm__) && defined(CORE_TEENSY) +#endif // !USE_ARDUINO_SPI_LIBRARY + +#ifndef USE_SOFTWARE_SPI +#define USE_SOFTWARE_SPI 0 +#endif // USE_SOFTWARE_SPI + +#ifndef USE_NATIVE_AVR_SPI +#define USE_NATIVE_AVR_SPI 0 +#endif + +#ifndef USE_NATIVE_SAM3X_SPI +#define USE_NATIVE_SAM3X_SPI 0 +#endif // USE_NATIVE_SAM3X_SPI + +#ifndef USE_NATIVE_TEENSY3_SPI +#define USE_NATIVE_TEENSY3_SPI 0 +#endif // USE_NATIVE_TEENSY3_SPI +//------------------------------------------------------------------------------ +// define default chip select pin +// +#if !USE_SOFTWARE_SPI +/** The default chip select pin for the SD card is SS. */ +uint8_t const SD_CHIP_SELECT_PIN = SS; +#else // USE_AVR_SOFTWARE_SPI +/** SPI chip select pin for software SPI. */ +uint8_t const SD_CHIP_SELECT_PIN = SOFT_SPI_CS_PIN; +#endif // USE_AVR_SOFTWARE_SPI + +//------------------------------------------------------------------------------ +/** + * \class SdSpi + * \brief SPI class for access to SD and SDHC flash memory cards. + */ +class SdSpi { + public: + /** Initialize the SPI bus */ + void begin(); + /** Set SPI options for access to SD/SDHC cards. + * + * \param[in] spiDivisor SCK clock divider relative to the system clock. + */ + void init(uint8_t spiDivisor); + /** Receive a byte. + * + * \return The byte. + */ + uint8_t receive(); + /** Receive multiple bytes. + * + * \param[out] buf Buffer to receive the data. + * \param[in] n Number of bytes to receive. + * + * \return Zero for no error or nonzero error code. + */ + uint8_t receive(uint8_t* buf, size_t n); + /** Send a byte. + * + * \param[in] data Byte to send + */ + void send(uint8_t data); + /** Send multiple bytes. + * + * \param[in] buf Buffer for data to be sent. + * \param[in] n Number of bytes to send. + */ + void send(const uint8_t* buf, size_t n); +}; +//------------------------------------------------------------------------------ +// Use of inline for AVR results in up to 10% better write performance. +// Inline also save a little flash memory. +/** inline avr native functions if nonzero. */ +#define USE_AVR_NATIVE_SPI_INLINE 1 +#if USE_NATIVE_AVR_SPI && USE_AVR_NATIVE_SPI_INLINE +inline uint8_t SdSpi::receive() { + SPDR = 0XFF; + while (!(SPSR & (1 << SPIF))) {} + return SPDR; +} +inline uint8_t SdSpi::receive(uint8_t* buf, size_t n) { + if (n-- == 0) return 0; + SPDR = 0XFF; + for (size_t i = 0; i < n; i++) { + while (!(SPSR & (1 << SPIF))) {} + uint8_t b = SPDR; + SPDR = 0XFF; + buf[i] = b; + } + while (!(SPSR & (1 << SPIF))) {} + buf[n] = SPDR; + return 0; +} +inline void SdSpi::send(uint8_t data) { + SPDR = data; + while (!(SPSR & (1 << SPIF))) {} +} +inline void SdSpi::send(const uint8_t* buf , size_t n) { + if (n == 0) return; + SPDR = buf[0]; + if (n > 1) { + uint8_t b = buf[1]; + size_t i = 2; + while (1) { + while (!(SPSR & (1 << SPIF))) {} + SPDR = b; + if (i == n) break; + b = buf[i++]; + } + } + while (!(SPSR & (1 << SPIF))) {} +} +#endif // USE_NATIVE_AVR_SPI && USE_AVR_NATIVE_SPI_INLINE +#endif // SdSpi_h + diff --git a/libs/SdFat-master/SdFat/SdSpiAVR.cpp b/libs/SdFat-master/SdFat/SdSpiAVR.cpp new file mode 100755 index 0000000..d6b82ff --- /dev/null +++ b/libs/SdFat-master/SdFat/SdSpiAVR.cpp @@ -0,0 +1,86 @@ +/* Arduino SdSpi Library + * Copyright (C) 2013 by William Greiman + * + * This file is part of the Arduino SdSpi Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdSpi Library. If not, see + * . + */ +#include +#if USE_NATIVE_AVR_SPI +//------------------------------------------------------------------------------ +void SdSpi::begin() { + // set SS high - may be chip select for another SPI device + digitalWrite(SS, HIGH); + + // SS must be in output mode even it is not chip select + pinMode(SS, OUTPUT); + pinMode(MISO, INPUT); + pinMode(MOSI, OUTPUT); + pinMode(SCK, OUTPUT); +} +//------------------------------------------------------------------------------ +void SdSpi::init(uint8_t sckDivisor) { + uint8_t r = 0; + + for (uint8_t b = 2; sckDivisor > b && r < 6; b <<= 1, r++) {} + // See avr processor documentation + SPCR = (1 << SPE) | (1 << MSTR) | (r >> 1); + SPSR = r & 1 || r == 6 ? 0 : 1 << SPI2X; +} +#if !USE_AVR_NATIVE_SPI_INLINE +//------------------------------------------------------------------------------ +uint8_t SdSpi::receive() { + SPDR = 0XFF; + while (!(SPSR & (1 << SPIF))) {} + return SPDR; +} +//------------------------------------------------------------------------------ +uint8_t SdSpi::receive(uint8_t* buf, size_t n) { + if (n-- == 0) return 0; + SPDR = 0XFF; + for (size_t i = 0; i < n; i++) { + while (!(SPSR & (1 << SPIF))) {} + uint8_t b = SPDR; + SPDR = 0XFF; + buf[i] = b; + } + while (!(SPSR & (1 << SPIF))) {} + buf[n] = SPDR; + return 0; +} +//------------------------------------------------------------------------------ +void SdSpi::send(uint8_t data) { + SPDR = data; + while (!(SPSR & (1 << SPIF))) {} +} +//------------------------------------------------------------------------------ +void SdSpi::send(const uint8_t* buf , size_t n) { + if (n == 0) return; + SPDR = buf[0]; + if (n > 1) { + uint8_t b = buf[1]; + size_t i = 2; + while (1) { + while (!(SPSR & (1 << SPIF))) {} + SPDR = b; + if (i == n) break; + b = buf[i++]; + } + } + while (!(SPSR & (1 << SPIF))) {} +} +#endif // !USE_AVR_NATIVE_SPI_INLINE +#endif // USE_NATIVE_AVR_SPI + diff --git a/libs/SdFat-master/SdFat/SdSpiArduino.cpp b/libs/SdFat-master/SdFat/SdSpiArduino.cpp new file mode 100755 index 0000000..be5e3d8 --- /dev/null +++ b/libs/SdFat-master/SdFat/SdSpiArduino.cpp @@ -0,0 +1,70 @@ +/* Arduino SdSpi Library + * Copyright (C) 2013 by William Greiman + * + * This file is part of the Arduino SdSpi Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdSpi Library. If not, see + * . + */ +#include +#if USE_ARDUINO_SPI_LIBRARY +#include +//------------------------------------------------------------------------------ +void SdSpi::begin() { + SPI.begin(); +} +//------------------------------------------------------------------------------ +void SdSpi::init(uint8_t sckDivisor) { + SPI.setBitOrder(MSBFIRST); + SPI.setDataMode(SPI_MODE0); +#ifndef SPI_CLOCK_DIV128 + SPI.setClockDivider(sckDivisor); +#else // SPI_CLOCK_DIV128 + int v; + if (sckDivisor <= 2) v = SPI_CLOCK_DIV2; + else if (sckDivisor <= 4) v = SPI_CLOCK_DIV4; + else if (sckDivisor <= 8) v = SPI_CLOCK_DIV8; + else if (sckDivisor <= 16) v = SPI_CLOCK_DIV16; + else if (sckDivisor <= 32) v = SPI_CLOCK_DIV32; + else if (sckDivisor <= 64) v = SPI_CLOCK_DIV64; + else v = SPI_CLOCK_DIV128; + SPI.setClockDivider(v); +#endif // SPI_CLOCK_DIV128 +} +//------------------------------------------------------------------------------ +/** SPI receive a byte */ +uint8_t SdSpi::receive() { + return SPI.transfer(0XFF); +} +//------------------------------------------------------------------------------ +/** SPI receive multiple bytes */ +uint8_t SdSpi::receive(uint8_t* buf, size_t n) { + for (size_t i = 0; i < n; i++) { + buf[i] = SPI.transfer(0XFF); + } + return 0; +} +//------------------------------------------------------------------------------ +/** SPI send a byte */ +void SdSpi::send(uint8_t b) { + SPI.transfer(b); +} +//------------------------------------------------------------------------------ +/** SPI send multiple bytes */ +void SdSpi::send(const uint8_t* buf , size_t n) { + for (size_t i = 0; i < n; i++) { + SPI.transfer(buf[i]); + } +} +#endif // USE_ARDUINO_SPI_LIBRARY diff --git a/libs/SdFat-master/SdFat/SdSpiSAM3X.cpp b/libs/SdFat-master/SdFat/SdSpiSAM3X.cpp new file mode 100755 index 0000000..d8f38c4 --- /dev/null +++ b/libs/SdFat-master/SdFat/SdSpiSAM3X.cpp @@ -0,0 +1,216 @@ +/* Arduino SdSpi Library + * Copyright (C) 2013 by William Greiman + * + * This file is part of the Arduino SdSpi Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdSpi Library. If not, see + * . + */ +#include +#if USE_NATIVE_SAM3X_SPI +/** Use SAM3X DMAC if nonzero */ +#define USE_SAM3X_DMAC 1 +/** Use extra Bus Matrix arbitration fix if nonzero */ +#define USE_SAM3X_BUS_MATRIX_FIX 0 +/** Time in ms for DMA receive timeout */ +#define SAM3X_DMA_TIMEOUT 100 +/** chip select register number */ +#define SPI_CHIP_SEL 3 +/** DMAC receive channel */ +#define SPI_DMAC_RX_CH 1 +/** DMAC transmit channel */ +#define SPI_DMAC_TX_CH 0 +/** DMAC Channel HW Interface Number for SPI TX. */ +#define SPI_TX_IDX 1 +/** DMAC Channel HW Interface Number for SPI RX. */ +#define SPI_RX_IDX 2 +//------------------------------------------------------------------------------ +/** Disable DMA Controller. */ +static void dmac_disable() { + DMAC->DMAC_EN &= (~DMAC_EN_ENABLE); +} +/** Enable DMA Controller. */ +static void dmac_enable() { + DMAC->DMAC_EN = DMAC_EN_ENABLE; +} +/** Disable DMA Channel. */ +static void dmac_channel_disable(uint32_t ul_num) { + DMAC->DMAC_CHDR = DMAC_CHDR_DIS0 << ul_num; +} +/** Enable DMA Channel. */ +static void dmac_channel_enable(uint32_t ul_num) { + DMAC->DMAC_CHER = DMAC_CHER_ENA0 << ul_num; +} +/** Poll for transfer complete. */ +static bool dmac_channel_transfer_done(uint32_t ul_num) { + return (DMAC->DMAC_CHSR & (DMAC_CHSR_ENA0 << ul_num)) ? false : true; +} +//------------------------------------------------------------------------------ +void SdSpi::begin() { + PIO_Configure( + g_APinDescription[PIN_SPI_MOSI].pPort, + g_APinDescription[PIN_SPI_MOSI].ulPinType, + g_APinDescription[PIN_SPI_MOSI].ulPin, + g_APinDescription[PIN_SPI_MOSI].ulPinConfiguration); + PIO_Configure( + g_APinDescription[PIN_SPI_MISO].pPort, + g_APinDescription[PIN_SPI_MISO].ulPinType, + g_APinDescription[PIN_SPI_MISO].ulPin, + g_APinDescription[PIN_SPI_MISO].ulPinConfiguration); + PIO_Configure( + g_APinDescription[PIN_SPI_SCK].pPort, + g_APinDescription[PIN_SPI_SCK].ulPinType, + g_APinDescription[PIN_SPI_SCK].ulPin, + g_APinDescription[PIN_SPI_SCK].ulPinConfiguration); + pmc_enable_periph_clk(ID_SPI0); +#if USE_SAM3X_DMAC + pmc_enable_periph_clk(ID_DMAC); + dmac_disable(); + DMAC->DMAC_GCFG = DMAC_GCFG_ARB_CFG_FIXED; + dmac_enable(); +#if USE_SAM3X_BUS_MATRIX_FIX + MATRIX->MATRIX_WPMR = 0x4d415400; + MATRIX->MATRIX_MCFG[1] = 1; + MATRIX->MATRIX_MCFG[2] = 1; + MATRIX->MATRIX_SCFG[0] = 0x01000010; + MATRIX->MATRIX_SCFG[1] = 0x01000010; + MATRIX->MATRIX_SCFG[7] = 0x01000010; +#endif // USE_SAM3X_BUS_MATRIX_FIX +#endif // USE_SAM3X_DMAC +} +//------------------------------------------------------------------------------ +// start RX DMA +static void spiDmaRX(uint8_t* dst, uint16_t count) { + dmac_channel_disable(SPI_DMAC_RX_CH); + DMAC->DMAC_CH_NUM[SPI_DMAC_RX_CH].DMAC_SADDR = (uint32_t)&SPI0->SPI_RDR; + DMAC->DMAC_CH_NUM[SPI_DMAC_RX_CH].DMAC_DADDR = (uint32_t)dst; + DMAC->DMAC_CH_NUM[SPI_DMAC_RX_CH].DMAC_DSCR = 0; + DMAC->DMAC_CH_NUM[SPI_DMAC_RX_CH].DMAC_CTRLA = count | + DMAC_CTRLA_SRC_WIDTH_BYTE | DMAC_CTRLA_DST_WIDTH_BYTE; + DMAC->DMAC_CH_NUM[SPI_DMAC_RX_CH].DMAC_CTRLB = DMAC_CTRLB_SRC_DSCR | + DMAC_CTRLB_DST_DSCR | DMAC_CTRLB_FC_PER2MEM_DMA_FC | + DMAC_CTRLB_SRC_INCR_FIXED | DMAC_CTRLB_DST_INCR_INCREMENTING; + DMAC->DMAC_CH_NUM[SPI_DMAC_RX_CH].DMAC_CFG = DMAC_CFG_SRC_PER(SPI_RX_IDX) | + DMAC_CFG_SRC_H2SEL | DMAC_CFG_SOD | DMAC_CFG_FIFOCFG_ASAP_CFG; + dmac_channel_enable(SPI_DMAC_RX_CH); +} +//------------------------------------------------------------------------------ +// start TX DMA +static void spiDmaTX(const uint8_t* src, uint16_t count) { + static uint8_t ff = 0XFF; + uint32_t src_incr = DMAC_CTRLB_SRC_INCR_INCREMENTING; + if (!src) { + src = &ff; + src_incr = DMAC_CTRLB_SRC_INCR_FIXED; + } + dmac_channel_disable(SPI_DMAC_TX_CH); + DMAC->DMAC_CH_NUM[SPI_DMAC_TX_CH].DMAC_SADDR = (uint32_t)src; + DMAC->DMAC_CH_NUM[SPI_DMAC_TX_CH].DMAC_DADDR = (uint32_t)&SPI0->SPI_TDR; + DMAC->DMAC_CH_NUM[SPI_DMAC_TX_CH].DMAC_DSCR = 0; + DMAC->DMAC_CH_NUM[SPI_DMAC_TX_CH].DMAC_CTRLA = count | + DMAC_CTRLA_SRC_WIDTH_BYTE | DMAC_CTRLA_DST_WIDTH_BYTE; + + DMAC->DMAC_CH_NUM[SPI_DMAC_TX_CH].DMAC_CTRLB = DMAC_CTRLB_SRC_DSCR | + DMAC_CTRLB_DST_DSCR | DMAC_CTRLB_FC_MEM2PER_DMA_FC | + src_incr | DMAC_CTRLB_DST_INCR_FIXED; + + DMAC->DMAC_CH_NUM[SPI_DMAC_TX_CH].DMAC_CFG = DMAC_CFG_DST_PER(SPI_TX_IDX) | + DMAC_CFG_DST_H2SEL | DMAC_CFG_SOD | DMAC_CFG_FIFOCFG_ALAP_CFG; + + dmac_channel_enable(SPI_DMAC_TX_CH); +} +//------------------------------------------------------------------------------ +// initialize SPI controller +void SdSpi::init(uint8_t sckDivisor) { + uint8_t scbr = sckDivisor; + Spi* pSpi = SPI0; + // disable SPI + pSpi->SPI_CR = SPI_CR_SPIDIS; + // reset SPI + pSpi->SPI_CR = SPI_CR_SWRST; + // no mode fault detection, set master mode + pSpi->SPI_MR = SPI_PCS(SPI_CHIP_SEL) | SPI_MR_MODFDIS | SPI_MR_MSTR; + // mode 0, 8-bit, + pSpi->SPI_CSR[SPI_CHIP_SEL] = SPI_CSR_SCBR(scbr) | SPI_CSR_NCPHA; + // enable SPI + pSpi->SPI_CR |= SPI_CR_SPIEN; +} +//------------------------------------------------------------------------------ +static inline uint8_t spiTransfer(uint8_t b) { + Spi* pSpi = SPI0; + + pSpi->SPI_TDR = b; + while ((pSpi->SPI_SR & SPI_SR_RDRF) == 0) {} + b = pSpi->SPI_RDR; + return b; +} +//------------------------------------------------------------------------------ +/** SPI receive a byte */ +uint8_t SdSpi::receive() { + return spiTransfer(0XFF); +} +//------------------------------------------------------------------------------ +/** SPI receive multiple bytes */ +uint8_t SdSpi::receive(uint8_t* buf, size_t n) { + Spi* pSpi = SPI0; + int rtn = 0; +#if USE_SAM3X_DMAC + // clear overrun error + uint32_t s = pSpi->SPI_SR; + + spiDmaRX(buf, n); + spiDmaTX(0, n); + + uint32_t m = millis(); + while (!dmac_channel_transfer_done(SPI_DMAC_RX_CH)) { + if ((millis() - m) > SAM3X_DMA_TIMEOUT) { + dmac_channel_disable(SPI_DMAC_RX_CH); + dmac_channel_disable(SPI_DMAC_TX_CH); + rtn = 2; + break; + } + } + if (pSpi->SPI_SR & SPI_SR_OVRES) rtn |= 1; +#else // USE_SAM3X_DMAC + for (size_t i = 0; i < n; i++) { + pSpi->SPI_TDR = 0XFF; + while ((pSpi->SPI_SR & SPI_SR_RDRF) == 0) {} + buf[i] = pSpi->SPI_RDR; + } +#endif // USE_SAM3X_DMAC + return rtn; +} +//------------------------------------------------------------------------------ +/** SPI send a byte */ +void SdSpi::send(uint8_t b) { + spiTransfer(b); +} +//------------------------------------------------------------------------------ +void SdSpi::send(const uint8_t* buf , size_t n) { + Spi* pSpi = SPI0; +#if USE_SAM3X_DMAC + spiDmaTX(buf, n); + while (!dmac_channel_transfer_done(SPI_DMAC_TX_CH)) {} +#else // #if USE_SAM3X_DMAC + while ((pSpi->SPI_SR & SPI_SR_TXEMPTY) == 0) {} + for (size_t i = 0; i < n; i++) { + pSpi->SPI_TDR = buf[i]; + while ((pSpi->SPI_SR & SPI_SR_TDRE) == 0) {} + } +#endif // #if USE_SAM3X_DMAC + while ((pSpi->SPI_SR & SPI_SR_TXEMPTY) == 0) {} + // leave RDR empty + uint8_t b = pSpi->SPI_RDR; +} +#endif // USE_NATIVE_SAM3X_SPI diff --git a/libs/SdFat-master/SdFat/SdSpiSoft.cpp b/libs/SdFat-master/SdFat/SdSpiSoft.cpp new file mode 100755 index 0000000..9d1e578 --- /dev/null +++ b/libs/SdFat-master/SdFat/SdSpiSoft.cpp @@ -0,0 +1,61 @@ +/* Arduino SdSpi Library + * Copyright (C) 2013 by William Greiman + * + * This file is part of the Arduino SdSpi Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdSpi Library. If not, see + * . + */ +#include +#if USE_SOFTWARE_SPI +#include +static +SoftSPI softSpiBus; +//------------------------------------------------------------------------------ +/** + * initialize SPI pins + */ +void SdSpi::begin() { + softSpiBus.begin(); +} +//------------------------------------------------------------------------------ +/** + * Initialize hardware SPI - dummy for soft SPI + */ +void SdSpi::init(uint8_t sckDivisor) {} +//------------------------------------------------------------------------------ +/** Soft SPI receive byte */ +uint8_t SdSpi::receive() { + return softSpiBus.receive(); +} +//------------------------------------------------------------------------------ +/** Soft SPI read data */ +uint8_t SdSpi::receive(uint8_t* buf, size_t n) { + for (size_t i = 0; i < n; i++) { + buf[i] = receive(); + } + return 0; +} +//------------------------------------------------------------------------------ +/** Soft SPI send byte */ +void SdSpi::send(uint8_t data) { + softSpiBus.send(data); +} +//------------------------------------------------------------------------------ +void SdSpi::send(const uint8_t* buf , size_t n) { + for (size_t i = 0; i < n; i++) { + send(buf[i]); + } +} +#endif // USE_SOFTWARE_SPI \ No newline at end of file diff --git a/libs/SdFat-master/SdFat/SdSpiTeensy3.cpp b/libs/SdFat-master/SdFat/SdSpiTeensy3.cpp new file mode 100755 index 0000000..9c938ea --- /dev/null +++ b/libs/SdFat-master/SdFat/SdSpiTeensy3.cpp @@ -0,0 +1,223 @@ +/* Arduino SdSpi Library + * Copyright (C) 2013 by William Greiman + * + * This file is part of the Arduino SdSpi Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdSpi Library. If not, see + * . + */ +#include +#if USE_NATIVE_TEENSY3_SPI +// Teensy 3.0 functions +#include +// use 16-bit frame if SPI_USE_8BIT_FRAME is zero +#define SPI_USE_8BIT_FRAME 0 +// Limit initial fifo to three entries to avoid fifo overrun +#define SPI_INITIAL_FIFO_DEPTH 3 +// define some symbols that are not in mk20dx128.h +#ifndef SPI_SR_RXCTR +#define SPI_SR_RXCTR 0XF0 +#endif // SPI_SR_RXCTR +#ifndef SPI_PUSHR_CONT +#define SPI_PUSHR_CONT 0X80000000 +#endif // SPI_PUSHR_CONT +#ifndef SPI_PUSHR_CTAS +#define SPI_PUSHR_CTAS(n) (((n) & 7) << 28) +#endif // SPI_PUSHR_CTAS +//------------------------------------------------------------------------------ +/** + * initialize SPI pins + */ +void SdSpi::begin() { + SIM_SCGC6 |= SIM_SCGC6_SPI0; +} +//------------------------------------------------------------------------------ +/** + * Initialize hardware SPI + * + */ +void SdSpi::init(uint8_t sckDivisor) { + uint32_t ctar, ctar0, ctar1; + + if (sckDivisor <= 2) { + // 1/2 speed + ctar = SPI_CTAR_DBR | SPI_CTAR_BR(0) | SPI_CTAR_CSSCK(0); + } else if (sckDivisor <= 4) { + // 1/4 speed + ctar = SPI_CTAR_BR(0) | SPI_CTAR_CSSCK(0); + } else if (sckDivisor <= 8) { + // 1/8 speed + ctar = SPI_CTAR_BR(1) | SPI_CTAR_CSSCK(1); + } else if (sckDivisor <= 12) { + // 1/12 speed + ctar = SPI_CTAR_BR(2) | SPI_CTAR_CSSCK(2); + } else if (sckDivisor <= 16) { + // 1/16 speed + ctar = SPI_CTAR_BR(3) | SPI_CTAR_CSSCK(3); + } else if (sckDivisor <= 32) { + // 1/32 speed + ctar = SPI_CTAR_PBR(1) | SPI_CTAR_BR(4) | SPI_CTAR_CSSCK(4); + } else if (sckDivisor <= 64) { + // 1/64 speed + ctar = SPI_CTAR_PBR(1) | SPI_CTAR_BR(5) | SPI_CTAR_CSSCK(5); + } else { + // 1/128 speed + ctar = SPI_CTAR_PBR(1) | SPI_CTAR_BR(6) | SPI_CTAR_CSSCK(6); + } + // CTAR0 - 8 bit transfer + ctar0 = ctar | SPI_CTAR_FMSZ(7); + + // CTAR1 - 16 bit transfer + ctar1 = ctar | SPI_CTAR_FMSZ(15); + + if (SPI0_CTAR0 != ctar0 || SPI0_CTAR1 != ctar1) { + SPI0_MCR = SPI_MCR_MSTR | SPI_MCR_MDIS | SPI_MCR_HALT | SPI_MCR_PCSIS(0x1F); + SPI0_CTAR0 = ctar0; + SPI0_CTAR1 = ctar1; + } + SPI0_MCR = SPI_MCR_MSTR | SPI_MCR_PCSIS(0x1F); + CORE_PIN11_CONFIG = PORT_PCR_DSE | PORT_PCR_MUX(2); + CORE_PIN12_CONFIG = PORT_PCR_MUX(2); + CORE_PIN13_CONFIG = PORT_PCR_DSE | PORT_PCR_MUX(2); +} +//------------------------------------------------------------------------------ +/** SPI receive a byte */ +uint8_t SdSpi::receive() { + SPI0_MCR |= SPI_MCR_CLR_RXF; + SPI0_SR = SPI_SR_TCF; + SPI0_PUSHR = 0xFF; + while (!(SPI0_SR & SPI_SR_TCF)) {} + return SPI0_POPR; +} +//------------------------------------------------------------------------------ +/** SPI receive multiple bytes */ +uint8_t SdSpi::receive(uint8_t* buf, size_t n) { + // clear any data in RX FIFO + SPI0_MCR = SPI_MCR_MSTR | SPI_MCR_CLR_RXF | SPI_MCR_PCSIS(0x1F); +#if SPI_USE_8BIT_FRAME + // initial number of bytes to push into TX FIFO + int nf = n < SPI_INITIAL_FIFO_DEPTH ? n : SPI_INITIAL_FIFO_DEPTH; + for (int i = 0; i < nf; i++) { + SPI0_PUSHR = 0XFF; + } + // limit for pushing dummy data into TX FIFO + uint8_t* limit = buf + n - nf; + while (buf < limit) { + while (!(SPI0_SR & SPI_SR_RXCTR)) {} + SPI0_PUSHR = 0XFF; + *buf++ = SPI0_POPR; + } + // limit for rest of RX data + limit += nf; + while (buf < limit) { + while (!(SPI0_SR & SPI_SR_RXCTR)) {} + *buf++ = SPI0_POPR; + } +#else // SPI_USE_8BIT_FRAME + // use 16 bit frame to avoid TD delay between frames + // get one byte if n is odd + if (n & 1) { + *buf++ = receive(); + n--; + } + // initial number of words to push into TX FIFO + int nf = n/2 < SPI_INITIAL_FIFO_DEPTH ? n/2 : SPI_INITIAL_FIFO_DEPTH; + for (int i = 0; i < nf; i++) { + SPI0_PUSHR = SPI_PUSHR_CONT | SPI_PUSHR_CTAS(1) | 0XFFFF; + } + uint8_t* limit = buf + n - 2*nf; + while (buf < limit) { + while (!(SPI0_SR & SPI_SR_RXCTR)) {} + SPI0_PUSHR = SPI_PUSHR_CONT | SPI_PUSHR_CTAS(1) | 0XFFFF; + uint16_t w = SPI0_POPR; + *buf++ = w >> 8; + *buf++ = w & 0XFF; + } + // limit for rest of RX data + limit += 2*nf; + while (buf < limit) { + while (!(SPI0_SR & SPI_SR_RXCTR)) {} + uint16_t w = SPI0_POPR; + *buf++ = w >> 8; + *buf++ = w & 0XFF; + } +#endif // SPI_USE_8BIT_FRAME + return 0; +} +//------------------------------------------------------------------------------ +/** SPI send a byte */ +void SdSpi::send(uint8_t b) { + SPI0_MCR |= SPI_MCR_CLR_RXF; + SPI0_SR = SPI_SR_TCF; + SPI0_PUSHR = b; + while (!(SPI0_SR & SPI_SR_TCF)) {} +} +//------------------------------------------------------------------------------ +/** SPI send multiple bytes */ +void SdSpi::send(const uint8_t* buf , size_t n) { + // clear any data in RX FIFO + SPI0_MCR = SPI_MCR_MSTR | SPI_MCR_CLR_RXF | SPI_MCR_PCSIS(0x1F); +#if SPI_USE_8BIT_FRAME + // initial number of bytes to push into TX FIFO + int nf = n < SPI_INITIAL_FIFO_DEPTH ? n : SPI_INITIAL_FIFO_DEPTH; + // limit for pushing data into TX fifo + const uint8_t* limit = buf + n; + for (int i = 0; i < nf; i++) { + SPI0_PUSHR = *buf++; + } + // write data to TX FIFO + while (buf < limit) { + while (!(SPI0_SR & SPI_SR_RXCTR)) {} + SPI0_PUSHR = *buf++; + SPI0_POPR; + } + // wait for data to be sent + while (nf) { + while (!(SPI0_SR & SPI_SR_RXCTR)) {} + SPI0_POPR; + nf--; + } +#else // SPI_USE_8BIT_FRAME + // use 16 bit frame to avoid TD delay between frames + // send one byte if n is odd + if (n & 1) { + send(*buf++); + n--; + } + // initial number of words to push into TX FIFO + int nf = n/2 < SPI_INITIAL_FIFO_DEPTH ? n/2 : SPI_INITIAL_FIFO_DEPTH; + // limit for pushing data into TX fifo + const uint8_t* limit = buf + n; + for (int i = 0; i < nf; i++) { + uint16_t w = (*buf++) << 8; + w |= *buf++; + SPI0_PUSHR = SPI_PUSHR_CONT | SPI_PUSHR_CTAS(1) | w; + } + // write data to TX FIFO + while (buf < limit) { + uint16_t w = *buf++ << 8; + w |= *buf++; + while (!(SPI0_SR & SPI_SR_RXCTR)) {} + SPI0_PUSHR = SPI_PUSHR_CONT | SPI_PUSHR_CTAS(1) | w; + SPI0_POPR; + } + // wait for data to be sent + while (nf) { + while (!(SPI0_SR & SPI_SR_RXCTR)) {} + SPI0_POPR; + nf--; + } +#endif // SPI_USE_8BIT_FRAME +} +#endif // USE_NATIVE_TEENSY3_SPI diff --git a/libs/SdFatBeta20120108/SdFat/SdStream.cpp b/libs/SdFat-master/SdFat/SdStream.cpp similarity index 92% rename from libs/SdFatBeta20120108/SdFat/SdStream.cpp rename to libs/SdFat-master/SdFat/SdStream.cpp index 94edd17..b72ca44 100755 --- a/libs/SdFatBeta20120108/SdFat/SdStream.cpp +++ b/libs/SdFat-master/SdFat/SdStream.cpp @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -19,13 +19,7 @@ */ #include -// catch pure virtual errors -#if USE_CXA_PURE_VIRTUAL -extern "C" void __cxa_pure_virtual() { - SdFat::stdOut()->println("VIRTUAL"); - exit(1); -} -#endif // USE_CXA_PURE_VIRTUAL + //============================================================================== /// @cond SHOW_PROTECTED int16_t SdStreamBase::getch() { @@ -100,7 +94,7 @@ void SdStreamBase::putch(char c) { } //------------------------------------------------------------------------------ void SdStreamBase::putstr(const char* str) { - uint16_t n = 0; + size_t n = 0; while (1) { char c = str[n]; if (c == '\0' || (c == '\n' && !(getmode() & ios::binary))) { @@ -147,7 +141,7 @@ bool SdStreamBase::seekpos(pos_type pos) { return seekSet(pos); } //------------------------------------------------------------------------------ -int16_t SdStreamBase::write(const void* buf, uint16_t n) { +int SdStreamBase::write(const void* buf, size_t n) { return SdBaseFile::write(buf, n); } //------------------------------------------------------------------------------ diff --git a/libs/SdFatBeta20120108/SdFat/SdStream.h b/libs/SdFat-master/SdFat/SdStream.h similarity index 90% rename from libs/SdFatBeta20120108/SdFat/SdStream.h rename to libs/SdFat-master/SdFat/SdStream.h index 16e7409..191e537 100755 --- a/libs/SdFatBeta20120108/SdFat/SdStream.h +++ b/libs/SdFat-master/SdFat/SdStream.h @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -31,8 +31,6 @@ * \brief Base class for SD streams */ class SdStreamBase : protected SdBaseFile, virtual public ios { - public: - protected: /// @cond SHOW_PROTECTED int16_t getch(); @@ -42,18 +40,18 @@ class SdStreamBase : protected SdBaseFile, virtual public ios { /** Internal do not use * \return mode */ - ios::openmode getmode() {return mode_;} + ios::openmode getmode() {return m_mode;} /** Internal do not use * \param[in] mode */ - void setmode(ios::openmode mode) {mode_ = mode;} + void setmode(ios::openmode mode) {m_mode = mode;} bool seekoff(off_type off, seekdir way); bool seekpos(pos_type pos); - int16_t write(const void* buf, uint16_t n); + int write(const void* buf, size_t n); void write(char c); /// @endcond private: - ios::openmode mode_; + ios::openmode m_mode; }; //============================================================================== /** @@ -72,7 +70,9 @@ class fstream : public iostream, SdStreamBase { explicit fstream(const char* path, openmode mode = in | out) { open(path, mode); } +#if DESTRUCTOR_CLOSES_FILE ~fstream() {} +#endif // DESTRUCTOR_CLOSES_FILE /** Clear state and writeError * \param[in] state new state for stream */ @@ -121,11 +121,15 @@ class fstream : public iostream, SdStreamBase { /** Internal - do not use * \param[out] pos */ - void getpos(fpos_t* pos) {SdBaseFile::getpos(pos);} + void getpos(FatPos_t* pos) {SdBaseFile::getpos(pos);} /** Internal - do not use * \param[in] c */ void putch(char c) {SdStreamBase::putch(c);} + /** Internal - do not use + * \param[in] str + */ + void putstr(const char *str) {SdStreamBase::putstr(str);} /** Internal - do not use * \param[in] pos */ @@ -133,7 +137,7 @@ class fstream : public iostream, SdStreamBase { return SdStreamBase::seekoff(off, way); } bool seekpos(pos_type pos) {return SdStreamBase::seekpos(pos);} - void setpos(fpos_t* pos) {SdBaseFile::setpos(pos);} + void setpos(FatPos_t* pos) {SdBaseFile::setpos(pos);} bool sync() {return SdStreamBase::sync();} pos_type tellpos() {return SdStreamBase::curPosition();} /// @endcond @@ -154,7 +158,9 @@ class ifstream : public istream, SdStreamBase { explicit ifstream(const char* path, openmode mode = in) { open(path, mode); } +#if DESTRUCTOR_CLOSES_FILE ~ifstream() {} +#endif // DESTRUCTOR_CLOSES_FILE /** Close a file and force cached data and directory information * to be written to the storage device. */ @@ -170,6 +176,7 @@ class ifstream : public istream, SdStreamBase { void open(const char* path, openmode mode = in) { SdStreamBase::open(path, mode | in); } + protected: /// @cond SHOW_PROTECTED /** Internal - do not use @@ -179,7 +186,7 @@ class ifstream : public istream, SdStreamBase { /** Internal - do not use * \param[out] pos */ - void getpos(fpos_t* pos) {SdBaseFile::getpos(pos);} + void getpos(FatPos_t* pos) {SdBaseFile::getpos(pos);} /** Internal - do not use * \param[in] pos */ @@ -187,7 +194,7 @@ class ifstream : public istream, SdStreamBase { return SdStreamBase::seekoff(off, way); } bool seekpos(pos_type pos) {return SdStreamBase::seekpos(pos);} - void setpos(fpos_t* pos) {SdBaseFile::setpos(pos);} + void setpos(FatPos_t* pos) {SdBaseFile::setpos(pos);} pos_type tellpos() {return SdStreamBase::curPosition();} /// @endcond }; @@ -206,7 +213,9 @@ class ofstream : public ostream, SdStreamBase { explicit ofstream(const char* path, ios::openmode mode = out) { open(path, mode); } +#if DESTRUCTOR_CLOSES_FILE ~ofstream() {} +#endif // DESTRUCTOR_CLOSES_FILE /** Clear state and writeError * \param[in] state new state for stream */ @@ -229,6 +238,7 @@ class ofstream : public ostream, SdStreamBase { } /** \return True if stream is open else false. */ bool is_open() {return SdBaseFile::isOpen();} + protected: /// @cond SHOW_PROTECTED /** diff --git a/libs/SdFat-master/SdFat/SdVolume.cpp b/libs/SdFat-master/SdFat/SdVolume.cpp new file mode 100755 index 0000000..61f8381 --- /dev/null +++ b/libs/SdFat-master/SdFat/SdVolume.cpp @@ -0,0 +1,595 @@ +/* Arduino SdFat Library + * Copyright (C) 2012 by William Greiman + * + * This file is part of the Arduino SdFat Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SdFat Library. If not, see + * . + */ +#include +//------------------------------------------------------------------------------ +#if !USE_MULTIPLE_CARDS +// raw block cache +uint8_t SdVolume::m_fatCount; // number of FATs on volume +uint32_t SdVolume::m_blocksPerFat; // FAT size in blocks +cache_t SdVolume::m_cacheBuffer; // 512 byte cache for Sd2Card +uint32_t SdVolume::m_cacheBlockNumber; // current block number +uint8_t SdVolume::m_cacheStatus; // status of cache block +#if USE_SEPARATE_FAT_CACHE +cache_t SdVolume::m_cacheFatBuffer; // 512 byte cache for FAT +uint32_t SdVolume::m_cacheFatBlockNumber; // current Fat block number +uint8_t SdVolume::m_cacheFatStatus; // status of cache Fatblock +#endif // USE_SEPARATE_FAT_CACHE +Sd2Card* SdVolume::m_sdCard; // pointer to SD card object +#endif // USE_MULTIPLE_CARDS +//------------------------------------------------------------------------------ +// find a contiguous group of clusters +bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) { + // start of group + uint32_t bgnCluster; + // end of group + uint32_t endCluster; + // last cluster of FAT + uint32_t fatEnd = m_clusterCount + 1; + + // flag to save place to start next search + bool setStart; + + // set search start cluster + if (*curCluster) { + // try to make file contiguous + bgnCluster = *curCluster + 1; + + // don't save new start location + setStart = false; + } else { + // start at likely place for free cluster + bgnCluster = m_allocSearchStart; + + // save next search start if no holes. + setStart = true; + } + // end of group + endCluster = bgnCluster; + + // search the FAT for free clusters + for (uint32_t n = 0;; n++, endCluster++) { + // can't find space checked all clusters + if (n >= m_clusterCount) { + DBG_FAIL_MACRO; + goto fail; + } + // past end - start from beginning of FAT + if (endCluster > fatEnd) { + bgnCluster = endCluster = 2; + } + uint32_t f; + if (!fatGet(endCluster, &f)) { + DBG_FAIL_MACRO; + goto fail; + } + + if (f != 0) { + // don't update search start if unallocated clusters before endCluster. + if (bgnCluster != endCluster) setStart = false; + // cluster in use try next cluster as bgnCluster + bgnCluster = endCluster + 1; + } else if ((endCluster - bgnCluster + 1) == count) { + // done - found space + break; + } + } + // remember possible next free cluster + if (setStart) m_allocSearchStart = endCluster + 1; + + // mark end of chain + if (!fatPutEOC(endCluster)) { + DBG_FAIL_MACRO; + goto fail; + } + // link clusters + while (endCluster > bgnCluster) { + if (!fatPut(endCluster - 1, endCluster)) { + DBG_FAIL_MACRO; + goto fail; + } + endCluster--; + } + if (*curCluster != 0) { + // connect chains + if (!fatPut(*curCluster, bgnCluster)) { + DBG_FAIL_MACRO; + goto fail; + } + } + // return first cluster number to caller + *curCluster = bgnCluster; + return true; + + fail: + return false; +} +//============================================================================== +// cache functions +#if USE_SEPARATE_FAT_CACHE +//------------------------------------------------------------------------------ +cache_t* SdVolume::cacheFetch(uint32_t blockNumber, uint8_t options) { + return cacheFetchData(blockNumber, options); +} +//------------------------------------------------------------------------------ +cache_t* SdVolume::cacheFetchData(uint32_t blockNumber, uint8_t options) { + if (m_cacheBlockNumber != blockNumber) { + if (!cacheWriteData()) { + DBG_FAIL_MACRO; + goto fail; + } + if (!(options & CACHE_OPTION_NO_READ)) { + if (!m_sdCard->readBlock(blockNumber, m_cacheBuffer.data)) { + DBG_FAIL_MACRO; + goto fail; + } + } + m_cacheStatus = 0; + m_cacheBlockNumber = blockNumber; + } + m_cacheStatus |= options & CACHE_STATUS_MASK; + return &m_cacheBuffer; + + fail: + return 0; +} +//------------------------------------------------------------------------------ +cache_t* SdVolume::cacheFetchFat(uint32_t blockNumber, uint8_t options) { + if (m_cacheFatBlockNumber != blockNumber) { + if (!cacheWriteFat()) { + DBG_FAIL_MACRO; + goto fail; + } + if (!(options & CACHE_OPTION_NO_READ)) { + if (!m_sdCard->readBlock(blockNumber, m_cacheFatBuffer.data)) { + DBG_FAIL_MACRO; + goto fail; + } + } + m_cacheFatStatus = 0; + m_cacheFatBlockNumber = blockNumber; + } + m_cacheFatStatus |= options & CACHE_STATUS_MASK; + return &m_cacheFatBuffer; + + fail: + return 0; +} +//------------------------------------------------------------------------------ +bool SdVolume::cacheSync() { + return cacheWriteData() && cacheWriteFat(); +} +//------------------------------------------------------------------------------ +bool SdVolume::cacheWriteData() { + if (m_cacheStatus & CACHE_STATUS_DIRTY) { + if (!m_sdCard->writeBlock(m_cacheBlockNumber, m_cacheBuffer.data)) { + DBG_FAIL_MACRO; + goto fail; + } + m_cacheStatus &= ~CACHE_STATUS_DIRTY; + } + return true; + + fail: + return false; +} +//------------------------------------------------------------------------------ +bool SdVolume::cacheWriteFat() { + if (m_cacheFatStatus & CACHE_STATUS_DIRTY) { + if (!m_sdCard->writeBlock(m_cacheFatBlockNumber, m_cacheFatBuffer.data)) { + DBG_FAIL_MACRO; + goto fail; + } + // mirror second FAT + if (m_fatCount > 1) { + uint32_t lbn = m_cacheFatBlockNumber + m_blocksPerFat; + if (!m_sdCard->writeBlock(lbn, m_cacheFatBuffer.data)) { + DBG_FAIL_MACRO; + goto fail; + } + } + m_cacheFatStatus &= ~CACHE_STATUS_DIRTY; + } + return true; + + fail: + return false; +} +#else // USE_SEPARATE_FAT_CACHE +//------------------------------------------------------------------------------ +cache_t* SdVolume::cacheFetch(uint32_t blockNumber, uint8_t options) { + if (m_cacheBlockNumber != blockNumber) { + if (!cacheSync()) { + DBG_FAIL_MACRO; + goto fail; + } + if (!(options & CACHE_OPTION_NO_READ)) { + if (!m_sdCard->readBlock(blockNumber, m_cacheBuffer.data)) { + DBG_FAIL_MACRO; + goto fail; + } + } + m_cacheStatus = 0; + m_cacheBlockNumber = blockNumber; + } + m_cacheStatus |= options & CACHE_STATUS_MASK; + return &m_cacheBuffer; + + fail: + return 0; +} +//------------------------------------------------------------------------------ +cache_t* SdVolume::cacheFetchFat(uint32_t blockNumber, uint8_t options) { + return cacheFetch(blockNumber, options | CACHE_STATUS_FAT_BLOCK); +} +//------------------------------------------------------------------------------ +bool SdVolume::cacheSync() { + if (m_cacheStatus & CACHE_STATUS_DIRTY) { + if (!m_sdCard->writeBlock(m_cacheBlockNumber, m_cacheBuffer.data)) { + DBG_FAIL_MACRO; + goto fail; + } + // mirror second FAT + if ((m_cacheStatus & CACHE_STATUS_FAT_BLOCK) && m_fatCount > 1) { + uint32_t lbn = m_cacheBlockNumber + m_blocksPerFat; + if (!m_sdCard->writeBlock(lbn, m_cacheBuffer.data)) { + DBG_FAIL_MACRO; + goto fail; + } + } + m_cacheStatus &= ~CACHE_STATUS_DIRTY; + } + return true; + + fail: + return false; +} +//------------------------------------------------------------------------------ +bool SdVolume::cacheWriteData() { + return cacheSync(); +} +#endif // USE_SEPARATE_FAT_CACHE +//------------------------------------------------------------------------------ +void SdVolume::cacheInvalidate() { + m_cacheBlockNumber = 0XFFFFFFFF; + m_cacheStatus = 0; +} +//============================================================================== +//------------------------------------------------------------------------------ +uint32_t SdVolume::clusterStartBlock(uint32_t cluster) const { + return m_dataStartBlock + ((cluster - 2) << m_clusterSizeShift); +} +//------------------------------------------------------------------------------ +// Fetch a FAT entry +bool SdVolume::fatGet(uint32_t cluster, uint32_t* value) { + uint32_t lba; + cache_t* pc; + // error if reserved cluster of beyond FAT + if (cluster < 2 || cluster > (m_clusterCount + 1)) { + DBG_FAIL_MACRO; + goto fail; + } + if (FAT12_SUPPORT && m_fatType == 12) { + uint16_t index = cluster; + index += index >> 1; + lba = m_fatStartBlock + (index >> 9); + pc = cacheFetchFat(lba, CACHE_FOR_READ); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + index &= 0X1FF; + uint16_t tmp = pc->data[index]; + index++; + if (index == 512) { + pc = cacheFetchFat(lba + 1, CACHE_FOR_READ); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + index = 0; + } + tmp |= pc->data[index] << 8; + *value = cluster & 1 ? tmp >> 4 : tmp & 0XFFF; + return true; + } + if (m_fatType == 16) { + lba = m_fatStartBlock + (cluster >> 8); + } else if (m_fatType == 32) { + lba = m_fatStartBlock + (cluster >> 7); + } else { + DBG_FAIL_MACRO; + goto fail; + } + pc = cacheFetchFat(lba, CACHE_FOR_READ); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + if (m_fatType == 16) { + *value = pc->fat16[cluster & 0XFF]; + } else { + *value = pc->fat32[cluster & 0X7F] & FAT32MASK; + } + return true; + + fail: + return false; +} +//------------------------------------------------------------------------------ +// Store a FAT entry +bool SdVolume::fatPut(uint32_t cluster, uint32_t value) { + uint32_t lba; + cache_t* pc; + // error if reserved cluster of beyond FAT + if (cluster < 2 || cluster > (m_clusterCount + 1)) { + DBG_FAIL_MACRO; + goto fail; + } + if (FAT12_SUPPORT && m_fatType == 12) { + uint16_t index = cluster; + index += index >> 1; + lba = m_fatStartBlock + (index >> 9); + pc = cacheFetchFat(lba, CACHE_FOR_WRITE); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + index &= 0X1FF; + uint8_t tmp = value; + if (cluster & 1) { + tmp = (pc->data[index] & 0XF) | tmp << 4; + } + pc->data[index] = tmp; + + index++; + if (index == 512) { + lba++; + index = 0; + pc = cacheFetchFat(lba, CACHE_FOR_WRITE); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + } + tmp = value >> 4; + if (!(cluster & 1)) { + tmp = ((pc->data[index] & 0XF0)) | tmp >> 4; + } + pc->data[index] = tmp; + return true; + } + if (m_fatType == 16) { + lba = m_fatStartBlock + (cluster >> 8); + } else if (m_fatType == 32) { + lba = m_fatStartBlock + (cluster >> 7); + } else { + DBG_FAIL_MACRO; + goto fail; + } + pc = cacheFetchFat(lba, CACHE_FOR_WRITE); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + // store entry + if (m_fatType == 16) { + pc->fat16[cluster & 0XFF] = value; + } else { + pc->fat32[cluster & 0X7F] = value; + } + return true; + + fail: + return false; +} +//------------------------------------------------------------------------------ +// free a cluster chain +bool SdVolume::freeChain(uint32_t cluster) { + uint32_t next; + + do { + if (!fatGet(cluster, &next)) { + DBG_FAIL_MACRO; + goto fail; + } + // free cluster + if (!fatPut(cluster, 0)) { + DBG_FAIL_MACRO; + goto fail; + } + if (cluster < m_allocSearchStart) m_allocSearchStart = cluster; + cluster = next; + } while (!isEOC(cluster)); + + return true; + + fail: + return false; +} +//------------------------------------------------------------------------------ +/** Volume free space in clusters. + * + * \return Count of free clusters for success or -1 if an error occurs. + */ +int32_t SdVolume::freeClusterCount() { + uint32_t free = 0; + uint32_t lba; + uint32_t todo = m_clusterCount + 2; + uint16_t n; + + if (FAT12_SUPPORT && m_fatType == 12) { + for (unsigned i = 2; i < todo; i++) { + uint32_t c; + if (!fatGet(i, &c)) { + DBG_FAIL_MACRO; + goto fail; + } + if (c == 0) free++; + } + } else if (m_fatType == 16 || m_fatType == 32) { + lba = m_fatStartBlock; + while (todo) { + cache_t* pc = cacheFetchFat(lba++, CACHE_FOR_READ); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + n = m_fatType == 16 ? 256 : 128; + if (todo < n) n = todo; + if (m_fatType == 16) { + for (uint16_t i = 0; i < n; i++) { + if (pc->fat16[i] == 0) free++; + } + } else { + for (uint16_t i = 0; i < n; i++) { + if (pc->fat32[i] == 0) free++; + } + } + todo -= n; + } + } else { + // invalid FAT type + DBG_FAIL_MACRO; + goto fail; + } + return free; + + fail: + return -1; +} +//------------------------------------------------------------------------------ +/** Initialize a FAT volume. + * + * \param[in] dev The SD card where the volume is located. + * + * \param[in] part The partition to be used. Legal values for \a part are + * 1-4 to use the corresponding partition on a device formatted with + * a MBR, Master Boot Record, or zero if the device is formatted as + * a super floppy with the FAT boot sector in block zero. + * + * \return The value one, true, is returned for success and + * the value zero, false, is returned for failure. Reasons for + * failure include not finding a valid partition, not finding a valid + * FAT file system in the specified partition or an I/O error. + */ +bool SdVolume::init(Sd2Card* dev, uint8_t part) { + uint8_t tmp; + uint32_t totalBlocks; + uint32_t volumeStartBlock = 0; + fat32_boot_t* fbs; + cache_t* pc; + m_sdCard = dev; + m_fatType = 0; + m_allocSearchStart = 2; + m_cacheStatus = 0; // cacheSync() will write block if true + m_cacheBlockNumber = 0XFFFFFFFF; +#if USE_SEPARATE_FAT_CACHE + m_cacheFatStatus = 0; // cacheSync() will write block if true + m_cacheFatBlockNumber = 0XFFFFFFFF; +#endif // USE_SEPARATE_FAT_CACHE + // if part == 0 assume super floppy with FAT boot sector in block zero + // if part > 0 assume mbr volume with partition table + if (part) { + if (part > 4) { + DBG_FAIL_MACRO; + goto fail; + } + pc = cacheFetch(volumeStartBlock, CACHE_FOR_READ); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + part_t* p = &pc->mbr.part[part-1]; + if ((p->boot & 0X7F) != 0 || p->firstSector == 0) { + // not a valid partition + DBG_FAIL_MACRO; + goto fail; + } + volumeStartBlock = p->firstSector; + } + pc = cacheFetch(volumeStartBlock, CACHE_FOR_READ); + if (!pc) { + DBG_FAIL_MACRO; + goto fail; + } + fbs = &(pc->fbs32); + if (fbs->bytesPerSector != 512 || + fbs->fatCount == 0 || + fbs->reservedSectorCount == 0) { + // not valid FAT volume + DBG_FAIL_MACRO; + goto fail; + } + m_fatCount = fbs->fatCount; + m_blocksPerCluster = fbs->sectorsPerCluster; + + m_clusterBlockMask = m_blocksPerCluster - 1; + + // determine shift that is same as multiply by m_blocksPerCluster + m_clusterSizeShift = 0; + for (tmp = 1; m_blocksPerCluster != tmp; m_clusterSizeShift++) { + tmp <<= 1; + if (tmp == 0) { + DBG_FAIL_MACRO; + goto fail; + } + } + + m_blocksPerFat = fbs->sectorsPerFat16 ? + fbs->sectorsPerFat16 : fbs->sectorsPerFat32; + + m_fatStartBlock = volumeStartBlock + fbs->reservedSectorCount; + + // count for FAT16 zero for FAT32 + m_rootDirEntryCount = fbs->rootDirEntryCount; + + // directory start for FAT16 dataStart for FAT32 + m_rootDirStart = m_fatStartBlock + fbs->fatCount * m_blocksPerFat; + + // data start for FAT16 and FAT32 + m_dataStartBlock = m_rootDirStart + ((32 * fbs->rootDirEntryCount + 511)/512); + + // total blocks for FAT16 or FAT32 + totalBlocks = fbs->totalSectors16 ? + fbs->totalSectors16 : fbs->totalSectors32; + // total data blocks + m_clusterCount = totalBlocks - (m_dataStartBlock - volumeStartBlock); + + // divide by cluster size to get cluster count + m_clusterCount >>= m_clusterSizeShift; + + // FAT type is determined by cluster count + if (m_clusterCount < 4085) { + m_fatType = 12; + if (!FAT12_SUPPORT) { + DBG_FAIL_MACRO; + goto fail; + } + } else if (m_clusterCount < 65525) { + m_fatType = 16; + } else { + m_rootDirStart = fbs->fat32RootCluster; + m_fatType = 32; + } + return true; + + fail: + return false; +} diff --git a/libs/SdFatBeta20120108/SdFat/SdVolume.h b/libs/SdFat-master/SdFat/SdVolume.h similarity index 50% rename from libs/SdFatBeta20120108/SdFat/SdVolume.h rename to libs/SdFat-master/SdFat/SdVolume.h index 1f65aef..d9d4dc2 100755 --- a/libs/SdFatBeta20120108/SdFat/SdVolume.h +++ b/libs/SdFat-master/SdFat/SdVolume.h @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -25,8 +25,7 @@ */ #include #include -#include - +#include //============================================================================== // SdVolume class /** @@ -58,15 +57,15 @@ union cache_t { class SdVolume { public: /** Create an instance of SdVolume */ - SdVolume() : fatType_(0) {} + SdVolume() : m_fatType(0) {} /** Clear the cache and returns a pointer to the cache. Used by the WaveRP * recorder to do raw write to the SD card. Not for normal apps. * \return A pointer to the cache buffer or zero if an error occurs. */ cache_t* cacheClear() { - if (!cacheFlush()) return 0; - cacheBlockNumber_ = 0XFFFFFFFF; - return &cacheBuffer_; + if (!cacheSync()) return 0; + m_cacheBlockNumber = 0XFFFFFFFF; + return &m_cacheBuffer; } /** Initialize a FAT volume. Try partition one first then try super * floppy format. @@ -83,31 +82,32 @@ class SdVolume { // inline functions that return volume info /** \return The volume's cluster size in blocks. */ - uint8_t blocksPerCluster() const {return blocksPerCluster_;} + uint8_t blocksPerCluster() const {return m_blocksPerCluster;} /** \return The number of blocks in one FAT. */ - uint32_t blocksPerFat() const {return blocksPerFat_;} + uint32_t blocksPerFat() const {return m_blocksPerFat;} /** \return The total number of clusters in the volume. */ - uint32_t clusterCount() const {return clusterCount_;} + uint32_t clusterCount() const {return m_clusterCount;} /** \return The shift count required to multiply by blocksPerCluster. */ - uint8_t clusterSizeShift() const {return clusterSizeShift_;} + uint8_t clusterSizeShift() const {return m_clusterSizeShift;} /** \return The logical block number for the start of file data. */ - uint32_t dataStartBlock() const {return dataStartBlock_;} + uint32_t dataStartBlock() const {return clusterStartBlock(2);} /** \return The number of FAT structures on the volume. */ - uint8_t fatCount() const {return fatCount_;} + uint8_t fatCount() const {return m_fatCount;} /** \return The logical block number for the start of the first FAT. */ - uint32_t fatStartBlock() const {return fatStartBlock_;} + uint32_t fatStartBlock() const {return m_fatStartBlock;} /** \return The FAT type of the volume. Values are 12, 16 or 32. */ - uint8_t fatType() const {return fatType_;} + uint8_t fatType() const {return m_fatType;} int32_t freeClusterCount(); /** \return The number of entries in the root directory for FAT16 volumes. */ - uint32_t rootDirEntryCount() const {return rootDirEntryCount_;} + uint32_t rootDirEntryCount() const {return m_rootDirEntryCount;} /** \return The logical block number for the start of the root directory on FAT16 volumes or the first cluster number on FAT32 volumes. */ - uint32_t rootDirStart() const {return rootDirStart_;} + uint32_t rootDirStart() const {return m_rootDirStart;} /** Sd2Card object for this volume * \return pointer to Sd2Card object. */ - Sd2Card* sdCard() {return sdCard_;} + Sd2Card* sdCard() {return m_sdCard;} + /** Debug access to FAT table * * \param[in] n cluster number. @@ -119,58 +119,83 @@ class SdVolume { private: // Allow SdBaseFile access to SdVolume private data. friend class SdBaseFile; - - // value for dirty argument in cacheRawBlock to indicate read from cache - static bool const CACHE_FOR_READ = false; - // value for dirty argument in cacheRawBlock to indicate write to cache - static bool const CACHE_FOR_WRITE = true; - +//------------------------------------------------------------------------------ + uint32_t m_allocSearchStart; // Start cluster for alloc search. + uint8_t m_blocksPerCluster; // Cluster size in blocks. + uint8_t m_clusterBlockMask; // Mask to extract block of cluster. + uint32_t m_clusterCount; // Clusters in one FAT. + uint8_t m_clusterSizeShift; // Cluster count to block count shift. + uint32_t m_dataStartBlock; // First data block number. + uint32_t m_fatStartBlock; // Start block for first FAT. + uint8_t m_fatType; // Volume type (12, 16, OR 32). + uint16_t m_rootDirEntryCount; // Number of entries in FAT16 root dir. + uint32_t m_rootDirStart; // Start block for FAT16, cluster for FAT32. +//------------------------------------------------------------------------------ +// block caches +// use of static functions save a bit of flash - maybe not worth complexity +// + static const uint8_t CACHE_STATUS_DIRTY = 1; + static const uint8_t CACHE_STATUS_FAT_BLOCK = 2; + static const uint8_t CACHE_STATUS_MASK + = CACHE_STATUS_DIRTY | CACHE_STATUS_FAT_BLOCK; + static const uint8_t CACHE_OPTION_NO_READ = 4; + // value for option argument in cacheFetch to indicate read from cache + static uint8_t const CACHE_FOR_READ = 0; + // value for option argument in cacheFetch to indicate write to cache + static uint8_t const CACHE_FOR_WRITE = CACHE_STATUS_DIRTY; + // reserve cache block with no read + static uint8_t const CACHE_RESERVE_FOR_WRITE + = CACHE_STATUS_DIRTY | CACHE_OPTION_NO_READ; #if USE_MULTIPLE_CARDS - cache_t cacheBuffer_; // 512 byte cache for device blocks - uint32_t cacheBlockNumber_; // Logical number of block in the cache - Sd2Card* sdCard_; // Sd2Card object for cache - bool cacheDirty_; // cacheFlush() will write block if true - uint32_t cacheMirrorBlock_; // block number for mirror FAT + uint8_t m_fatCount; // number of FATs on volume + uint32_t m_blocksPerFat; // FAT size in blocks + cache_t m_cacheBuffer; // 512 byte cache for device blocks + uint32_t m_cacheBlockNumber; // Logical number of block in the cache + Sd2Card* m_sdCard; // Sd2Card object for cache + uint8_t m_cacheStatus; // status of cache block +#if USE_SEPARATE_FAT_CACHE + cache_t m_cacheFatBuffer; // 512 byte cache for FAT + uint32_t m_cacheFatBlockNumber; // current Fat block number + uint8_t m_cacheFatStatus; // status of cache Fatblock +#endif // USE_SEPARATE_FAT_CACHE #else // USE_MULTIPLE_CARDS - static cache_t cacheBuffer_; // 512 byte cache for device blocks - static uint32_t cacheBlockNumber_; // Logical number of block in the cache - static Sd2Card* sdCard_; // Sd2Card object for cache - static bool cacheDirty_; // cacheFlush() will write block if true - static uint32_t cacheMirrorBlock_; // block number for mirror FAT + static uint8_t m_fatCount; // number of FATs on volume + static uint32_t m_blocksPerFat; // FAT size in blocks + static cache_t m_cacheBuffer; // 512 byte cache for device blocks + static uint32_t m_cacheBlockNumber; // Logical number of block in the cache + static uint8_t m_cacheStatus; // status of cache block +#if USE_SEPARATE_FAT_CACHE + static cache_t m_cacheFatBuffer; // 512 byte cache for FAT + static uint32_t m_cacheFatBlockNumber; // current Fat block number + static uint8_t m_cacheFatStatus; // status of cache Fatblock +#endif // USE_SEPARATE_FAT_CACHE + static Sd2Card* m_sdCard; // Sd2Card object for cache #endif // USE_MULTIPLE_CARDS - uint32_t allocSearchStart_; // start cluster for alloc search - uint8_t blocksPerCluster_; // cluster size in blocks - uint32_t blocksPerFat_; // FAT size in blocks - uint32_t clusterCount_; // clusters in one FAT - uint8_t clusterSizeShift_; // shift to convert cluster count to block count - uint32_t dataStartBlock_; // first data block number - uint8_t fatCount_; // number of FATs on volume - uint32_t fatStartBlock_; // start block for first FAT - uint8_t fatType_; // volume type (12, 16, OR 32) - uint16_t rootDirEntryCount_; // number of entries in FAT16 root dir - uint32_t rootDirStart_; // root start block for FAT16, cluster for FAT32 - //---------------------------------------------------------------------------- - bool allocContiguous(uint32_t count, uint32_t* curCluster); - uint8_t blockOfCluster(uint32_t position) const { - return (position >> 9) & (blocksPerCluster_ - 1);} - uint32_t clusterStartBlock(uint32_t cluster) const { - return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_);} - cache_t *cache() {return &cacheBuffer_;} - uint32_t cacheBlockNumber() {return cacheBlockNumber_;} + + cache_t *cacheAddress() {return &m_cacheBuffer;} + uint32_t cacheBlockNumber() {return m_cacheBlockNumber;} #if USE_MULTIPLE_CARDS - bool cacheFlush(); - bool cacheRawBlock(uint32_t blockNumber, bool dirty); + cache_t* cacheFetch(uint32_t blockNumber, uint8_t options); + cache_t* cacheFetchData(uint32_t blockNumber, uint8_t options); + cache_t* cacheFetchFat(uint32_t blockNumber, uint8_t options); + void cacheInvalidate(); + bool cacheSync(); + bool cacheWriteData(); + bool cacheWriteFat(); #else // USE_MULTIPLE_CARDS - static bool cacheFlush(); - static bool cacheRawBlock(uint32_t blockNumber, bool dirty); + static cache_t* cacheFetch(uint32_t blockNumber, uint8_t options); + static cache_t* cacheFetchData(uint32_t blockNumber, uint8_t options); + static cache_t* cacheFetchFat(uint32_t blockNumber, uint8_t options); + static void cacheInvalidate(); + static bool cacheSync(); + static bool cacheWriteData(); + static bool cacheWriteFat(); #endif // USE_MULTIPLE_CARDS - // used by SdBaseFile write to assign cache to SD location - void cacheSetBlockNumber(uint32_t blockNumber, bool dirty) { - cacheDirty_ = dirty; - cacheBlockNumber_ = blockNumber; - } - void cacheSetDirty() {cacheDirty_ |= CACHE_FOR_WRITE;} - bool chainSize(uint32_t beginCluster, uint32_t* size); +//------------------------------------------------------------------------------ + bool allocContiguous(uint32_t count, uint32_t* curCluster); + uint8_t blockOfCluster(uint32_t position) const { + return (position >> 9) & m_clusterBlockMask;} + uint32_t clusterStartBlock(uint32_t cluster) const; bool fatGet(uint32_t cluster, uint32_t* value); bool fatPut(uint32_t cluster, uint32_t value); bool fatPutEOC(uint32_t cluster) { @@ -178,32 +203,14 @@ class SdVolume { } bool freeChain(uint32_t cluster); bool isEOC(uint32_t cluster) const { - if (FAT12_SUPPORT && fatType_ == 12) return cluster >= FAT12EOC_MIN; - if (fatType_ == 16) return cluster >= FAT16EOC_MIN; + if (FAT12_SUPPORT && m_fatType == 12) return cluster >= FAT12EOC_MIN; + if (m_fatType == 16) return cluster >= FAT16EOC_MIN; return cluster >= FAT32EOC_MIN; } bool readBlock(uint32_t block, uint8_t* dst) { - return sdCard_->readBlock(block, dst);} + return m_sdCard->readBlock(block, dst);} bool writeBlock(uint32_t block, const uint8_t* dst) { - return sdCard_->writeBlock(block, dst); - } -//------------------------------------------------------------------------------ - // Deprecated functions - suppress cpplint warnings with NOLINT comment -#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN) - public: - /** \deprecated Use: bool SdVolume::init(Sd2Card* dev); - * \param[in] dev The SD card where the volume is located. - * \return true for success or false for failure. - */ - bool init(Sd2Card& dev) {return init(&dev);} // NOLINT - /** \deprecated Use: bool SdVolume::init(Sd2Card* dev, uint8_t vol); - * \param[in] dev The SD card where the volume is located. - * \param[in] part The partition to be used. - * \return true for success or false for failure. - */ - bool init(Sd2Card& dev, uint8_t part) { // NOLINT - return init(&dev, part); + return m_sdCard->writeBlock(block, dst); } -#endif // ALLOW_DEPRECATED_FUNCTIONS }; #endif // SdVolume diff --git a/libs/SdFat-master/SdFat/StdioStream.cpp b/libs/SdFat-master/SdFat/StdioStream.cpp new file mode 100755 index 0000000..41bf0f0 --- /dev/null +++ b/libs/SdFat-master/SdFat/StdioStream.cpp @@ -0,0 +1,531 @@ +/* Arduino RamDisk Library + * Copyright (C) 2014 by William Greiman + * + * This file is part of the Arduino RamDisk Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino RamDisk Library. If not, see + * . + */ +#include +#include +#include +//------------------------------------------------------------------------------ +int StdioStream::fclose() { + int rtn = 0; + if (!m_flags) { + return EOF; + } + if (m_flags & F_SWR) { + if (!flushBuf()) rtn = EOF; + } + if (!SdBaseFile::close()) rtn = EOF; + m_r = 0; + m_w = 0; + m_flags = 0; + return rtn; +} +//------------------------------------------------------------------------------ +int StdioStream::fflush() { + if ((m_flags & (F_SWR | F_SRW)) && !(m_flags & F_SRD)) { + if (flushBuf() && SdBaseFile::sync()) return 0; + } + return EOF; +} +//------------------------------------------------------------------------------ +char* StdioStream::fgets(char* str, int num, size_t* len) { + char* s = str; + size_t n; + if (num-- <= 0) return 0; + while (num) { + if ((n = m_r) == 0) { + if (!fillBuf()) { + if (s == str) return 0; + break; + } + n = m_r; + } + if (n > num) n = num; + uint8_t* end = reinterpret_cast(memchr(m_p, '\n', n)); + if (end != 0) { + n = ++end - m_p; + memcpy(s, m_p, n); + m_r -= n; + m_p = end; + s += n; + break; + } + memcpy(s, m_p, n); + m_r -= n; + m_p += n; + s += n; + num -= n; + } + *s = 0; + if (len) *len = s - str; + return str; +} +//------------------------------------------------------------------------------ +bool StdioStream::fopen(const char* filename, const char* mode) { + uint8_t oflags; + switch (*mode++) { + case 'a': + m_flags = F_SWR; + oflags = O_WRITE | O_CREAT | O_APPEND | O_AT_END; + break; + + case 'r': + m_flags = F_SRD; + oflags = O_READ; + break; + + case 'w': + m_flags = F_SWR; + oflags = O_WRITE | O_CREAT | O_TRUNC; + break; + + default: + goto fail; + } + while (*mode) { + switch (*mode++) { + case '+': + m_flags |= F_SRW; + oflags |= O_RDWR; + break; + + case 'b': + break; + + case 'x': + oflags |= O_EXCL; + break; + + default: + goto fail; + } + } + if ((oflags & O_EXCL) && !(oflags & O_WRITE)) goto fail; + if (!SdBaseFile::open(filename, oflags)) goto fail; + m_r = 0; + m_w = 0; + m_p = m_buf; + return true; + + fail: + m_flags = 0; + return false; +} +//------------------------------------------------------------------------------ +int StdioStream::fputs(const char* str) { + size_t len = strlen(str); + return fwrite(str, 1, len) == len ? len : EOF; +} +//------------------------------------------------------------------------------ +int StdioStream::fputs_P(PGM_P str) { + PGM_P bgn = str; + for (char c; (c = pgm_read_byte(str)); str++) { + if (putc(c) < 0) return EOF; + } + return str - bgn; +} +//------------------------------------------------------------------------------ +size_t StdioStream::fread(void* ptr, size_t size, size_t count) { + uint8_t* dst = reinterpret_cast(ptr); + size_t total = size*count; + if (total == 0) return 0; + size_t need = total; + while (need > m_r) { + memcpy(dst, m_p, m_r); + dst += m_r; + m_p += m_r; + need -= m_r; + if (!fillBuf()) { + return (total - need)/size; + } + } + memcpy(dst, m_p, need); + m_r -= need; + m_p += need; + return count; +} +//------------------------------------------------------------------------------ +int StdioStream::fseek(int32_t offset, int origin) { + int32_t pos; + if (m_flags & F_SWR) { + if (!flushBuf()) { + goto fail; + } + } + switch (origin) { + case SEEK_CUR: + pos = ftell(); + if (pos < 0) { + goto fail; + } + pos += offset; + if (!SdBaseFile::seekCur(pos)) { + goto fail; + } + break; + + case SEEK_SET: + if (!SdBaseFile::seekSet(offset)) { + goto fail; + } + break; + + case SEEK_END: + if (!SdBaseFile::seekEnd(offset)) { + goto fail; + } + break; + + default: + goto fail; + } + m_r = 0; + m_p = m_buf; + return 0; + + fail: + return EOF; +} +//------------------------------------------------------------------------------ +int32_t StdioStream::ftell() { + uint32_t pos = SdBaseFile::curPosition(); + if (m_flags & F_SRD) { + if (m_r > pos) return -1L; + pos -= m_r; + } else if (m_flags & F_SWR) { + pos += m_p - m_buf; + } + return pos; +} +//------------------------------------------------------------------------------ +size_t StdioStream::fwrite(const void* ptr, size_t size, size_t count) { + return write(ptr, count*size) < 0 ? EOF : count; +#if 0 //////////////////////////////////////////////////////////////////////////////////// + const uint8_t* src = static_cast(ptr); + size_t total = count*size; + if (total == 0) return 0; + size_t todo = total; + + while (todo > m_w) { + memcpy(m_p, src, m_w); + m_p += m_w; + src += m_w; + todo -= m_w; + if (!flushBuf()) { + return (total - todo)/size; + } + } + memcpy(m_p, src, todo); + m_p += todo; + m_w -= todo; + return count; +#endif ////////////////////////////////////////////////////////////////////////////////// +} +//------------------------------------------------------------------------------ + int StdioStream::write(const void* buf, size_t count) { + const uint8_t* src = static_cast(buf); + size_t todo = count; + + while (todo > m_w) { + memcpy(m_p, src, m_w); + m_p += m_w; + src += m_w; + todo -= m_w; + if (!flushBuf()) return EOF; + } + memcpy(m_p, src, todo); + m_p += todo; + m_w -= todo; + return count; +} +//------------------------------------------------------------------------------ +size_t StdioStream::print(const __FlashStringHelper *str) { + const char PROGMEM *p = (const char PROGMEM *)str; + uint8_t c; + while (c = pgm_read_byte(p)) { + if (putc(c) < 0) return 0; + p++; + } + return p - (const char PROGMEM *)str; +} +//------------------------------------------------------------------------------ +int StdioStream::printDec(float value, uint8_t prec) { +#define FLOAT_NEW_WAY +#ifdef FLOAT_NEW_WAY + char buf[24]; + char *ptr = fmtFloat(value, buf + sizeof(buf), prec); + // return fputs(ptr); + // uint8_t len = buf + sizeof(buf) - ptr; + return write(ptr, buf + sizeof(buf) - ptr); +#else + char* ptr; + uint8_t rtn = 0; + uint8_t sign = 0; + if (value < 0) { + value = -value; + sign = '-'; + } + // check for NaN INF OVF + if (isnan(value)) { + if (fputs_P(PSTR("nan")) < 0) return -1; + rtn += 3; + } else if (isinf(value)) { + if (fputs_P(PSTR("inf")) < 0) return -1; + rtn += 3; + } else if (value > 4294967040.0) { + if (fputs_P(PSTR("ovf")) < 0) return -1;; + rtn += 3; + } else { + if (sign) { + if (putc(sign) < 0) return -1; + rtn++; + } + if (prec > 9) prec = 9; + + /* + uint32_t s = 1; + for (uint8_t i = 0; i < prec; i++) { + // s *= 10; + s = ((s << 2) + s) << 1; + } + // round value + value += 0.5/s; + */ + value += scale10(0.5, -prec); + uint32_t whole = value; + int np; + if ((np = printDec(whole)) < 0) return -1; + rtn += np; + if (prec) { + if (putc('.') < 0) return -1; + char* str = fmtSpace(prec); + if (!str) return -1; + char* tmp = str - prec; + + // uint32_t fraction = s*(value - whole); + uint32_t fraction = scale10(value - whole, prec); + ptr = fmtDec(fraction, str); + while (ptr > tmp) *--ptr = '0'; + rtn += prec + 1; + } + } + return rtn; + #endif +} +//------------------------------------------------------------------------------ +int StdioStream::printDec(signed char n) { + uint8_t s = 0; + if (n < 0) { + if (fputc('-') < 0) return -1; + n = -n; + s = 1; + } + printDec((unsigned char)n); +} +//------------------------------------------------------------------------------ +int StdioStream::printDec(int16_t n) { + int s; + uint8_t rtn = 0; + if (n < 0) { + if (fputc('-') < 0) return -1; + n = -n; + rtn++; + } + if ((s = printDec((uint16_t)n)) < 0) return s; + return rtn; +} +//------------------------------------------------------------------------------ +int StdioStream::printDec(uint16_t n) { +#define NEW_WAY +#ifdef NEW_WAY + char buf[5]; + char *ptr = fmtDec(n, buf + sizeof(buf)); + uint8_t len = buf + sizeof(buf) - ptr; + return write(ptr, len); +#else + uint8_t len; + if (n < 100) { + len = n < 10 ? 1 : 2; + } else { + len = n < 1000 ? 3 : n < 10000 ? 4 : 5; + } + char* str = fmtSpace(len); + if (!str) return -1; + fmtDec(n, str); + return len; +#endif +} +//------------------------------------------------------------------------------ +int StdioStream::printDec(int32_t n) { + uint8_t s = 0; + if (n < 0) { + if (fputc('-') < 0) return -1; + n = -n; + s = 1; + } + int rtn = printDec((uint32_t)n); + return rtn > 0 ? rtn + s : -1; +} +//------------------------------------------------------------------------------ +int StdioStream::printDec(uint32_t n) { +#ifdef NEW_WAY + char buf[10]; + char *ptr = fmtDec(n, buf + sizeof(buf)); + uint8_t len = buf + sizeof(buf) - ptr; + return write(ptr, len); +#else + uint8_t len; + if (n < 0X10000) { + return printDec((uint16_t)n); + } + if (n < 10000000) { + len = n < 100000 ? 5 : n < 1000000 ? 6 : 7; + } else { + len = n < 100000000 ? 8 : n < 1000000000 ? 9 : 10; + } + + char* str = fmtSpace(len); + if (!str) return -1; + fmtDec(n, str); + return len; +#endif +} +//------------------------------------------------------------------------------ +int StdioStream::printHex(uint32_t n) { +#ifdef NEW_WAY + char buf[8]; + char *ptr = fmtHex(n, buf + sizeof(buf)); + uint8_t len = buf + sizeof(buf) - ptr; + return write(ptr, len); +#else + size_t len; + if (n < 0X10000) { + len = n < 0X10 ? 1 : n < 0X100 ? 2 : n < 0X1000 ? 3 : 4; + } else { + len = n < 0X100000 ? 5 : n < 0X1000000 ? 6 : n < 0X10000000 ? 7 : 8; + } + char* str = fmtSpace(len); + if (!str) return -1; + + do { + uint8_t h = n & 0XF; + *str-- = h + (h < 10 ? '0' : 'A' - 10); + n >>= 4; + } while (n); + return len; +#endif +} +//------------------------------------------------------------------------------ +bool StdioStream::rewind() { + if (m_flags & F_SWR) { + if (!flushBuf()) return false; + } + SdBaseFile::seekSet(0); + m_r = 0; + return true; +} +//------------------------------------------------------------------------------ +int StdioStream::ungetc(int c) { + // error if EOF. + if (c == EOF) return EOF; + // error if not reading. + if ((m_flags & F_SRD) == 0) return EOF; + // error if no space. + if (m_p == m_buf) return EOF; + m_r++; + m_flags &= ~F_EOF; + return *--m_p = (uint8_t)c; +} +//============================================================================== +// private +//------------------------------------------------------------------------------ +int StdioStream::fillGet() { + if (!fillBuf()) { + return EOF; + } + m_r--; + return *m_p++; +} +//------------------------------------------------------------------------------ +// private +bool StdioStream::fillBuf() { + if (!(m_flags & F_SRD)) { /////////////check for F_ERR and F_EOF ??///////////////// + if (!(m_flags & F_SRW)) { + m_flags |= F_ERR; + return false; + } + if (m_flags & F_SWR) { + if (!flushBuf()) { + return false; + } + m_flags &= ~F_SWR; + m_flags |= F_SRD; + m_w = 0; + } + } + m_p = m_buf + UNGETC_BUF_SIZE; + int nr = SdBaseFile::read(m_p, sizeof(m_buf) - UNGETC_BUF_SIZE); + if (nr <= 0) { + m_flags |= nr < 0 ? F_ERR : F_EOF; + m_r = 0; + return false; + } + m_r = nr; + return true; +} +//------------------------------------------------------------------------------ +// private +bool StdioStream::flushBuf() { + if (!(m_flags & F_SWR)) { /////////////////check for F_ERR ??//////////////////////// + if (!(m_flags & F_SRW)) { + m_flags |= F_ERR; + return false; + } + m_flags &= ~F_SRD; + m_flags |= F_SWR; + m_r = 0; + m_w = sizeof(m_buf); + m_p = m_buf; + return true; + } + uint8_t n = m_p - m_buf; + m_p = m_buf; + m_w = sizeof(m_buf); + if (SdBaseFile::write(m_buf, n) == n) return true; + m_flags |= F_ERR; + return false; +} +//------------------------------------------------------------------------------ +int StdioStream::flushPut(uint8_t c) { + if (!flushBuf()) return EOF; + m_w--; + return *m_p++ = c; +} +//------------------------------------------------------------------------------ +char* StdioStream::fmtSpace(uint8_t len) { + if (m_w < len) { + if (!flushBuf() || m_w < len) { + return 0; + } + } + if (len > m_w) return 0; + m_p += len; + m_w -= len; + return reinterpret_cast(m_p); +} + diff --git a/libs/SdFat-master/SdFat/StdioStream.h b/libs/SdFat-master/SdFat/StdioStream.h new file mode 100755 index 0000000..5960900 --- /dev/null +++ b/libs/SdFat-master/SdFat/StdioStream.h @@ -0,0 +1,656 @@ +/* Arduino RamDisk Library + * Copyright (C) 2014 by William Greiman + * + * This file is part of the Arduino RamDisk Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino RamDisk Library. If not, see + * . + */ +#ifndef StdioStream_h +#define StdioStream_h +/** + * \file + * \brief StdioStream class + */ +#include +#include +#include +#include +//------------------------------------------------------------------------------ +/** Total size of stream buffer. The entire buffer is used for output. + * During input UNGETC_BUF_SIZE of this space is reserved for ungetc. + */ +const uint8_t STREAM_BUF_SIZE = 64; +/** Amount of buffer allocated for ungetc during input. */ +const uint8_t UNGETC_BUF_SIZE = 2; +//------------------------------------------------------------------------------ +// Get rid of any macros defined in . +#include +#undef clearerr +#undef fclose +#undef feof +#undef ferror +#undef fflush +#undef fgetc +#undef fgetpos +#undef fgets +#undef fopen +#undef fprintf +#undef fputc +#undef fputs +#undef fread +#undef freopen +#undef fscanf +#undef fseek +#undef fsetpos +#undef ftell +#undef fwrite +#undef getc +#undef getchar +#undef gets +#undef perror +#undef printf +#undef putc +#undef putchar +#undef puts +#undef remove +#undef rename +#undef rewind +#undef scanf +#undef setbuf +#undef setvbuf +#undef sprintf // NOLINT +#undef sscanf +#undef tmpfile +#undef tmpnam +#undef ungetc +#undef vfprintf +#undef vprintf +#undef vsprintf + +// make sure needed macros are defined +#ifndef EOF +/** End-of-file return value. */ +#define EOF (-1) +#endif // EOF +#ifndef NULL +/** Null pointer */ +#define NULL 0 +#endif // NULL +#ifndef SEEK_CUR +/** Seek relative to current position. */ +#define SEEK_CUR 1 +#endif // SEEK_CUR +#ifndef SEEK_END +/** Seek relative to end-of-file. */ +#define SEEK_END 2 +#endif // SEEK_END +#ifndef SEEK_SET +/** Seek relative to start-of-file. */ +#define SEEK_SET 0 +#endif // SEEK_SET +//------------------------------------------------------------------------------ +/** \class StdioStream + * \brief StdioStream implements a minimal stdio stream. + * + * StdioStream does not support subdirectories or long file names. + */ +class StdioStream : private SdBaseFile { + public: + /** Constructor + * + */ + StdioStream() { + m_w = m_r = 0; + m_p = m_buf; + m_flags = 0; + } + //---------------------------------------------------------------------------- + /** Clear the stream's end-of-file and error indicators. */ + void clearerr() {m_flags &= ~(F_ERR | F_EOF);} + //---------------------------------------------------------------------------- + /** Close a stream. + * + * A successful call to the fclose function causes the stream to be + * flushed and the associated file to be closed. Any unwritten buffered + * data is written to the file; any unread buffered data is discarded. + * Whether or not the call succeeds, the stream is disassociated from + * the file. + * + * \return zero if the stream was successfully closed, or EOF if any any + * errors are detected. + */ + int fclose(); + //---------------------------------------------------------------------------- + /** Test the stream's end-of-file indicator. + * \return non-zero if and only if the end-of-file indicator is set. + */ + int feof() {return (m_flags & F_EOF) != 0;} + //---------------------------------------------------------------------------- + /** Test the stream's error indicator. + * \return return non-zero if and only if the error indicator is set. + */ + int ferror() {return (m_flags & F_ERR) != 0;} + //---------------------------------------------------------------------------- + /** Flush the stream. + * + * If stream is an output stream or an update stream in which the most + * recent operation was not input, any unwritten data is written to the + * file; otherwise the call is an error since any buffered input data + * would be lost. + * + * \return sets the error indicator for the stream and returns EOF if an + * error occurs, otherwise it returns zero. + */ + int fflush(); + //---------------------------------------------------------------------------- + /** Get a byte from the stream. + * + * \return If the end-of-file indicator for the stream is set, or if the + * stream is at end-of-file, the end-of-file indicator for the stream is + * set and the fgetc function returns EOF. Otherwise, the fgetc function + * returns the next character from the input stream. + */ + int fgetc() {return m_r-- == 0 ? fillGet() : *m_p++;} + //---------------------------------------------------------------------------- + /** Get a string from a stream. + * + * The fgets function reads at most one less than the number of + * characters specified by num from the stream into the array pointed + * to by str. No additional characters are read after a new-line + * character (which is retained) or after end-of-file. A null character + * is written immediately after the last character read into the array. + * + * \param[out] str Pointer to an array of where the string is copied. + * + * \param[in] num Maximum number of characters including the null + * character. + * + * \param[out] len If len is not null and fgets is successful, the + * length of the string is returned. + * + * \return str if successful. If end-of-file is encountered and no + * characters have been read into the array, the contents of the array + * remain unchanged and a null pointer is returned. If a read error + * occurs during the operation, the array contents are indeterminate + * and a null pointer is returned. + */ + char* fgets(char* str, int num, size_t* len = 0); + //---------------------------------------------------------------------------- + /** Open a stream. + * + * Open a file and associates the stream with it. + * + * \param[in] filename name of the file to be opened. + * + * \param[in] mode a string that indicates the open mode. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
"r" or "rb"Open a file for reading. The file must exist.
"w" or "wb"Truncate an existing to zero length or create an empty file + * for writing.
"wx" or "wbx"Create a file for writing. Fails if the file already exists.
"a" or "ab"Append; open or create file for writing at end-of-file.
"r+" or "rb+" or "r+b"Open a file for update (reading and writing).
"w+" or "w+b" or "wb+"Truncate an existing to zero length or create a file for update.
"w+x" or "w+bx" or "wb+x"Create a file for update. Fails if the file already exists.
"a+" or "a+b" or "ab+"Append; open or create a file for update, writing at end-of-file.
+ * The character 'b' shall have no effect, but is allowed for ISO C + * standard conformance. + * + * Opening a file with append mode causes all subsequent writes to the + * file to be forced to the then current end-of-file, regardless of + * intervening calls to the fseek function. + * + * When a file is opened with update mode, both input and output may be + * performed on the associated stream. However, output shall not be + * directly followed by input without an intervening call to the fflush + * function or to a file positioning function (fseek, or rewind), and + * input shall not be directly followed by output without an intervening + * call to a file positioning function, unless the input operation + * encounters endof-file. + * + * \return true for success or false for failure. + */ + bool fopen(const char* filename, const char * mode); + //---------------------------------------------------------------------------- + /** Write a byte to a stream. + * + * \param[in] c the byte to be written (converted to an unsigned char). + * + * \return Upon successful completion, fputc() returns the value it + * has written. Otherwise, it returns EOF and sets the error indicator for + * the stream. + */ + int fputc(int c) {return m_w-- == 0 ? flushPut(c) : *m_p++ = c;} + //---------------------------------------------------------------------------- + /** Write a string to a stream. + * + * \param[in] str a pointer to the string to be written. + * + * \return for success, fputs() returns a non-negative + * number. Otherwise, it returns EOF and sets the error indicator for + * the stream. + */ + int fputs(const char* str); + //---------------------------------------------------------------------------- + /** Write a string stored in flash. + * + * \param[in] str string to be written. + * + * \return for success, fputs() returns a non-negative + * number. Otherwise, it returns EOF and sets the error indicator for + * the stream. + */ + int fputs_P(PGM_P str); + //---------------------------------------------------------------------------- + /** Binary input. + * + * Reads an array of up to count elements, each one with a size of size + * bytes. + * \param[out] ptr pointer to area of at least (size*count) bytes where + * the data will be stored. + * + * \param[in] size the size, in bytes, of each element to be read. + * + * \param[in] count the number of elements to be read. + * + * \return number of elements successfully read, which may be less than + * count if a read error or end-of-file is encountered. If size or count + * is zero, fread returns zero and the contents of the array and the + * state of the stream remain unchanged. + */ + size_t fread(void* ptr, size_t size, size_t count); + //---------------------------------------------------------------------------- + /** Set the file position for the stream. + * + * \param[in] offset number of offset from the origin. + * + * \param[in] origin position used as reference for the offset. It is + * specified by one of the following constants. + * + * SEEK_SET - Beginning of file. + * + * SEEK_CUR - Current position of the file pointer. + * + * SEEK_END - End of file. + * + * \return zero for success. Otherwise, it returns non-zero and sets the + * error indicator for the stream. + */ + int fseek(int32_t offset, int origin); + //---------------------------------------------------------------------------- + /** Get the current position in a stream. + * + * \return If successful, ftell return the current value of the position + * indicator. On failure, ftell returns −1L. + */ + int32_t ftell(); + //---------------------------------------------------------------------------- + /** Binary output. + * + * Writes an array of up to count elements, each one with a size of size + * bytes. + * \param[in] ptr pointer to (size*count) bytes of data to be written. + * + * \param[in] size the size, in bytes, of each element to be written. + * + * \param[in] count the number of elements to be written. + * + * \return number of elements successfully written. if this number is + * less than count, an error has occured. If size or count is zero, + * fwrite returns zero. + */ + size_t fwrite(const void * ptr, size_t size, size_t count); + //---------------------------------------------------------------------------- + /** Get a byte from the stream. + * + * getc and fgetc are equivalent but getc is inline so it is faster but + * require more flash memory. + * + * \return If the end-of-file indicator for the stream is set, or if the + * stream is at end-of-file, the end-of-file indicator for the stream is + * set and the fgetc function returns EOF. Otherwise, the fgetc function + * returns the next character from the input stream. + */ + inline __attribute__((always_inline)) + int getc() {return m_r-- == 0 ? fillGet() : *m_p++;} + //---------------------------------------------------------------------------- + /** Write a byte to a stream. + * + * putc and fputc are equivalent but putc is inline so it is faster but + * require more flash memory. + * + * \param[in] c the byte to be written (converted to an unsigned char). + * + * \return Upon successful completion, fputc() returns the value it + * has written. Otherwise, it returns EOF and sets the error indicator for + * the stream. + */ + inline __attribute__((always_inline)) + int putc(int c) {return m_w-- == 0 ? flushPut(c) : *m_p++ = c;} + //---------------------------------------------------------------------------- + /** Write a CR/LF. + * + * \return two, the number of bytes written, for success or -1 for failure. + */ + inline __attribute__((always_inline)) + int putCRLF() { + if (m_w < 2) { + if (!flushBuf()) return -1; + } + *m_p++ = '\r'; + *m_p++ = '\n'; + m_w -= 2; + return 2; + } + //---------------------------------------------------------------------------- + /** Write a character. + * \param[in] c the character to write. + * \return the number of bytes written. + */ + size_t print(char c) { + return putc(c) < 0 ? 0 : 1; + } + //---------------------------------------------------------------------------- + /** Write a string. + * + * \param[in] str the string to be written. + * + * \return the number of bytes written. + */ + size_t print(const char* str) { + int n = fputs(str); + return n < 0 ? 0 : n; + } + //---------------------------------------------------------------------------- + /** Print a string stored in flash memory. + * + * \param[in] str the string to print. + * + * \return the number of bytes written. + */ + size_t print(const __FlashStringHelper *str); + //---------------------------------------------------------------------------- + /** Print a floating point number. + * + * \param[in] prec Number of digits after decimal point. + * + * \param[in] val the number to be printed. + * + * \return the number of bytes written. + */ + size_t print(double val, uint8_t prec = 2) { + return print(static_cast(val), prec); + } + //---------------------------------------------------------------------------- + /** Print a floating point number. + * + * \param[in] prec Number of digits after decimal point. + * + * \param[in] val the number to be printed. + * + * \return the number of bytes written. + */ + size_t print(float val, uint8_t prec = 2) { + int n = printDec(val, prec); + return n > 0 ? n : 0; + } + //---------------------------------------------------------------------------- + /** Print a number. + * + * \param[in] val the number to be printed. + * + * \return the number of bytes written. + */ + template + size_t print(T val) { + int n = printDec(val); + return n > 0 ? n : 0; + } + //---------------------------------------------------------------------------- + /** Write a CR/LF. + * + * \return two, the number of bytes written, for success or zero for failure. + */ + size_t println() { + return putCRLF() > 0 ? 2 : 0; + } + //---------------------------------------------------------------------------- + /** Print a floating point number followed by CR/LF. + * + * \param[in] val the number to be printed. + * + * \param[in] prec Number of digits after decimal point. + * + * \return the number of bytes written. + */ + size_t println(double val, uint8_t prec = 2) { + return println(static_cast(val), prec); + } + //---------------------------------------------------------------------------- + /** Print a floating point number followed by CR/LF. + * + * \param[in] val the number to be printed. + * + * \param[in] prec Number of digits after decimal point. + * + * \return the number of bytes written. + */ + size_t println(float val, uint8_t prec = 2) { + int n = printDec(val, prec); + return n > 0 && putCRLF() > 0 ? n + 2 : 0; + } + //---------------------------------------------------------------------------- + /** Print an item followed by CR/LF + * + * \param[in] val the item to be printed. + * + * \return the number of bytes written. + */ + template + size_t println(T val) { + int n = print(val); + return putCRLF() > 0 ? n + 2 : 0; + } + //---------------------------------------------------------------------------- + /** Print a char as a number. + * \param[in] n number to be printed. + * \return The number of bytes written or -1 if an error occurs. + */ + int printDec(char n) { + if (CHAR_MIN == 0) { + return printDec((unsigned char)n); + } else { + return printDec((signed char)n); + } + } + //---------------------------------------------------------------------------- + /** print a signed 8-bit integer + * \param[in] n number to be printed. + * \return The number of bytes written or -1 if an error occurs. + */ + int printDec(signed char n); + //---------------------------------------------------------------------------- + /** Print an unsigned 8-bit number. + * \param[in] n number to be print. + * \return The number of bytes written or -1 if an error occurs. + */ + int printDec(unsigned char n) { + return printDec((uint16_t)n); + } + //---------------------------------------------------------------------------- + /** Print a int16_t + * \param[in] n number to be printed. + * \return The number of bytes written or -1 if an error occurs. + */ + int printDec(int16_t n); + //---------------------------------------------------------------------------- + /** print a uint16_t. + * \param[in] n number to be printed. + * \return The number of bytes written or -1 if an error occurs. + */ + int printDec(uint16_t n); + //---------------------------------------------------------------------------- + /** Print a signed 32-bit integer. + * \param[in] n number to be printed. + * \return The number of bytes written or -1 if an error occurs. + */ + int printDec(int32_t n); + //---------------------------------------------------------------------------- + /** Write an unsigned 32-bit number. + * \param[in] n number to be printed. + * \return The number of bytes written or -1 if an error occurs. + */ + int printDec(uint32_t n); + //---------------------------------------------------------------------------- + /** Print a double. + * \param[in] value The number to be printed. + * \param[in] prec Number of digits after decimal point. + * \return The number of bytes written or -1 if an error occurs. + */ + int printDec(double value, uint8_t prec) { + return printDec(static_cast(value), prec); + } + //---------------------------------------------------------------------------- + /** Print a float. + * \param[in] value The number to be printed. + * \param[in] prec Number of digits after decimal point. + * \return The number of bytes written or -1 if an error occurs. + */ + int printDec(float value, uint8_t prec); + //---------------------------------------------------------------------------- +/** Print a number followed by a field terminator. + * \param[in] value The number to be printed. + * \param[in] term The field terminator. + * \param[in] prec Number of digits after decimal point. + * \return The number of bytes written or -1 if an error occurs. + */ + int printField(double value, char term, uint8_t prec = 2) { + return printField(static_cast(value), term, prec) > 0; + } + //---------------------------------------------------------------------------- +/** Print a number followed by a field terminator. + * \param[in] value The number to be printed. + * \param[in] term The field terminator. + * \param[in] prec Number of digits after decimal point. + * \return The number of bytes written or -1 if an error occurs. + */ + int printField(float value, char term, uint8_t prec = 2) { + int rtn = printDec(value, prec); + return rtn < 0 || putc(term) < 0 ? -1 : rtn + 1; + } + //---------------------------------------------------------------------------- +/** Print a number followed by a field terminator. + * \param[in] value The number to be printed. + * \param[in] term The field terminator. + * \return The number of bytes written or -1 if an error occurs. + */ + template + int printField(T value, char term) { + int rtn = printDec(value); + return rtn < 0 || putc(term) < 0 ? -1 : rtn + 1; + } + //---------------------------------------------------------------------------- + /** Print HEX + * \param[in] n number to be printed as HEX. + * + * \return The number of bytes written or -1 if an error occurs. + */ + int printHex(uint32_t n); + //---------------------------------------------------------------------------- + /** Print HEX with CRLF + * \param[in] n number to be printed as HEX. + * + * \return The number of bytes written or -1 if an error occurs. + */ + int printHexln(uint32_t n) { + int rtn = printHex(n); + return rtn < 0 || putCRLF() != 2 ? -1 : rtn + 2; + } + //---------------------------------------------------------------------------- + /** Set position of a stream to the beginning. + * + * The rewind function sets the file position to the beginning of the + * file. It is equivalent to fseek(0L, SEEK_SET) except that the error + * indicator for the stream is also cleared. + * + * \return true for success or false for failure. + */ + bool rewind(); + //---------------------------------------------------------------------------- + /** Push a byte back into an input stream. + * + * \param[in] c the byte (converted to an unsigned char) to be pushed back. + * + * One character of pushback is guaranteed. If the ungetc function is + * called too many times without an intervening read or file positioning + * operation on that stream, the operation may fail. + * + * A successful intervening call to a file positioning function (fseek, + * fsetpos, or rewind) discards any pushed-back characters for the stream. + * + * \return Upon successful completion, ungetc() returns the byte pushed + * back after conversion. Otherwise it returns EOF. + */ + int ungetc(int c); + //============================================================================ + private: + bool fillBuf(); + int fillGet(); + bool flushBuf(); + int flushPut(uint8_t c); + char* fmtSpace(uint8_t len); + int write(const void* buf, size_t count); + //---------------------------------------------------------------------------- + // F_SRD and F_WR are never simultaneously asserted + static const uint8_t F_SRD = 0x01; // OK to read + static const uint8_t F_SWR = 0x02; // OK to write + static const uint8_t F_SRW = 0x04; // open for reading & writing + static const uint8_t F_EOF = 0x10; // found EOF + static const uint8_t F_ERR = 0x20; // found error + //---------------------------------------------------------------------------- + uint8_t m_flags; + uint8_t* m_p; + uint8_t m_r; + uint8_t m_w; + uint8_t m_buf[STREAM_BUF_SIZE]; +}; +//------------------------------------------------------------------------------ +#endif // StdioStream_h diff --git a/libs/SdFatBeta20120108/SdFat/bufstream.h b/libs/SdFat-master/SdFat/bufstream.h similarity index 74% rename from libs/SdFatBeta20120108/SdFat/bufstream.h rename to libs/SdFat-master/SdFat/bufstream.h index c6e0cc3..2c288c7 100755 --- a/libs/SdFatBeta20120108/SdFat/bufstream.h +++ b/libs/SdFat-master/SdFat/bufstream.h @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -32,7 +32,7 @@ class ibufstream : public istream { public: /** Constructor */ - ibufstream() : buf_(0), len_(0) {} + ibufstream() : m_buf(0), m_len(0) {} /** Constructor * \param[in] str pointer to string to be parsed * Warning: The string will not be copied so must stay in scope. @@ -45,40 +45,41 @@ class ibufstream : public istream { * Warning: The string will not be copied so must stay in scope. */ void init(const char* str) { - buf_ = str; - len_ = strlen(buf_); - pos_ = 0; + m_buf = str; + m_len = strlen(m_buf); + m_pos = 0; clear(); } + protected: /// @cond SHOW_PROTECTED int16_t getch() { - if (pos_ < len_) return buf_[pos_++]; + if (m_pos < m_len) return m_buf[m_pos++]; setstate(eofbit); return -1; } - void getpos(fpos_t *pos) { - pos->position = pos_; + void getpos(FatPos_t *pos) { + pos->position = m_pos; } bool seekoff(off_type off, seekdir way) {return false;} bool seekpos(pos_type pos) { - if (pos < len_) { - pos_ = pos; + if (pos < m_len) { + m_pos = pos; return true; } return false; } - void setpos(fpos_t *pos) { - pos_ = pos->position; + void setpos(FatPos_t *pos) { + m_pos = pos->position; } pos_type tellpos() { - return pos_; + return m_pos; } /// @endcond private: - const char* buf_; - uint16_t len_; - uint16_t pos_; + const char* m_buf; + size_t m_len; + size_t m_pos; }; //============================================================================== /** @@ -88,54 +89,58 @@ class ibufstream : public istream { class obufstream : public ostream { public: /** constructor */ - obufstream() : in_(0) {} + obufstream() : m_in(0) {} /** Constructor * \param[in] buf buffer for formatted string * \param[in] size buffer size */ - obufstream(char *buf, uint16_t size) { + obufstream(char *buf, size_t size) { init(buf, size); } /** Initialize an obufstream * \param[in] buf buffer for formatted string * \param[in] size buffer size */ - void init(char *buf, uint16_t size) { - buf_ = buf; + void init(char *buf, size_t size) { + m_buf = buf; buf[0] = '\0'; - size_ = size; - in_ = 0; + m_size = size; + m_in = 0; } /** \return a pointer to the buffer */ - char* buf() {return buf_;} + char* buf() {return m_buf;} /** \return the length of the formatted string */ - uint16_t length() {return in_;} + size_t length() {return m_in;} + protected: /// @cond SHOW_PROTECTED void putch(char c) { - if (in_ >= (size_ - 1)) { + if (m_in >= (m_size - 1)) { setstate(badbit); return; } - buf_[in_++] = c; - buf_[in_]= '\0'; + m_buf[m_in++] = c; + m_buf[m_in]= '\0'; + } + void putstr(const char *str) { + while (*str) putch(*str++); } bool seekoff(off_type off, seekdir way) {return false;} bool seekpos(pos_type pos) { - if (pos > in_) return false; - in_ = pos; - buf_[in_] = '\0'; + if (pos > m_in) return false; + m_in = pos; + m_buf[m_in] = '\0'; return true; } bool sync() {return true;} pos_type tellpos() { - return in_; + return m_in; } /// @endcond private: - char *buf_; - uint16_t size_; - uint16_t in_; + char *m_buf; + size_t m_size; + size_t m_in; }; #endif // bufstream_h diff --git a/libs/SdFatBeta20120108/SdFat/examples/AnalogLogger/AnalogLogger.pde b/libs/SdFat-master/SdFat/examples/#attic/AnalogLogger/AnalogLogger.ino similarity index 92% rename from libs/SdFatBeta20120108/SdFat/examples/AnalogLogger/AnalogLogger.pde rename to libs/SdFat-master/SdFat/examples/#attic/AnalogLogger/AnalogLogger.ino index a235ed1..ae25f84 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/AnalogLogger/AnalogLogger.pde +++ b/libs/SdFat-master/SdFat/examples/#attic/AnalogLogger/AnalogLogger.ino @@ -3,7 +3,7 @@ #include #include // define FreeRam() -#define CHIP_SELECT SS_PIN // SD chip select pin +#define SD_CHIP_SELECT SS // SD chip select pin #define USE_DS1307 0 // set nonzero to use DS1307 RTC #define LOG_INTERVAL 1000 // mills between entries #define SENSOR_COUNT 3 // number of analog pins to log @@ -64,13 +64,15 @@ ostream& operator << (ostream& os, DateTime& dt) { //------------------------------------------------------------------------------ void setup() { Serial.begin(9600); - + while (!Serial){} // wait for Leonardo + // pstr stores strings in flash to save RAM cout << endl << pstr("FreeRam: ") << FreeRam() << endl; #if WAIT_TO_START cout << pstr("Type any character to start\n"); - while (Serial.read() < 0) {} + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem #endif // WAIT_TO_START #if USE_DS1307 @@ -85,9 +87,7 @@ void setup() { #endif // USE_DS1307 // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - // if SD chip select is not SS, the second argument to init is CS pin number - if (!sd.init(SPI_HALF_SPEED, CHIP_SELECT)) sd.initErrorHalt(); + if (!sd.begin(SD_CHIP_SELECT, SPI_HALF_SPEED)) sd.initErrorHalt(); // create a new file in root, the current working directory char name[] = "LOGGER00.CSV"; @@ -102,7 +102,8 @@ void setup() { if (!logfile.is_open()) error("file.open"); cout << pstr("Logging to: ") << name << endl; - + cout << pstr("Type any character to stop\n\n"); + // format header in buffer obufstream bout(buf, sizeof(buf)); @@ -163,4 +164,9 @@ void loop() { // don't log two points in the same millis if (m == millis()) delay(1); + + if (!Serial.available()) return; + logfile.close(); + cout << pstr("Done!"); + while (1); } diff --git a/libs/SdFatBeta20120108/SdFat/examples/HelloWorld/HelloWorld.pde b/libs/SdFat-master/SdFat/examples/#attic/HelloWorld/HelloWorld.ino similarity index 73% rename from libs/SdFatBeta20120108/SdFat/examples/HelloWorld/HelloWorld.pde rename to libs/SdFat-master/SdFat/examples/#attic/HelloWorld/HelloWorld.ino index b25e3b9..50b3368 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/HelloWorld/HelloWorld.pde +++ b/libs/SdFat-master/SdFat/examples/#attic/HelloWorld/HelloWorld.ino @@ -5,6 +5,10 @@ ArduinoOutStream cout(Serial); void setup() { Serial.begin(9600); + + while (!Serial) {} // wait for Leonardo + delay(2000); + cout << "Hello, World!\n"; } diff --git a/libs/SdFat-master/SdFat/examples/#attic/MiniSerial/MiniSerial.ino b/libs/SdFat-master/SdFat/examples/#attic/MiniSerial/MiniSerial.ino new file mode 100755 index 0000000..378e937 --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/#attic/MiniSerial/MiniSerial.ino @@ -0,0 +1,18 @@ +// This example illustrates use of SdFat's +// minimal unbuffered AVR Serial support. +// +// This is useful for debug and saves RAM +// Will not work on Due, Leonardo, or Teensy +#include +#include +#ifndef UDR0 +#error no AVR serial port0 +#endif +void setup() { + MiniSerial.begin(9600); + MiniSerial.println(FreeRam()); + MiniSerial.println(F("Type any Character")); + while(MiniSerial.read() < 0) {} + MiniSerial.println(F("Done")); +} +void loop() {} diff --git a/libs/SdFat-master/SdFat/examples/#attic/PrintBenchmarkSD/PrintBenchmarkSD.ino b/libs/SdFat-master/SdFat/examples/#attic/PrintBenchmarkSD/PrintBenchmarkSD.ino new file mode 100755 index 0000000..a50f7a3 --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/#attic/PrintBenchmarkSD/PrintBenchmarkSD.ino @@ -0,0 +1,113 @@ +/* + * This sketch is a simple Print benchmark. + */ +#include +#include + +// SD chip select pin +const uint8_t chipSelect = SS; + +// number of lines to print +const uint16_t N_PRINT = 20000; + + +// test file +File file; + +//------------------------------------------------------------------------------ +void error(char* s) { + Serial.println(s); + while(1); +} +//------------------------------------------------------------------------------ +void setup() { + Serial.begin(9600); + while (!Serial) { + // wait for Leonardo + } +} +//------------------------------------------------------------------------------ +void loop() { + uint32_t maxLatency; + uint32_t minLatency; + uint32_t totalLatency; + + while (Serial.read() >= 0) { + } + // pstr stores strings in flash to save RAM + Serial.println(F("Type any character to start")); + while (Serial.read() <= 0) { + } + delay(400); // catch Due reset problem + + + // initialize the SD card + + if (!SD.begin(chipSelect)) error("begin"); + + + Serial.println(F("Starting print test. Please wait.\n")); + + // do write test + for (int test = 0; test < 2; test++) { + file = SD.open("BENCH.TXT", FILE_WRITE); + + if (!file) error("open failed"); + switch(test) { + case 0: + Serial.println(F("Test of println(uint16_t)")); + break; + + case 1: + Serial.println(F("Test of println(double)")); + break; + } + maxLatency = 0; + minLatency = 999999; + totalLatency = 0; + uint32_t t = millis(); + for (uint16_t i = 0; i < N_PRINT; i++) { + uint32_t m = micros(); + + switch(test) { + case 0: + file.println(i); + break; + + case 1: + file.println((double)0.01*i); + break; + } + +// if (file.writeError) { +// error("write failed"); +// } + m = micros() - m; + if (maxLatency < m) maxLatency = m; + if (minLatency > m) minLatency = m; + totalLatency += m; + } + file.flush(); + t = millis() - t; + double s = file.size(); + Serial.print(F("Time ")); + Serial.print(0.001*t); + Serial.println(F(" sec")); + Serial.print(F("File size ")); + Serial.print(0.001*s); + Serial.print(F(" KB\n")); + Serial.print(F("Write ")); + Serial.print(s/t); + Serial.print(F(" KB/sec\n")); + Serial.print(F("Maximum latency: ")); + Serial.print(maxLatency); + Serial.print(F(" usec, Minimum Latency: ")); + Serial.print(minLatency); + Serial.print(F(" usec, Avg Latency: ")); + Serial.print(totalLatency/N_PRINT); + Serial.println(F(" usec\n")); + SD.remove("BENCH.TXT"); + } + file.close(); + Serial.println(F("Done!\n")); +} \ No newline at end of file diff --git a/libs/SdFatBeta20120108/SdFat/examples/SD_Size/SD_Size.pde b/libs/SdFat-master/SdFat/examples/#attic/SD_Size/SD_Size.ino similarity index 85% rename from libs/SdFatBeta20120108/SdFat/examples/SD_Size/SD_Size.pde rename to libs/SdFat-master/SdFat/examples/#attic/SD_Size/SD_Size.ino index be842ab..6d33a7a 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/SD_Size/SD_Size.pde +++ b/libs/SdFat-master/SdFat/examples/#attic/SD_Size/SD_Size.ino @@ -2,12 +2,14 @@ * Sketch to compare size of Arduino SD library with SdFat V2. * See SdFatSize.pde for SdFat sketch. */ +#include #include File file; //------------------------------------------------------------------------------ void setup() { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo if (!SD.begin()) { Serial.println("begin failed"); @@ -18,6 +20,7 @@ void setup() { file.println("Hello"); file.close(); + Serial.println("Done"); } //------------------------------------------------------------------------------ void loop() {} diff --git a/libs/SdFatBeta20120108/SdFat/examples/SdFatSize/SdFatSize.pde b/libs/SdFat-master/SdFat/examples/#attic/SdFatSize/SdFatSize.ino similarity index 79% rename from libs/SdFatBeta20120108/SdFat/examples/SdFatSize/SdFatSize.pde rename to libs/SdFat-master/SdFat/examples/#attic/SdFatSize/SdFatSize.ino index 86079c6..da73d63 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/SdFatSize/SdFatSize.pde +++ b/libs/SdFat-master/SdFat/examples/#attic/SdFatSize/SdFatSize.ino @@ -1,6 +1,7 @@ /* * Sketch to compare size of SdFat V2 with Arduino SD library. * See SD_Size.pde for Arduino SD sketch. + * */ #include @@ -10,9 +11,10 @@ SdFile file; //------------------------------------------------------------------------------ void setup() { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo - if (!sd.init()) { - Serial.println("init failed"); + if (!sd.begin()) { + Serial.println("begin failed"); return; } file.open("SIZE_TST.TXT", O_RDWR | O_CREAT | O_AT_END); @@ -20,6 +22,7 @@ void setup() { file.println("Hello"); file.close(); + Serial.println("Done"); } //------------------------------------------------------------------------------ void loop() {} diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatMakeDir/SdFatMakeDir.pde b/libs/SdFat-master/SdFat/examples/#attic/TestMkdir/TestMkdir.ino similarity index 93% rename from libs/SdFatBeta20120108/extra/examplesV1/SdFatMakeDir/SdFatMakeDir.pde rename to libs/SdFat-master/SdFat/examples/#attic/TestMkdir/TestMkdir.ino index f4e2616..f5e57d5 100755 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatMakeDir/SdFatMakeDir.pde +++ b/libs/SdFat-master/SdFat/examples/#attic/TestMkdir/TestMkdir.ino @@ -13,6 +13,8 @@ #include #include +const uint8_t SD_CHIP_SELECT = SS; + SdFat sd; // store error strings in flash to save RAM @@ -100,12 +102,14 @@ void dirAllocTest(SdBaseFile* dir) { void setup() { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo PgmPrintln("Type any character to start"); - while (!Serial.available()); + while (Serial.read() <= 0) {} + delay(200); // Catch Due reset problem // initialize the SD card at SPI_FULL_SPEED for best performance. // try SPI_HALF_SPEED if bus errors occur. - if (!sd.init(SPI_FULL_SPEED)) sd.initErrorHalt(); + if (!sd.begin(SD_CHIP_SELECT, SPI_FULL_SPEED)) sd.initErrorHalt(); // write files to root if FAT32 if (sd.vol()->fatType() == 32) { diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatRmDir/SdFatRmDir.pde b/libs/SdFat-master/SdFat/examples/#attic/TestRmdir/TestRmdir.ino similarity index 90% rename from libs/SdFatBeta20120108/extra/examplesV1/SdFatRmDir/SdFatRmDir.pde rename to libs/SdFat-master/SdFat/examples/#attic/TestRmdir/TestRmdir.ino index 00a6c44..11d2be6 100755 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatRmDir/SdFatRmDir.pde +++ b/libs/SdFat-master/SdFat/examples/#attic/TestRmdir/TestRmdir.ino @@ -9,6 +9,8 @@ #include #include +const uint8_t SD_CHIP_SELECT = SS; + SdFat sd; // store error strings in flash to save RAM @@ -53,12 +55,14 @@ void deleteFiles(SdBaseFile* dir) { void setup() { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo PgmPrintln("Type any character to start"); - while (!Serial.available()); + while (Serial.read() <= 0) {} + delay(200); // Catch Due reset problem // initialize the SD card at SPI_FULL_SPEED for best performance. // try SPI_HALF_SPEED if bus errors occur. - if (!sd.init(SPI_FULL_SPEED)) sd.initErrorHalt(); + if (!sd.begin(SD_CHIP_SELECT, SPI_FULL_SPEED)) sd.initErrorHalt(); // delete files in root if FAT32 diff --git a/libs/SdFatBeta20120108/SdFat/examples/append/append.pde b/libs/SdFat-master/SdFat/examples/#attic/append/append.ino similarity index 88% rename from libs/SdFatBeta20120108/SdFat/examples/append/append.pde rename to libs/SdFat-master/SdFat/examples/#attic/append/append.ino index cee1ce1..d97d010 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/append/append.pde +++ b/libs/SdFat-master/SdFat/examples/#attic/append/append.ino @@ -8,7 +8,7 @@ #include // SD chip select pin -const uint8_t chipSelect = SS_PIN; +const uint8_t chipSelect = SS; // file system object SdFat sd; @@ -24,17 +24,19 @@ void setup() { char name[] = "APPEND.TXT"; Serial.begin(9600); + while (!Serial) {} // wait for Leonardo // pstr() stores strings in flash to save RAM cout << endl << pstr("Type any character to start\n"); - while (Serial.read() < 0) {} + while (Serial.read() <= 0) {} + delay(400); // Catch Due reset problem // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED, chipSelect)) sd.initErrorHalt(); + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); cout << pstr("Appending to: ") << name; - + for (uint8_t i = 0; i < 100; i++) { // open stream for append ofstream sdout(name, ios::out | ios::app); diff --git a/libs/SdFatBeta20120108/SdFat/examples/average/average.pde b/libs/SdFat-master/SdFat/examples/#attic/average/average.ino similarity index 88% rename from libs/SdFatBeta20120108/SdFat/examples/average/average.pde rename to libs/SdFat-master/SdFat/examples/#attic/average/average.ino index fd28783..64a0efe 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/average/average.pde +++ b/libs/SdFat-master/SdFat/examples/#attic/average/average.ino @@ -4,7 +4,7 @@ #include // SD chip select pin -const uint8_t chipSelect = SS_PIN; +const uint8_t chipSelect = SS; // object for the SD file system SdFat sd; @@ -22,7 +22,7 @@ void writeTestFile() { } if (!sdout) sd.errorHalt("sdout failed"); - // file will be closed by destructor when sdout goes out of scope + sdout.close(); } //------------------------------------------------------------------------------ void calcAverage() { @@ -49,14 +49,16 @@ void calcAverage() { //------------------------------------------------------------------------------ void setup() { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo // pstr stores strings in flash to save RAM cout << pstr("Type any character to start\n"); - while (Serial.read() < 0) {} + while (Serial.read() <= 0) {} + delay(400); // Catch Due reset problem // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED, chipSelect)) sd.initErrorHalt(); + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); // write the test file writeTestFile(); diff --git a/libs/SdFat-master/SdFat/examples/#attic/benchSD/benchSD.ino b/libs/SdFat-master/SdFat/examples/#attic/benchSD/benchSD.ino new file mode 100755 index 0000000..88a3dfa --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/#attic/benchSD/benchSD.ino @@ -0,0 +1,133 @@ +/* + * This sketch is a simple binary write/read benchmark + * for the standard Arduino SD.h library. + */ +#include +#include + + +// SD chip select pin +const uint8_t chipSelect = SS; + +#define FILE_SIZE_MB 5 +#define FILE_SIZE (1000000UL*FILE_SIZE_MB) +#define BUF_SIZE 100 + +uint8_t buf[BUF_SIZE]; + + +// test file +File file; + +//------------------------------------------------------------------------------ +void error(char* s) { + Serial.println(s); + while(1); +} +//------------------------------------------------------------------------------ +void setup() { + Serial.begin(9600); + while (!Serial){} // wait for Leonardo +} +//------------------------------------------------------------------------------ +void loop() { + uint32_t maxLatency; + uint32_t minLatency; + uint32_t totalLatency; + + // discard any input + while (Serial.read() >= 0) {} + + // pstr stores strings in flash to save RAM + Serial.println(F("Type any character to start")); + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem + + if (!SD.begin(chipSelect)) error("begin"); + + // open or create file - truncate existing file. + file = SD.open("BENCH.DAT", FILE_WRITE | O_TRUNC); +// file = SD.open("BENCH.DAT", O_CREAT | O_TRUNC | O_CREAT); + if (!file) { + error("open failed"); + } + + // fill buf with known data + for (uint16_t i = 0; i < (BUF_SIZE-2); i++) { + buf[i] = 'A' + (i % 26); + } + buf[BUF_SIZE-2] = '\r'; + buf[BUF_SIZE-1] = '\n'; + + Serial.print(F("File size ")); + Serial.print(FILE_SIZE_MB); + Serial.println(F("MB")); + Serial.print(F("Buffer size ")); + Serial.print(BUF_SIZE); + Serial.println(F(" bytes")); + Serial.println(F("Starting write test. Please wait up to a minute")); + + // do write test + uint32_t n = FILE_SIZE/sizeof(buf); + maxLatency = 0; + minLatency = 999999; + totalLatency = 0; + uint32_t t = millis(); + for (uint32_t i = 0; i < n; i++) { + uint32_t m = micros(); + if (file.write(buf, sizeof(buf)) != sizeof(buf)) { + error("write failed"); + } + m = micros() - m; + if (maxLatency < m) maxLatency = m; + if (minLatency > m) minLatency = m; + totalLatency += m; + } + file.flush(); + t = millis() - t; + double s = file.size(); + Serial.print(F("Write ")); + Serial.print(s/t); + Serial.print(F(" KB/sec\n")); + Serial.print(F("Maximum latency: ")); + Serial.print(maxLatency); + Serial.print(F(" usec, Minimum Latency: ")); + Serial.print(minLatency); + Serial.print(F(" usec, Avg Latency: ")); + Serial.print(totalLatency/n); + Serial.print(F(" usec\n\n")); + Serial.println(F("Starting read test. Please wait up to a minute")); + // do read test + file.seek(0); + maxLatency = 0; + minLatency = 99999; + totalLatency = 0; + t = millis(); + for (uint32_t i = 0; i < n; i++) { + buf[BUF_SIZE-1] = 0; + uint32_t m = micros(); + if (file.read(buf, sizeof(buf)) != sizeof(buf)) { + error("read failed"); + } + m = micros() - m; + if (maxLatency < m) maxLatency = m; + if (minLatency > m) minLatency = m; + totalLatency += m; + if (buf[BUF_SIZE-1] != '\n') { + error("data check"); + } + } + t = millis() - t; + Serial.print(F("Read ")); + Serial.print(s/t); + Serial.print(F(" KB/sec\n")); + Serial.print(F("Maximum latency: ")); + Serial.print(maxLatency); + Serial.print(F(" usec, Minimum Latency: ")); + Serial.print(minLatency); + Serial.print(F(" usec, Avg Latency: ")); + Serial.print(totalLatency/n); + Serial.print(F(" usec\n\n")); + Serial.print(F("Done\n\n")); + file.close(); +} \ No newline at end of file diff --git a/libs/SdFatBeta20120108/SdFat/examples/bufstream/bufstream.pde b/libs/SdFat-master/SdFat/examples/#attic/bufstream/bufstream.ino similarity index 91% rename from libs/SdFatBeta20120108/SdFat/examples/bufstream/bufstream.pde rename to libs/SdFat-master/SdFat/examples/#attic/bufstream/bufstream.ino index 084ded8..5eb28c1 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/bufstream/bufstream.pde +++ b/libs/SdFat-master/SdFat/examples/#attic/bufstream/bufstream.ino @@ -11,7 +11,9 @@ void setup() { int i, j, k; // values from parsed line Serial.begin(9600); - + while (!Serial) {} // wait for Leonardo + delay(2000); + // initialize input string ibufstream bin("123 456 789"); diff --git a/libs/SdFatBeta20120108/SdFat/examples/eventlog/eventlog.pde b/libs/SdFat-master/SdFat/examples/#attic/eventlog/eventlog.ino similarity index 84% rename from libs/SdFatBeta20120108/SdFat/examples/eventlog/eventlog.pde rename to libs/SdFat-master/SdFat/examples/#attic/eventlog/eventlog.ino index 1cff4bb..4c3262f 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/eventlog/eventlog.pde +++ b/libs/SdFat-master/SdFat/examples/#attic/eventlog/eventlog.ino @@ -4,7 +4,7 @@ #include // SD chip select pin -const uint8_t chipSelect = SS_PIN; +const uint8_t chipSelect = SS; // file system object SdFat sd; @@ -28,19 +28,21 @@ void logEvent(const char *msg) { // check for errors if (!sdlog) sd.errorHalt("append failed"); - // file will be closed when sdlog goes out of scope + sdlog.close(); } //------------------------------------------------------------------------------ void setup() { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo // pstr stores strings in flash to save RAM cout << pstr("Type any character to start\n"); - while (Serial.read() < 0) {} + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED, chipSelect)) sd.initErrorHalt(); + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); // append a line to the logfile logEvent("Another line for the logfile"); diff --git a/libs/SdFat-master/SdFat/examples/#attic/fgetsRewrite/fgetsRewrite.ino b/libs/SdFat-master/SdFat/examples/#attic/fgetsRewrite/fgetsRewrite.ino new file mode 100755 index 0000000..57760b9 --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/#attic/fgetsRewrite/fgetsRewrite.ino @@ -0,0 +1,91 @@ +// Demo of rewriting a line read by fgets +#include + +// SD card chip select pin +const uint8_t chipSelect = SS; + +// file system +SdFat sd; + +// print stream +ArduinoOutStream cout(Serial); +//------------------------------------------------------------------------------ +// store error strings in flash memory +#define error(s) sd.errorHalt_P(PSTR(s)) +//------------------------------------------------------------------------------ +void demoFgets() { + char line[25]; + int c; + uint32_t pos; + + // open test file + SdFile rdfile("FGETS.TXT", O_RDWR); + + // check for open error + if (!rdfile.isOpen()) error("demoFgets"); + + // list file + cout << pstr("-----Before Rewrite\r\n"); + while ((c = rdfile.read()) >= 0) Serial.write(c); + + rdfile.rewind(); + // read lines from the file to get position + while (1) { + pos = rdfile.curPosition(); + if (rdfile.fgets(line, sizeof(line)) < 0) { + error("Line not found"); + } + // find line that contains "Line C" + if (strstr(line, "Line C"))break; + } + + // rewrite line with 'C' + if (!rdfile.seekSet(pos))error("seekSet"); + rdfile.println("Line R"); + rdfile.rewind(); + + // list file + cout << pstr("\r\n-----After Rewrite\r\n"); + while ((c = rdfile.read()) >= 0) Serial.write(c); + + // close so rewrite is not lost + rdfile.close(); +} +//------------------------------------------------------------------------------ +void makeTestFile() { + // create or open test file + SdFile wrfile("FGETS.TXT", O_WRITE | O_CREAT | O_TRUNC); + + // check for open error + if (!wrfile.isOpen()) error("MakeTestFile"); + + // write test file + wrfile.write_P(PSTR( + "Line A\r\n" + "Line B\r\n" + "Line C\r\n" + "Line D\r\n" + "Line E\r\n" + )); + wrfile.close(); +} +//------------------------------------------------------------------------------ +void setup(void) { + Serial.begin(9600); + while (!Serial){} // wait for Leonardo + + cout << pstr("Type any character to start\n"); + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem + + // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with + // breadboards. use SPI_FULL_SPEED for better performance. + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); + + makeTestFile(); + + demoFgets(); + + cout << pstr("\nDone\n"); +} +void loop(void) {} diff --git a/libs/SdFatBeta20120108/SdFat/examples/readlog/readlog.pde b/libs/SdFat-master/SdFat/examples/#attic/readlog/readlog.ino similarity index 81% rename from libs/SdFatBeta20120108/SdFat/examples/readlog/readlog.pde rename to libs/SdFat-master/SdFat/examples/#attic/readlog/readlog.ino index 3fef6d6..fcdbde9 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/readlog/readlog.pde +++ b/libs/SdFat-master/SdFat/examples/#attic/readlog/readlog.ino @@ -5,7 +5,7 @@ #include // SD chip select pin -const uint8_t chipSelect = SS_PIN; +const uint8_t chipSelect = SS; // file system object SdFat sd; @@ -14,12 +14,13 @@ SdFat sd; ArduinoOutStream cout(Serial); //------------------------------------------------------------------------------ void setup() { - char c; + int c; Serial.begin(9600); + while (!Serial) {} // wait for Leonardo // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED, chipSelect)) sd.initErrorHalt(); + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); // set current working directory if (!sd.chdir("LOGS/2011/JAN/")) { @@ -31,9 +32,9 @@ void setup() { if (!file.is_open()) sd.errorHalt("open failed"); // copy the file to Serial - while ((c = file.get()) >= 0) cout << c; + while ((c = file.get()) >= 0) cout << (char)c; cout << "Done" << endl; } //------------------------------------------------------------------------------ -void loop() {} +void loop() {} \ No newline at end of file diff --git a/libs/SdFat-master/SdFat/examples/#attic/readme.txt b/libs/SdFat-master/SdFat/examples/#attic/readme.txt new file mode 100755 index 0000000..ec49791 --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/#attic/readme.txt @@ -0,0 +1,30 @@ +Old and debug examples. + +AnalogLogger - A simple data logger for one or more analog pins. + +append - This sketch creates a large file by successive + open/write/close operations. + +average - A demonstration of parsing floating point numbers. + +benchSD - A read/write benchmark for the standard Arduino SD.h library. + +bufstream - ibufsteam to parse a line and obufstream to format a line. + +eventlog - Append a line to a file - demo of pathnames and streams. + +fgetsRewrite - Demo of rewriting a line read by fgets. + +HelloWorld - Create a serial output stream. + +MiniSerial - SdFat minimal serial support for debug. + +PrintBenchmarkSD - Bench mark SD.h print. + +readlog - Read file. Demo of pathnames and current working directory. + +SD_Size - Determine flash used by SD.h example. + +SdFatSize - Determine flash used by SdFat. + +TestMkdirRmdir - Test mkdir, rmdir, and directory management. \ No newline at end of file diff --git a/libs/SdFat-master/SdFat/examples/AnalogBinLogger/AnalogBinLogger.h b/libs/SdFat-master/SdFat/examples/AnalogBinLogger/AnalogBinLogger.h new file mode 100755 index 0000000..da4d448 --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/AnalogBinLogger/AnalogBinLogger.h @@ -0,0 +1,39 @@ +#ifndef AnalogBinLogger_h +#define AnalogBinLogger_h +//------------------------------------------------------------------------------ +// First block of file. +struct metadata_t { + unsigned long adcFrequency; // ADC clock frequency + unsigned long cpuFrequency; // CPU clock frequency + unsigned long sampleInterval; // Sample interval in CPU cycles. + unsigned long recordEightBits; // Size of ADC values, nonzero for 8-bits. + unsigned long pinCount; // Number of analog pins in a sample. + unsigned long pinNumber[123]; // List of pin numbers in a sample. +}; +//------------------------------------------------------------------------------ +// Data block for 8-bit ADC mode. +const size_t DATA_DIM8 = 508; +struct block8_t { + unsigned short count; // count of data bytes + unsigned short overrun; // count of overruns since last block + unsigned char data[DATA_DIM8]; +}; +//------------------------------------------------------------------------------ +// Data block for 10-bit ADC mode. +const size_t DATA_DIM16 = 254; +struct block16_t { + unsigned short count; // count of data bytes + unsigned short overrun; // count of overruns since last block + unsigned short data[DATA_DIM16]; +}; +//------------------------------------------------------------------------------ +// Data block for PC use +struct adcdata_t { + unsigned short count; // count of data bytes + unsigned short overrun; // count of overruns since last block + union { + unsigned char u8[DATA_DIM8]; + unsigned short u16[DATA_DIM16]; + } data; +}; +#endif // AnalogBinLogger_h \ No newline at end of file diff --git a/libs/SdFat-master/SdFat/examples/AnalogBinLogger/AnalogBinLogger.ino b/libs/SdFat-master/SdFat/examples/AnalogBinLogger/AnalogBinLogger.ino new file mode 100755 index 0000000..b3b3fe9 --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/AnalogBinLogger/AnalogBinLogger.ino @@ -0,0 +1,787 @@ +/** + * This program logs data from the Arduino ADC to a binary file. + * + * Samples are logged at regular intervals. Each Sample consists of the ADC + * values for the analog pins defined in the PIN_LIST array. The pins numbers + * may be in any order. + * + * Edit the configuration constants below to set the sample pins, sample rate, + * and other configuration values. + * + * If your SD card has a long write latency, it may be necessary to use + * slower sample rates. Using a Mega Arduino helps overcome latency + * problems since 13 512 byte buffers will be used. + * + * Each 512 byte data block in the file has a four byte header followed by up + * to 508 bytes of data. (508 values in 8-bit mode or 254 values in 10-bit mode) + * Each block contains an integral number of samples with unused space at the + * end of the block. + * + * Data is written to the file using a SD multiple block write command. + */ +#include +#include +#include +#include "AnalogBinLogger.h" +//------------------------------------------------------------------------------ +// Analog pin number list for a sample. Pins may be in any order and pin +// numbers may be repeated. +const uint8_t PIN_LIST[] = {0, 1, 2, 3, 4}; +//------------------------------------------------------------------------------ +// Sample rate in samples per second. +const float SAMPLE_RATE = 5000; // Must be 0.25 or greater. + +// The interval between samples in seconds, SAMPLE_INTERVAL, may be set to a +// constant instead of being calculated from SAMPLE_RATE. SAMPLE_RATE is not +// used in the code below. For example, setting SAMPLE_INTERVAL = 2.0e-4 +// will result in a 200 microsecond sample interval. +const float SAMPLE_INTERVAL = 1.0/SAMPLE_RATE; + +// Setting ROUND_SAMPLE_INTERVAL non-zero will cause the sample interval to +// be rounded to a a multiple of the ADC clock period and will reduce sample +// time jitter. +#define ROUND_SAMPLE_INTERVAL 1 +//------------------------------------------------------------------------------ +// ADC clock rate. +// The ADC clock rate is normally calculated from the pin count and sample +// interval. The calculation attempts to use the lowest possible ADC clock +// rate. +// +// You can select an ADC clock rate by defining the symbol ADC_PRESCALER to +// one of these values. You must choose an appropriate ADC clock rate for +// your sample interval. +// #define ADC_PRESCALER 7 // F_CPU/128 125 kHz on an Uno +// #define ADC_PRESCALER 6 // F_CPU/64 250 kHz on an Uno +// #define ADC_PRESCALER 5 // F_CPU/32 500 kHz on an Uno +// #define ADC_PRESCALER 4 // F_CPU/16 1000 kHz on an Uno +// #define ADC_PRESCALER 3 // F_CPU/8 2000 kHz on an Uno (8-bit mode only) +//------------------------------------------------------------------------------ +// Reference voltage. See the processor data-sheet for reference details. +// uint8_t const ADC_REF = 0; // External Reference AREF pin. +uint8_t const ADC_REF = (1 << REFS0); // Vcc Reference. +// uint8_t const ADC_REF = (1 << REFS1); // Internal 1.1 (only 644 1284P Mega) +// uint8_t const ADC_REF = (1 << REFS1) | (1 << REFS0); // Internal 1.1 or 2.56 +//------------------------------------------------------------------------------ +// File definitions. +// +// Maximum file size in blocks. +// The program creates a contiguous file with FILE_BLOCK_COUNT 512 byte blocks. +// This file is flash erased using special SD commands. The file will be +// truncated if logging is stopped early. +const uint32_t FILE_BLOCK_COUNT = 256000; + +// log file base name. Must be six characters or less. +#define FILE_BASE_NAME "ANALOG" + +// Set RECORD_EIGHT_BITS non-zero to record only the high 8-bits of the ADC. +#define RECORD_EIGHT_BITS 0 +//------------------------------------------------------------------------------ +// Pin definitions. +// +// Digital pin to indicate an error, set to -1 if not used. +// The led blinks for fatal errors. The led goes on solid for SD write +// overrun errors and logging continues. +const int8_t ERROR_LED_PIN = 3; + +// SD chip select pin. +const uint8_t SD_CS_PIN = SS; +//------------------------------------------------------------------------------ +// Buffer definitions. +// +// The logger will use SdFat's buffer plus BUFFER_BLOCK_COUNT additional +// buffers. QUEUE_DIM must be a power of two larger than +//(BUFFER_BLOCK_COUNT + 1). +// +#if RAMEND < 0X8FF +#error Too little SRAM +// +#elif RAMEND < 0X10FF +// Use total of two 512 byte buffers. +const uint8_t BUFFER_BLOCK_COUNT = 1; +// Dimension for queues of 512 byte SD blocks. +const uint8_t QUEUE_DIM = 4; // Must be a power of two! +// +#elif RAMEND < 0X20FF +// Use total of five 512 byte buffers. +const uint8_t BUFFER_BLOCK_COUNT = 4; +// Dimension for queues of 512 byte SD blocks. +const uint8_t QUEUE_DIM = 8; // Must be a power of two! +// +#elif RAMEND < 0X40FF +// Use total of 13 512 byte buffers. +const uint8_t BUFFER_BLOCK_COUNT = 12; +// Dimension for queues of 512 byte SD blocks. +const uint8_t QUEUE_DIM = 16; // Must be a power of two! +// +#else // RAMEND +// Use total of 29 512 byte buffers. +const uint8_t BUFFER_BLOCK_COUNT = 28; +// Dimension for queues of 512 byte SD blocks. +const uint8_t QUEUE_DIM = 32; // Must be a power of two! +#endif // RAMEND +//============================================================================== +// End of configuration constants. +//============================================================================== +// Temporary log file. Will be deleted if a reset or power failure occurs. +#define TMP_FILE_NAME "TMP_LOG.BIN" + +// Size of file base name. Must not be larger than six. +const uint8_t BASE_NAME_SIZE = sizeof(FILE_BASE_NAME) - 1; + +// Number of analog pins to log. +const uint8_t PIN_COUNT = sizeof(PIN_LIST)/sizeof(PIN_LIST[0]); + +// Minimum ADC clock cycles per sample interval +const uint16_t MIN_ADC_CYCLES = 15; + +// Extra cpu cycles to setup ADC with more than one pin per sample. +const uint16_t ISR_SETUP_ADC = 100; + +// Maximum cycles for timer0 system interrupt, millis, micros. +const uint16_t ISR_TIMER0 = 160; +//============================================================================== +SdFat sd; + +SdBaseFile binFile; + +char binName[13] = FILE_BASE_NAME "00.BIN"; + +#if RECORD_EIGHT_BITS +const size_t SAMPLES_PER_BLOCK = DATA_DIM8/PIN_COUNT; +typedef block8_t block_t; +#else // RECORD_EIGHT_BITS +const size_t SAMPLES_PER_BLOCK = DATA_DIM16/PIN_COUNT; +typedef block16_t block_t; +#endif // RECORD_EIGHT_BITS + +block_t* emptyQueue[QUEUE_DIM]; +uint8_t emptyHead; +uint8_t emptyTail; + +block_t* fullQueue[QUEUE_DIM]; +volatile uint8_t fullHead; // volatile insures non-interrupt code sees changes. +uint8_t fullTail; + +// queueNext assumes QUEUE_DIM is a power of two +inline uint8_t queueNext(uint8_t ht) {return (ht + 1) & (QUEUE_DIM -1);} +//============================================================================== +// Interrupt Service Routines + +// Pointer to current buffer. +block_t* isrBuf; + +// Need new buffer if true. +bool isrBufNeeded = true; + +// overrun count +uint16_t isrOver = 0; + +// ADC configuration for each pin. +uint8_t adcmux[PIN_COUNT]; +uint8_t adcsra[PIN_COUNT]; +uint8_t adcsrb[PIN_COUNT]; +uint8_t adcindex = 1; + +// Insure no timer events are missed. +volatile bool timerError = false; +volatile bool timerFlag = false; +//------------------------------------------------------------------------------ +// ADC done interrupt. +ISR(ADC_vect) { + // Read ADC data. +#if RECORD_EIGHT_BITS + uint8_t d = ADCH; +#else // RECORD_EIGHT_BITS + // This will access ADCL first. + uint16_t d = ADC; +#endif // RECORD_EIGHT_BITS + + if (isrBufNeeded && emptyHead == emptyTail) { + // no buffers - count overrun + if (isrOver < 0XFFFF) isrOver++; + + // Avoid missed timer error. + timerFlag = false; + return; + } + // Start ADC + if (PIN_COUNT > 1) { + ADMUX = adcmux[adcindex]; + ADCSRB = adcsrb[adcindex]; + ADCSRA = adcsra[adcindex]; + if (adcindex == 0) timerFlag = false; + adcindex = adcindex < (PIN_COUNT - 1) ? adcindex + 1 : 0; + } else { + timerFlag = false; + } + // Check for buffer needed. + if (isrBufNeeded) { + // Remove buffer from empty queue. + isrBuf = emptyQueue[emptyTail]; + emptyTail = queueNext(emptyTail); + isrBuf->count = 0; + isrBuf->overrun = isrOver; + isrBufNeeded = false; + } + // Store ADC data. + isrBuf->data[isrBuf->count++] = d; + + // Check for buffer full. + if (isrBuf->count >= PIN_COUNT*SAMPLES_PER_BLOCK) { + // Put buffer isrIn full queue. + uint8_t tmp = fullHead; // Avoid extra fetch of volatile fullHead. + fullQueue[tmp] = (block_t*)isrBuf; + fullHead = queueNext(tmp); + + // Set buffer needed and clear overruns. + isrBufNeeded = true; + isrOver = 0; + } +} +//------------------------------------------------------------------------------ +// timer1 interrupt to clear OCF1B +ISR(TIMER1_COMPB_vect) { + // Make sure ADC ISR responded to timer event. + if (timerFlag) timerError = true; + timerFlag = true; +} +//============================================================================== +// Error messages stored in flash. +#define error(msg) error_P(PSTR(msg)) +//------------------------------------------------------------------------------ +void error_P(const char* msg) { + sd.errorPrint_P(msg); + fatalBlink(); +} +//------------------------------------------------------------------------------ +// +void fatalBlink() { + while (true) { + if (ERROR_LED_PIN >= 0) { + digitalWrite(ERROR_LED_PIN, HIGH); + delay(200); + digitalWrite(ERROR_LED_PIN, LOW); + delay(200); + } + } +} +//============================================================================== +#if ADPS0 != 0 || ADPS1 != 1 || ADPS2 != 2 +#error unexpected ADC prescaler bits +#endif +//------------------------------------------------------------------------------ +// initialize ADC and timer1 +void adcInit(metadata_t* meta) { + uint8_t adps; // prescaler bits for ADCSRA + uint32_t ticks = F_CPU*SAMPLE_INTERVAL + 0.5; // Sample interval cpu cycles. + + if (ADC_REF & ~((1 << REFS0) | (1 << REFS1))) { + error("Invalid ADC reference"); + } +#ifdef ADC_PRESCALER + if (ADC_PRESCALER > 7 || ADC_PRESCALER < 2) { + error("Invalid ADC prescaler"); + } + adps = ADC_PRESCALER; +#else // ADC_PRESCALER + // Allow extra cpu cycles to change ADC settings if more than one pin. + int32_t adcCycles = (ticks - ISR_TIMER0)/PIN_COUNT; + - (PIN_COUNT > 1 ? ISR_SETUP_ADC : 0); + + for (adps = 7; adps > 0; adps--) { + if (adcCycles >= (MIN_ADC_CYCLES << adps)) break; + } +#endif // ADC_PRESCALER + meta->adcFrequency = F_CPU >> adps; + if (meta->adcFrequency > (RECORD_EIGHT_BITS ? 2000000 : 1000000)) { + error("Sample Rate Too High"); + } +#if ROUND_SAMPLE_INTERVAL + // Round so interval is multiple of ADC clock. + ticks += 1 << (adps - 1); + ticks >>= adps; + ticks <<= adps; +#endif // ROUND_SAMPLE_INTERVAL + + if (PIN_COUNT > sizeof(meta->pinNumber)/sizeof(meta->pinNumber[0])) { + error("Too many pins"); + } + meta->pinCount = PIN_COUNT; + meta->recordEightBits = RECORD_EIGHT_BITS; + + for (int i = 0; i < PIN_COUNT; i++) { + uint8_t pin = PIN_LIST[i]; + if (pin >= NUM_ANALOG_INPUTS) error("Invalid Analog pin number"); + meta->pinNumber[i] = pin; + + // Set ADC reference and low three bits of analog pin number. + adcmux[i] = (pin & 7) | ADC_REF; + if (RECORD_EIGHT_BITS) adcmux[i] |= 1 << ADLAR; + + // If this is the first pin, trigger on timer/counter 1 compare match B. + adcsrb[i] = i == 0 ? (1 << ADTS2) | (1 << ADTS0) : 0; +#ifdef MUX5 + if (pin > 7) adcsrb[i] |= (1 << MUX5); +#endif // MUX5 + adcsra[i] = (1 << ADEN) | (1 << ADIE) | adps; + adcsra[i] |= i == 0 ? 1 << ADATE : 1 << ADSC; + } + + // Setup timer1 + TCCR1A = 0; + uint8_t tshift; + if (ticks < 0X10000) { + // no prescale, CTC mode + TCCR1B = (1 << WGM13) | (1 << WGM12) | (1 << CS10); + tshift = 0; + } else if (ticks < 0X10000*8) { + // prescale 8, CTC mode + TCCR1B = (1 << WGM13) | (1 << WGM12) | (1 << CS11); + tshift = 3; + } else if (ticks < 0X10000*64) { + // prescale 64, CTC mode + TCCR1B = (1 << WGM13) | (1 << WGM12) | (1 << CS11) | (1 << CS10); + tshift = 6; + } else if (ticks < 0X10000*256) { + // prescale 256, CTC mode + TCCR1B = (1 << WGM13) | (1 << WGM12) | (1 << CS12); + tshift = 8; + } else if (ticks < 0X10000*1024) { + // prescale 1024, CTC mode + TCCR1B = (1 << WGM13) | (1 << WGM12) | (1 << CS12) | (1 << CS10); + tshift = 10; + } else { + error("Sample Rate Too Slow"); + } + // divide by prescaler + ticks >>= tshift; + // set TOP for timer reset + ICR1 = ticks - 1; + // compare for ADC start + OCR1B = 0; + + // multiply by prescaler + ticks <<= tshift; + + // Sample interval in CPU clock ticks. + meta->sampleInterval = ticks; + meta->cpuFrequency = F_CPU; + float sampleRate = (float)meta->cpuFrequency/meta->sampleInterval; + Serial.print(F("Sample pins:")); + for (int i = 0; i < meta->pinCount; i++) { + Serial.print(' '); + Serial.print(meta->pinNumber[i], DEC); + } + Serial.println(); + Serial.print(F("ADC bits: ")); + Serial.println(meta->recordEightBits ? 8 : 10); + Serial.print(F("ADC clock kHz: ")); + Serial.println(meta->adcFrequency/1000); + Serial.print(F("Sample Rate: ")); + Serial.println(sampleRate); + Serial.print(F("Sample interval usec: ")); + Serial.println(1000000.0/sampleRate, 4); +} +//------------------------------------------------------------------------------ +// enable ADC and timer1 interrupts +void adcStart() { + // initialize ISR + isrBufNeeded = true; + isrOver = 0; + adcindex = 1; + + // Clear any pending interrupt. + ADCSRA |= 1 << ADIF; + + // Setup for first pin. + ADMUX = adcmux[0]; + ADCSRB = adcsrb[0]; + ADCSRA = adcsra[0]; + + // Enable timer1 interrupts. + timerError = false; + timerFlag = false; + TCNT1 = 0; + TIFR1 = 1 << OCF1B; + TIMSK1 = 1 << OCIE1B; +} +//------------------------------------------------------------------------------ +void adcStop() { + TIMSK1 = 0; + ADCSRA = 0; +} +//------------------------------------------------------------------------------ +// Convert binary file to CSV file. +void binaryToCsv() { + uint8_t lastPct = 0; + block_t buf; + metadata_t* pm; + uint32_t t0 = millis(); + char csvName[13]; + StdioStream csvStream; + + if (!binFile.isOpen()) { + Serial.println(F("No current binary file")); + return; + } + binFile.rewind(); + if (!binFile.read(&buf , 512) == 512) error("Read metadata failed"); + // Create a new CSV file. + strcpy(csvName, binName); + strcpy_P(&csvName[BASE_NAME_SIZE + 3], PSTR("CSV")); + + if (!csvStream.fopen(csvName, "w")) { + error("open csvStream failed"); + } + Serial.println(); + Serial.print(F("Writing: ")); + Serial.print(csvName); + Serial.println(F(" - type any character to stop")); + pm = (metadata_t*)&buf; + csvStream.print(F("Interval,")); + float intervalMicros = 1.0e6*pm->sampleInterval/(float)pm->cpuFrequency; + csvStream.print(intervalMicros, 4); + csvStream.println(F(",usec")); + for (uint8_t i = 0; i < pm->pinCount; i++) { + if (i) csvStream.putc(','); + csvStream.print(F("pin")); + csvStream.print(pm->pinNumber[i]); + } + csvStream.println(); + uint32_t tPct = millis(); + while (!Serial.available() && binFile.read(&buf, 512) == 512) { + uint16_t i; + if (buf.count == 0) break; + if (buf.overrun) { + csvStream.print(F("OVERRUN,")); + csvStream.println(buf.overrun); + } + for (uint16_t j = 0; j < buf.count; j += PIN_COUNT) { + for (uint16_t i = 0; i < PIN_COUNT; i++) { + if (i) csvStream.putc(','); + csvStream.print(buf.data[i + j]); + } + csvStream.println(); + } + if ((millis() - tPct) > 1000) { + uint8_t pct = binFile.curPosition()/(binFile.fileSize()/100); + if (pct != lastPct) { + tPct = millis(); + lastPct = pct; + Serial.print(pct, DEC); + Serial.println('%'); + } + } + if (Serial.available()) break; + } + csvStream.fclose(); + Serial.print(F("Done: ")); + Serial.print(0.001*(millis() - t0)); + Serial.println(F(" Seconds")); +} +//------------------------------------------------------------------------------ +// read data file and check for overruns +void checkOverrun() { + bool headerPrinted = false; + block_t buf; + uint32_t bgnBlock, endBlock; + uint32_t bn = 0; + + if (!binFile.isOpen()) { + Serial.println(F("No current binary file")); + return; + } + if (!binFile.contiguousRange(&bgnBlock, &endBlock)) { + error("contiguousRange failed"); + } + binFile.rewind(); + Serial.println(); + Serial.println(F("Checking overrun errors - type any character to stop")); + if (!binFile.read(&buf , 512) == 512) { + error("Read metadata failed"); + } + bn++; + while (binFile.read(&buf, 512) == 512) { + if (buf.count == 0) break; + if (buf.overrun) { + if (!headerPrinted) { + Serial.println(); + Serial.println(F("Overruns:")); + Serial.println(F("fileBlockNumber,sdBlockNumber,overrunCount")); + headerPrinted = true; + } + Serial.print(bn); + Serial.print(','); + Serial.print(bgnBlock + bn); + Serial.print(','); + Serial.println(buf.overrun); + } + bn++; + } + if (!headerPrinted) { + Serial.println(F("No errors found")); + } else { + Serial.println(F("Done")); + } +} +//------------------------------------------------------------------------------ +// dump data file to Serial +void dumpData() { + block_t buf; + if (!binFile.isOpen()) { + Serial.println(F("No current binary file")); + return; + } + binFile.rewind(); + if (binFile.read(&buf , 512) != 512) { + error("Read metadata failed"); + } + Serial.println(); + Serial.println(F("Type any character to stop")); + delay(1000); + while (!Serial.available() && binFile.read(&buf , 512) == 512) { + if (buf.count == 0) break; + if (buf.overrun) { + Serial.print(F("OVERRUN,")); + Serial.println(buf.overrun); + } + for (uint16_t i = 0; i < buf.count; i++) { + Serial.print(buf.data[i], DEC); + if ((i+1)%PIN_COUNT) { + Serial.print(','); + } else { + Serial.println(); + } + } + } + Serial.println(F("Done")); +} +//------------------------------------------------------------------------------ +// log data +// max number of blocks to erase per erase call +uint32_t const ERASE_SIZE = 262144L; +void logData() { + uint32_t bgnBlock, endBlock; + + // Allocate extra buffer space. + block_t block[BUFFER_BLOCK_COUNT]; + + Serial.println(); + + // Initialize ADC and timer1. + adcInit((metadata_t*) &block[0]); + + // Find unused file name. + if (BASE_NAME_SIZE > 6) { + error("FILE_BASE_NAME too long"); + } + while (sd.exists(binName)) { + if (binName[BASE_NAME_SIZE + 1] != '9') { + binName[BASE_NAME_SIZE + 1]++; + } else { + binName[BASE_NAME_SIZE + 1] = '0'; + if (binName[BASE_NAME_SIZE] == '9') { + error("Can't create file name"); + } + binName[BASE_NAME_SIZE]++; + } + } + // Delete old tmp file. + if (sd.exists(TMP_FILE_NAME)) { + Serial.println(F("Deleting tmp file")); + if (!sd.remove(TMP_FILE_NAME)) { + error("Can't remove tmp file"); + } + } + // Create new file. + Serial.println(F("Creating new file")); + binFile.close(); + if (!binFile.createContiguous(sd.vwd(), + TMP_FILE_NAME, 512 * FILE_BLOCK_COUNT)) { + error("createContiguous failed"); + } + // Get the address of the file on the SD. + if (!binFile.contiguousRange(&bgnBlock, &endBlock)) { + error("contiguousRange failed"); + } + // Use SdFat's internal buffer. + uint8_t* cache = (uint8_t*)sd.vol()->cacheClear(); + if (cache == 0) error("cacheClear failed"); + + // Flash erase all data in the file. + Serial.println(F("Erasing all data")); + uint32_t bgnErase = bgnBlock; + uint32_t endErase; + while (bgnErase < endBlock) { + endErase = bgnErase + ERASE_SIZE; + if (endErase > endBlock) endErase = endBlock; + if (!sd.card()->erase(bgnErase, endErase)) { + error("erase failed"); + } + bgnErase = endErase + 1; + } + // Start a multiple block write. + if (!sd.card()->writeStart(bgnBlock, FILE_BLOCK_COUNT)) { + error("writeBegin failed"); + } + // Write metadata. + if (!sd.card()->writeData((uint8_t*)&block[0])) { + error("Write metadata failed"); + } + // Initialize queues. + emptyHead = emptyTail = 0; + fullHead = fullTail = 0; + + // Use SdFat buffer for one block. + emptyQueue[emptyHead] = (block_t*)cache; + emptyHead = queueNext(emptyHead); + + // Put rest of buffers in the empty queue. + for (uint8_t i = 0; i < BUFFER_BLOCK_COUNT; i++) { + emptyQueue[emptyHead] = &block[i]; + emptyHead = queueNext(emptyHead); + } + // Give SD time to prepare for big write. + delay(1000); + Serial.println(F("Logging - type any character to stop")); + // Wait for Serial Idle. + Serial.flush(); + delay(10); + uint32_t bn = 1; + uint32_t t0 = millis(); + uint32_t t1 = t0; + uint32_t overruns = 0; + uint32_t count = 0; + uint32_t maxLatency = 0; + + // Start logging interrupts. + adcStart(); + while (1) { + if (fullHead != fullTail) { + // Get address of block to write. + block_t* pBlock = fullQueue[fullTail]; + + // Write block to SD. + uint32_t usec = micros(); + if (!sd.card()->writeData((uint8_t*)pBlock)) { + error("write data failed"); + } + usec = micros() - usec; + t1 = millis(); + if (usec > maxLatency) maxLatency = usec; + count += pBlock->count; + + // Add overruns and possibly light LED. + if (pBlock->overrun) { + overruns += pBlock->overrun; + if (ERROR_LED_PIN >= 0) { + digitalWrite(ERROR_LED_PIN, HIGH); + } + } + // Move block to empty queue. + emptyQueue[emptyHead] = pBlock; + emptyHead = queueNext(emptyHead); + fullTail = queueNext(fullTail); + bn++; + if (bn == FILE_BLOCK_COUNT) { + // File full so stop ISR calls. + adcStop(); + break; + } + } + if (timerError) { + error("Missed timer event - rate too high"); + } + if (Serial.available()) { + // Stop ISR calls. + adcStop(); + if (isrBuf != 0 && isrBuf->count >= PIN_COUNT) { + // Truncate to last complete sample. + isrBuf->count = PIN_COUNT*(isrBuf->count/PIN_COUNT); + // Put buffer in full queue. + fullQueue[fullHead] = isrBuf; + fullHead = queueNext(fullHead); + isrBuf = 0; + } + if (fullHead == fullTail) break; + } + } + if (!sd.card()->writeStop()) { + error("writeStop failed"); + } + // Truncate file if recording stopped early. + if (bn != FILE_BLOCK_COUNT) { + Serial.println(F("Truncating file")); + if (!binFile.truncate(512L * bn)) { + error("Can't truncate file"); + } + } + if (!binFile.rename(sd.vwd(), binName)) { + error("Can't rename file"); + } + Serial.print(F("File renamed: ")); + Serial.println(binName); + Serial.print(F("Max block write usec: ")); + Serial.println(maxLatency); + Serial.print(F("Record time sec: ")); + Serial.println(0.001*(t1 - t0), 3); + Serial.print(F("Sample count: ")); + Serial.println(count/PIN_COUNT); + Serial.print(F("Samples/sec: ")); + Serial.println((1000.0/PIN_COUNT)*count/(t1-t0)); + Serial.print(F("Overruns: ")); + Serial.println(overruns); + Serial.println(F("Done")); +} +//------------------------------------------------------------------------------ +void setup(void) { + if (ERROR_LED_PIN >= 0) { + pinMode(ERROR_LED_PIN, OUTPUT); + } + Serial.begin(9600); + + // Read the first sample pin to init the ADC. + analogRead(PIN_LIST[0]); + + Serial.print(F("FreeRam: ")); + Serial.println(FreeRam()); + + // initialize file system. + if (!sd.begin(SD_CS_PIN, SPI_FULL_SPEED)) { + sd.initErrorPrint(); + fatalBlink(); + } +} +//------------------------------------------------------------------------------ +void loop(void) { + // discard any input + while (Serial.read() >= 0) {} + Serial.println(); + Serial.println(F("type:")); + Serial.println(F("c - convert file to CSV")); + Serial.println(F("d - dump data to Serial")); + Serial.println(F("e - overrun error details")); + Serial.println(F("r - record ADC data")); + + while(!Serial.available()) {} + char c = tolower(Serial.read()); + if (ERROR_LED_PIN >= 0) { + digitalWrite(ERROR_LED_PIN, LOW); + } + // Read any extra Serial data. + do { + delay(10); + } while (Serial.read() >= 0); + + if (c == 'c') { + binaryToCsv(); + } else if (c == 'd') { + dumpData(); + } else if (c == 'e') { + checkOverrun(); + } else if (c == 'r') { + logData(); + } else { + Serial.println(F("Invalid entry")); + } +} diff --git a/libs/SdFat-master/SdFat/examples/LowLatencyLogger/LowLatencyLogger.ino b/libs/SdFat-master/SdFat/examples/LowLatencyLogger/LowLatencyLogger.ino new file mode 100755 index 0000000..74cc79c --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/LowLatencyLogger/LowLatencyLogger.ino @@ -0,0 +1,529 @@ +/** + * This program logs data to a binary file. Functions are included + * to convert the binary file to a CSV text file. + * + * Samples are logged at regular intervals. The maximum logging rate + * depends on the quality of your SD card and the time required to + * read sensor data. This example has been tested at 500 Hz with + * good SD card on an Uno. 4000 HZ is possible on a Due. + * + * If your SD card has a long write latency, it may be necessary to use + * slower sample rates. Using a Mega Arduino helps overcome latency + * problems since 13 512 byte buffers will be used. + * + * Data is written to the file using a SD multiple block write command. + */ +#include +#include +//------------------------------------------------------------------------------ +// User data functions. Modify these functions for your data items. +#include "UserDataType.h" // Edit this include file to change data_t. + +// Acquire a data record. +void acquireData(data_t* data) { + data->time = micros(); + for (int i = 0; i < ADC_DIM; i++) { + data->adc[i] = analogRead(i); + } +} + +// Print a data record. +void printData(Print* pr, data_t* data) { + pr->print(data->time); + for (int i = 0; i < ADC_DIM; i++) { + pr->write(','); + pr->print(data->adc[i]); + } + pr->println(); +} + +// Print data header. +void printHeader(Print* pr) { + pr->print(F("time")); + for (int i = 0; i < ADC_DIM; i++) { + pr->print(F(",adc")); + pr->print(i); + } + pr->println(); +} +//============================================================================== +// Start of configuration constants. +//============================================================================== +//Interval between data records in microseconds. +const uint32_t LOG_INTERVAL_USEC = 2000; +//------------------------------------------------------------------------------ +// Pin definitions. +// +// SD chip select pin. +const uint8_t SD_CS_PIN = SS; +// +// Digital pin to indicate an error, set to -1 if not used. +// The led blinks for fatal errors. The led goes on solid for SD write +// overrun errors and logging continues. +const int8_t ERROR_LED_PIN = 3; +//------------------------------------------------------------------------------ +// File definitions. +// +// Maximum file size in blocks. +// The program creates a contiguous file with FILE_BLOCK_COUNT 512 byte blocks. +// This file is flash erased using special SD commands. The file will be +// truncated if logging is stopped early. +const uint32_t FILE_BLOCK_COUNT = 256000; + +// log file base name. Must be six characters or less. +#define FILE_BASE_NAME "DATA" +//------------------------------------------------------------------------------ +// Buffer definitions. +// +// The logger will use SdFat's buffer plus BUFFER_BLOCK_COUNT additional +// buffers. +// +#ifndef RAMEND +// Assume ARM. Use total of nine 512 byte buffers. +const uint8_t BUFFER_BLOCK_COUNT = 8; +// +#elif RAMEND < 0X8FF +#error Too little SRAM +// +#elif RAMEND < 0X10FF +// Use total of two 512 byte buffers. +const uint8_t BUFFER_BLOCK_COUNT = 1; +// +#elif RAMEND < 0X20FF +// Use total of five 512 byte buffers. +const uint8_t BUFFER_BLOCK_COUNT = 4; +// +#else // RAMEND +// Use total of 13 512 byte buffers. +const uint8_t BUFFER_BLOCK_COUNT = 12; +#endif // RAMEND +//============================================================================== +// End of configuration constants. +//============================================================================== +// Temporary log file. Will be deleted if a reset or power failure occurs. +#define TMP_FILE_NAME "TMP_LOG.BIN" + +// Size of file base name. Must not be larger than six. +const uint8_t BASE_NAME_SIZE = sizeof(FILE_BASE_NAME) - 1; + +SdFat sd; + +SdBaseFile binFile; + +char binName[13] = FILE_BASE_NAME "00.BIN"; + +// Number of data records in a block. +const uint16_t DATA_DIM = (512 - 4)/sizeof(data_t); + +//Compute fill so block size is 512 bytes. FILL_DIM may be zero. +const uint16_t FILL_DIM = 512 - 4 - DATA_DIM*sizeof(data_t); + +struct block_t { + uint16_t count; + uint16_t overrun; + data_t data[DATA_DIM]; + uint8_t fill[FILL_DIM]; +}; + +const uint8_t QUEUE_DIM = BUFFER_BLOCK_COUNT + 2; + +block_t* emptyQueue[QUEUE_DIM]; +uint8_t emptyHead; +uint8_t emptyTail; + +block_t* fullQueue[QUEUE_DIM]; +uint8_t fullHead; +uint8_t fullTail; + +// Advance queue index. +inline uint8_t queueNext(uint8_t ht) {return ht < (QUEUE_DIM - 1) ? ht + 1 : 0;} +//============================================================================== +// Error messages stored in flash. +#define error(msg) error_P(PSTR(msg)) +//------------------------------------------------------------------------------ +void error_P(const char* msg) { + sd.errorPrint_P(msg); + fatalBlink(); +} +//------------------------------------------------------------------------------ +// +void fatalBlink() { + while (true) { + if (ERROR_LED_PIN >= 0) { + digitalWrite(ERROR_LED_PIN, HIGH); + delay(200); + digitalWrite(ERROR_LED_PIN, LOW); + delay(200); + } + } +} +//============================================================================== +// Convert binary file to CSV file. +void binaryToCsv() { + uint8_t lastPct = 0; + block_t block; + uint32_t t0 = millis(); + uint32_t syncCluster = 0; + SdFile csvFile; + char csvName[13]; + + if (!binFile.isOpen()) { + Serial.println(); + Serial.println(F("No current binary file")); + return; + } + binFile.rewind(); + // Create a new csvFile. + strcpy(csvName, binName); + strcpy_P(&csvName[BASE_NAME_SIZE + 3], PSTR("CSV")); + + if (!csvFile.open(csvName, O_WRITE | O_CREAT | O_TRUNC)) { + error("open csvFile failed"); + } + Serial.println(); + Serial.print(F("Writing: ")); + Serial.print(csvName); + Serial.println(F(" - type any character to stop")); + printHeader(&csvFile); + uint32_t tPct = millis(); + while (!Serial.available() && binFile.read(&block, 512) == 512) { + uint16_t i; + if (block.count == 0) break; + if (block.overrun) { + csvFile.print(F("OVERRUN,")); + csvFile.println(block.overrun); + } + for (i = 0; i < block.count; i++) { + printData(&csvFile, &block.data[i]); + } + if (csvFile.curCluster() != syncCluster) { + csvFile.sync(); + syncCluster = csvFile.curCluster(); + } + if ((millis() - tPct) > 1000) { + uint8_t pct = binFile.curPosition()/(binFile.fileSize()/100); + if (pct != lastPct) { + tPct = millis(); + lastPct = pct; + Serial.print(pct, DEC); + Serial.println('%'); + } + } + if (Serial.available()) break; + } + csvFile.close(); + Serial.print(F("Done: ")); + Serial.print(0.001*(millis() - t0)); + Serial.println(F(" Seconds")); +} +//------------------------------------------------------------------------------ +// read data file and check for overruns +void checkOverrun() { + bool headerPrinted = false; + block_t block; + uint32_t bgnBlock, endBlock; + uint32_t bn = 0; + + if (!binFile.isOpen()) { + Serial.println(); + Serial.println(F("No current binary file")); + return; + } + if (!binFile.contiguousRange(&bgnBlock, &endBlock)) { + error("contiguousRange failed"); + } + binFile.rewind(); + Serial.println(); + Serial.println(F("Checking overrun errors - type any character to stop")); + while (binFile.read(&block, 512) == 512) { + if (block.count == 0) break; + if (block.overrun) { + if (!headerPrinted) { + Serial.println(); + Serial.println(F("Overruns:")); + Serial.println(F("fileBlockNumber,sdBlockNumber,overrunCount")); + headerPrinted = true; + } + Serial.print(bn); + Serial.print(','); + Serial.print(bgnBlock + bn); + Serial.print(','); + Serial.println(block.overrun); + } + bn++; + } + if (!headerPrinted) { + Serial.println(F("No errors found")); + } else { + Serial.println(F("Done")); + } +} +//------------------------------------------------------------------------------ +// dump data file to Serial +void dumpData() { + block_t block; + if (!binFile.isOpen()) { + Serial.println(); + Serial.println(F("No current binary file")); + return; + } + binFile.rewind(); + Serial.println(); + Serial.println(F("Type any character to stop")); + delay(1000); + printHeader(&Serial); + while (!Serial.available() && binFile.read(&block , 512) == 512) { + if (block.count == 0) break; + if (block.overrun) { + Serial.print(F("OVERRUN,")); + Serial.println(block.overrun); + } + for (uint16_t i = 0; i < block.count; i++) { + printData(&Serial, &block.data[i]); + } + } + Serial.println(F("Done")); +} +//------------------------------------------------------------------------------ +// log data +// max number of blocks to erase per erase call +uint32_t const ERASE_SIZE = 262144L; +void logData() { + uint32_t bgnBlock, endBlock; + + // Allocate extra buffer space. + block_t block[BUFFER_BLOCK_COUNT]; + block_t* curBlock = 0; + Serial.println(); + + // Find unused file name. + if (BASE_NAME_SIZE > 6) { + error("FILE_BASE_NAME too long"); + } + while (sd.exists(binName)) { + if (binName[BASE_NAME_SIZE + 1] != '9') { + binName[BASE_NAME_SIZE + 1]++; + } else { + binName[BASE_NAME_SIZE + 1] = '0'; + if (binName[BASE_NAME_SIZE] == '9') { + error("Can't create file name"); + } + binName[BASE_NAME_SIZE]++; + } + } + // Delete old tmp file. + if (sd.exists(TMP_FILE_NAME)) { + Serial.println(F("Deleting tmp file")); + if (!sd.remove(TMP_FILE_NAME)) { + error("Can't remove tmp file"); + } + } + // Create new file. + Serial.println(F("Creating new file")); + binFile.close(); + if (!binFile.createContiguous(sd.vwd(), + TMP_FILE_NAME, 512 * FILE_BLOCK_COUNT)) { + error("createContiguous failed"); + } + // Get the address of the file on the SD. + if (!binFile.contiguousRange(&bgnBlock, &endBlock)) { + error("contiguousRange failed"); + } + // Use SdFat's internal buffer. + uint8_t* cache = (uint8_t*)sd.vol()->cacheClear(); + if (cache == 0) error("cacheClear failed"); + + // Flash erase all data in the file. + Serial.println(F("Erasing all data")); + uint32_t bgnErase = bgnBlock; + uint32_t endErase; + while (bgnErase < endBlock) { + endErase = bgnErase + ERASE_SIZE; + if (endErase > endBlock) endErase = endBlock; + if (!sd.card()->erase(bgnErase, endErase)) { + error("erase failed"); + } + bgnErase = endErase + 1; + } + // Start a multiple block write. + if (!sd.card()->writeStart(bgnBlock, FILE_BLOCK_COUNT)) { + error("writeBegin failed"); + } + // Initialize queues. + emptyHead = emptyTail = 0; + fullHead = fullTail = 0; + + // Use SdFat buffer for one block. + emptyQueue[emptyHead] = (block_t*)cache; + emptyHead = queueNext(emptyHead); + + // Put rest of buffers in the empty queue. + for (uint8_t i = 0; i < BUFFER_BLOCK_COUNT; i++) { + emptyQueue[emptyHead] = &block[i]; + emptyHead = queueNext(emptyHead); + } + Serial.println(F("Logging - type any character to stop")); + // Wait for Serial Idle. + Serial.flush(); + delay(10); + uint32_t bn = 0; + uint32_t t0 = millis(); + uint32_t t1 = t0; + uint32_t overrun = 0; + uint32_t overrunTotal = 0; + uint32_t count = 0; + uint32_t maxLatency = 0; + int32_t diff; + // Start at a multiple of interval. + uint32_t logTime = micros()/LOG_INTERVAL_USEC + 1; + logTime *= LOG_INTERVAL_USEC; + bool closeFile = false; + while (1) { + // Time for next data record. + logTime += LOG_INTERVAL_USEC; + if (Serial.available()) closeFile = true; + + if (closeFile) { + if (curBlock != 0 && curBlock->count >= 0) { + // Put buffer in full queue. + fullQueue[fullHead] = curBlock; + fullHead = queueNext(fullHead); + curBlock = 0; + } + } else { + if (curBlock == 0 && emptyTail != emptyHead) { + curBlock = emptyQueue[emptyTail]; + emptyTail = queueNext(emptyTail); + curBlock->count = 0; + curBlock->overrun = overrun; + overrun = 0; + } + do { + diff = logTime - micros(); + } while(diff > 0); + if (diff < -10) error("LOG_INTERVAL_USEC too small"); + if (curBlock == 0) { + overrun++; + } else { + acquireData(&curBlock->data[curBlock->count++]); + if (curBlock->count == DATA_DIM) { + fullQueue[fullHead] = curBlock; + fullHead = queueNext(fullHead); + curBlock = 0; + } + } + } + + if (fullHead == fullTail) { + // Exit loop if done. + if (closeFile) break; + } else if (!sd.card()->isBusy()) { + // Get address of block to write. + block_t* pBlock = fullQueue[fullTail]; + fullTail = queueNext(fullTail); + // Write block to SD. + uint32_t usec = micros(); + if (!sd.card()->writeData((uint8_t*)pBlock)) { + error("write data failed"); + } + usec = micros() - usec; + t1 = millis(); + if (usec > maxLatency) maxLatency = usec; + count += pBlock->count; + + // Add overruns and possibly light LED. + if (pBlock->overrun) { + overrunTotal += pBlock->overrun; + if (ERROR_LED_PIN >= 0) { + digitalWrite(ERROR_LED_PIN, HIGH); + } + } + // Move block to empty queue. + emptyQueue[emptyHead] = pBlock; + emptyHead = queueNext(emptyHead); + bn++; + if (bn == FILE_BLOCK_COUNT) { + // File full so stop + break; + } + } + } + if (!sd.card()->writeStop()) { + error("writeStop failed"); + } + // Truncate file if recording stopped early. + if (bn != FILE_BLOCK_COUNT) { + Serial.println(F("Truncating file")); + if (!binFile.truncate(512L * bn)) { + error("Can't truncate file"); + } + } + if (!binFile.rename(sd.vwd(), binName)) { + error("Can't rename file"); + } + Serial.print(F("File renamed: ")); + Serial.println(binName); + Serial.print(F("Max block write usec: ")); + Serial.println(maxLatency); + Serial.print(F("Record time sec: ")); + Serial.println(0.001*(t1 - t0), 3); + Serial.print(F("Sample count: ")); + Serial.println(count); + Serial.print(F("Samples/sec: ")); + Serial.println((1000.0)*count/(t1-t0)); + Serial.print(F("Overruns: ")); + Serial.println(overrunTotal); + Serial.println(F("Done")); +} +//------------------------------------------------------------------------------ +void setup(void) { + if (ERROR_LED_PIN >= 0) { + pinMode(ERROR_LED_PIN, OUTPUT); + } + Serial.begin(9600); + + Serial.print(F("FreeRam: ")); + Serial.println(FreeRam()); + Serial.print(F("Records/block: ")); + Serial.println(DATA_DIM); + if (sizeof(block_t) != 512) error("Invalid block size"); + // initialize file system. + if (!sd.begin(SD_CS_PIN, SPI_FULL_SPEED)) { + sd.initErrorPrint(); + fatalBlink(); + } +} +//------------------------------------------------------------------------------ +void loop(void) { + // discard any input + while (Serial.read() >= 0) {} + Serial.println(); + Serial.println(F("type:")); + Serial.println(F("c - convert file to CSV")); + Serial.println(F("d - dump data to Serial")); + Serial.println(F("e - overrun error details")); + Serial.println(F("r - record data")); + + while(!Serial.available()) {} + char c = tolower(Serial.read()); + + // Discard extra Serial data. + do { + delay(10); + } while (Serial.read() >= 0); + + if (ERROR_LED_PIN >= 0) { + digitalWrite(ERROR_LED_PIN, LOW); + } + if (c == 'c') { + binaryToCsv(); + } else if (c == 'd') { + dumpData(); + } else if (c == 'e') { + checkOverrun(); + } else if (c == 'r') { + logData(); + } else { + Serial.println(F("Invalid entry")); + } +} diff --git a/libs/SdFat-master/SdFat/examples/LowLatencyLogger/UserDataType.h b/libs/SdFat-master/SdFat/examples/LowLatencyLogger/UserDataType.h new file mode 100755 index 0000000..8e161e2 --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/LowLatencyLogger/UserDataType.h @@ -0,0 +1,8 @@ +#ifndef UserDataType_h +#define UserDataType_h +const uint8_t ADC_DIM = 4; +struct data_t { + unsigned long time; + unsigned short adc[ADC_DIM]; +}; +#endif // UserDataType_h diff --git a/libs/SdFatBeta20120108/SdFat/examples/OpenNext/OpenNext.pde b/libs/SdFat-master/SdFat/examples/OpenNext/OpenNext.ino similarity index 53% rename from libs/SdFatBeta20120108/SdFat/examples/OpenNext/OpenNext.pde rename to libs/SdFat-master/SdFat/examples/OpenNext/OpenNext.ino index aaed4d6..61a4852 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/OpenNext/OpenNext.pde +++ b/libs/SdFat-master/SdFat/examples/OpenNext/OpenNext.ino @@ -1,35 +1,40 @@ /* - * Open all files in the root dir and print their filename + * Print size, modify date/time, and name for all files in root. */ #include // SD chip select pin -const uint8_t chipSelect = SS_PIN; +const uint8_t chipSelect = SS; // file system object SdFat sd; SdFile file; - -// define a serial output stream -ArduinoOutStream cout(Serial); //------------------------------------------------------------------------------ void setup() { - char name[13]; - Serial.begin(9600); - + while (!Serial) {} // wait for Leonardo + delay(1000); + // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED, chipSelect)) sd.initErrorHalt(); + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); // open next file in root. The volume working directory, vwd, is root while (file.openNext(sd.vwd(), O_READ)) { - file.getFilename(name); - cout << name << endl; + file.printFileSize(&Serial); + Serial.write(' '); + file.printModifyDateTime(&Serial); + Serial.write(' '); + file.printName(&Serial); + if (file.isDir()) { + // Indicate a directory. + Serial.write('/'); + } + Serial.println(); file.close(); } - cout << "Done" << endl; + Serial.println("Done!"); } //------------------------------------------------------------------------------ void loop() {} diff --git a/libs/SdFat-master/SdFat/examples/PrintBenchmark/PrintBenchmark.ino b/libs/SdFat-master/SdFat/examples/PrintBenchmark/PrintBenchmark.ino new file mode 100755 index 0000000..61f88aa --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/PrintBenchmark/PrintBenchmark.ino @@ -0,0 +1,140 @@ +/* + * This sketch is a simple Print benchmark. + */ +#include +#include + +// SD chip select pin +const uint8_t chipSelect = SS; + +// number of lines to print +const uint16_t N_PRINT = 20000; + +// file system +SdFat sd; + +// test file +SdFile file; + +// Serial output stream +ArduinoOutStream cout(Serial); +//------------------------------------------------------------------------------ +// store error strings in flash to save RAM +#define error(s) sd.errorHalt_P(PSTR(s)) +//------------------------------------------------------------------------------ +void setup() { + Serial.begin(9600); + while (!Serial) { + // wait for Leonardo + } +} +//------------------------------------------------------------------------------ +void loop() { + uint32_t maxLatency; + uint32_t minLatency; + uint32_t totalLatency; + + while (Serial.read() >= 0) { + } + // pstr stores strings in flash to save RAM + cout << pstr("Type any character to start\n"); + while (Serial.read() <= 0) { + } + delay(400); // catch Due reset problem + + cout << pstr("Free RAM: ") << FreeRam() << endl; + + // initialize the SD card at SPI_FULL_SPEED for best performance. + // try SPI_HALF_SPEED if bus errors occur. + if (!sd.begin(chipSelect, SPI_FULL_SPEED)) sd.initErrorHalt(); + + cout << pstr("Type is FAT") << int(sd.vol()->fatType()) << endl; + + cout << pstr("Starting print test. Please wait.\n\n"); + + // do write test + for (int test = 0; test < 6; test++) { + char fileName[13] = "BENCH0.TXT"; + fileName[5] = '0' + test; + // open or create file - truncate existing file. + if (!file.open(fileName, O_CREAT | O_TRUNC | O_RDWR)) { + error("open failed"); + } + maxLatency = 0; + minLatency = 999999; + totalLatency = 0; + switch(test) { + case 0: + cout << pstr("Test of println(uint16_t)\n"); + break; + + case 1: + cout << pstr("Test of printField(uint16_t, char)\n"); + break; + + case 2: + cout << pstr("Test of println(uint32_t)\n"); + break; + + case 3: + cout << pstr("Test of printField(uint32_t, char)\n"); + break; + case 4: + cout << pstr("Test of println(float)\n"); + break; + + case 5: + cout << pstr("Test of printField(float, char)\n"); + break; + } + + uint32_t t = millis(); + for (uint16_t i = 0; i < N_PRINT; i++) { + uint32_t m = micros(); + + switch(test) { + case 0: + file.println(i); + break; + + case 1: + file.printField(i, '\n'); + break; + + case 2: + file.println(12345678UL + i); + break; + + case 3: + file.printField(12345678UL + i, '\n'); + break; + + case 4: + file.println((float)0.01*i); + break; + + case 5: + file.printField((float)0.01*i, '\n'); + break; + } + if (file.writeError) { + error("write failed"); + } + m = micros() - m; + if (maxLatency < m) maxLatency = m; + if (minLatency > m) minLatency = m; + totalLatency += m; + } + file.close(); + t = millis() - t; + double s = file.fileSize(); + cout << pstr("Time ") << 0.001*t << pstr(" sec\n"); + cout << pstr("File size ") << 0.001*s << pstr(" KB\n"); + cout << pstr("Write ") << s/t << pstr(" KB/sec\n"); + cout << pstr("Maximum latency: ") << maxLatency; + cout << pstr(" usec, Minimum Latency: ") << minLatency; + cout << pstr(" usec, Avg Latency: "); + cout << totalLatency/N_PRINT << pstr(" usec\n\n"); + } + cout << pstr("Done!\n\n"); +} diff --git a/libs/SdFatBeta20120108/SdFat/examples/QuickStart/QuickStart.pde b/libs/SdFat-master/SdFat/examples/QuickStart/QuickStart.ino similarity index 70% rename from libs/SdFatBeta20120108/SdFat/examples/QuickStart/QuickStart.pde rename to libs/SdFat-master/SdFat/examples/QuickStart/QuickStart.ino index 080ddc6..c57f194 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/QuickStart/QuickStart.pde +++ b/libs/SdFat-master/SdFat/examples/QuickStart/QuickStart.ino @@ -1,12 +1,20 @@ -// Quick hardware test +// Quick hardware test. +// #include +// +// Set DISABLE_CHIP_SELECT to disable a second SPI device. +// For example, with the Ethernet shield, set DISABLE_CHIP_SELECT +// to 10 to disable the Ethernet controller. +const int8_t DISABLE_CHIP_SELECT = -1; +// // Test with reduced SPI speed for breadboards. // Change spiSpeed to SPI_FULL_SPEED for better performance // Use SPI_QUARTER_SPEED for even slower SPI bus speed const uint8_t spiSpeed = SPI_HALF_SPEED; //------------------------------------------------------------------------------ -// Normally SdFat is used in applications in place +// Normally the SdFat class is used in applications in place // of Sd2Card, SdVolume, and SdFile for root. +// These internal classes are used here to diagnose problems. Sd2Card card; SdVolume volume; SdFile root; @@ -22,23 +30,33 @@ ArduinoInStream cin(Serial, cinBuf, sizeof(cinBuf)); int chipSelect; void cardOrSpeed() { - cout << pstr( - "Try another SD card or reduce the SPI bus speed.\n" - "The current SPI speed is: "); - uint8_t divisor = 1; - for (uint8_t i = 0; i < spiSpeed; i++) divisor *= 2; - cout << F_CPU * 0.5e-6 / divisor << pstr(" MHz\n"); + cout << pstr("Try another SD card or reduce the SPI bus speed.\n"); cout << pstr("Edit spiSpeed in this sketch to change it.\n"); } void reformatMsg() { cout << pstr("Try reformatting the card. For best results use\n"); cout << pstr("the SdFormatter sketch in SdFat/examples or download\n"); - cout << pstr("and use SDFormatter from www.sdcard.org/consumer.\n"); + cout << pstr("and use SDFormatter from www.sdcard.org/downloads.\n"); } void setup() { Serial.begin(9600); + while (!Serial) {} // Wait for Leonardo. + delay(1000); // Delay for Due. + + cout << pstr("\nSPI pins:\n"); + cout << pstr("MOSI: ") << int(MOSI) << endl; + cout << pstr("MISO: ") << int(MISO) << endl; + cout << pstr("SCK: ") << int(SCK) << endl; + + if (DISABLE_CHIP_SELECT < 0) { + cout << pstr( + "\nBe sure to edit DISABLE_CHIP_SELECT if you have\n" + "a second SPI device. For example, with the Ethernet\n" + "shield, DISABLE_CHIP_SELECT should be set to 10\n" + "to disable the Ethernet controller.\n"); + } cout << pstr( "\nSD chip select is the key hardware option.\n" "Common values are:\n" @@ -63,12 +81,23 @@ void loop() { cout << pstr("\nInvalid pin number\n"); return; } + if (DISABLE_CHIP_SELECT < 0) { + cout << pstr( + "\nAssuming the SD is the only SPI device.\n" + "Edit DISABLE_CHIP_SELECT to disable another device.\n"); + } else { + cout << pstr("\nDisabling SPI device on pin "); + cout << int(DISABLE_CHIP_SELECT) << endl; + pinMode(DISABLE_CHIP_SELECT, OUTPUT); + digitalWrite(DISABLE_CHIP_SELECT, HIGH); + } if (!card.init(spiSpeed, chipSelect)) { cout << pstr( "\nSD initialization failed.\n" "Do not reformat the card!\n" "Is the card correctly inserted?\n" "Is chipSelect set to the correct value?\n" + "Does another SPI device need to be disabled?\n" "Is there a wiring/soldering problem?\n"); cout << pstr("errorCode: ") << hex << showbase << int(card.errorCode()); cout << pstr(", errorData: ") << int(card.errorData()); diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatRawWrite/SdFatRawWrite.pde b/libs/SdFat-master/SdFat/examples/RawWrite/RawWrite.ino similarity index 51% rename from libs/SdFatBeta20120108/extra/examplesV1/SdFatRawWrite/SdFatRawWrite.pde rename to libs/SdFat-master/SdFat/examples/RawWrite/RawWrite.ino index 9c080cc..319d0fd 100755 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatRawWrite/SdFatRawWrite.pde +++ b/libs/SdFat-master/SdFat/examples/RawWrite/RawWrite.ino @@ -4,16 +4,16 @@ * are used in the WaveRP library to record audio with the * Adafruit Wave Shield using the built-in Arduino ADC. * - * The WaveRP library captures data from the ADC in an ISR + * The WaveRP library captures data from the ADC in an ISR * that is driven driven by timer one. Data is collected in - * two 512 byte buffers and written to the SD card. + * two 512 byte buffers and written to the SD card. * * This sketch simulates logging from a source that produces - * data at a constant rate of one block every MILLIS_PER_BLOCK. + * data at a constant rate of one block every MICROS_PER_BLOCK. * * If a high quality SanDisk card is used with this sketch * no overruns occur and the maximum block write time is - * 2 millis. + * under 2000 micros. * * Note: WaveRP creates a very large file then truncates it * to the length that is used for a recording. It only takes @@ -24,67 +24,60 @@ #include #include +// SD chip select pin +const uint8_t chipSelect = SS; + // number of blocks in the contiguous file -#define BLOCK_COUNT 10000UL +const uint32_t BLOCK_COUNT = 10000UL; // time to produce a block of data -#define MILLIS_PER_BLOCK 10 +const uint32_t MICROS_PER_BLOCK = 10000; + +// file system +SdFat sd; -Sd2Card card; -SdVolume volume; -SdFile root; +// test file SdFile file; +// file extent uint32_t bgnBlock, endBlock; +// Serial output stream +ArduinoOutStream cout(Serial); +//------------------------------------------------------------------------------ // store error strings in flash to save RAM -#define error(s) error_P(PSTR(s)) - -void error_P(const char* str) { - PgmPrint("error: "); - SerialPrintln_P(str); - if (card.errorCode()) { - PgmPrint("SD error: "); - Serial.print(card.errorCode(), HEX); - Serial.write(','); - Serial.println(card.errorData(), HEX); - } - while(1); -} - +#define error(s) sd.errorHalt_P(PSTR(s)) +//------------------------------------------------------------------------------ +// log of first overruns +#define OVER_DIM 20 +struct { + uint32_t block; + uint32_t micros; +} over[OVER_DIM]; +//------------------------------------------------------------------------------ void setup(void) { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo } - +//------------------------------------------------------------------------------ void loop(void) { while (Serial.read() >= 0) {} - PgmPrintln("Type any character to start"); - while (!Serial.available()) {} + // pstr stores strings in flash to save RAM + cout << pstr("Type any character to start\n"); + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem + + cout << pstr("Free RAM: ") << FreeRam() << endl; - // initialize the SD card - uint32_t t = millis(); - // initialize the SD card at SPI_FULL_SPEED for best performance. // try SPI_HALF_SPEED if bus errors occur. - if (!card.init(SPI_FULL_SPEED)) error("card.init failed"); - - t = millis() - t; - - PgmPrint("Card init time: "); - Serial.print(t); - PgmPrintln(" millis"); - - // initialize a FAT volume - if (!volume.init(&card)) error("volume.init failed"); - - // open the root directory - if (!root.openRoot(&volume)) error("openRoot failed"); - + if (!sd.begin(chipSelect, SPI_FULL_SPEED)) sd.initErrorHalt(); + // delete possible existing file - SdFile::remove(&root, "RAW.TXT"); - + sd.remove("RAW.TXT"); + // create a contiguous file - if (!file.createContiguous(&root, "RAW.TXT", 512UL*BLOCK_COUNT)) { + if (!file.createContiguous(sd.vwd(), "RAW.TXT", 512UL*BLOCK_COUNT)) { error("createContiguous failed"); } // get the location of the file's blocks @@ -94,10 +87,10 @@ void loop(void) { //*********************NOTE************************************** // NO SdFile calls are allowed while cache is used for raw writes //*************************************************************** - + // clear the cache and use it as a 512 byte buffer - uint8_t* pCache = (uint8_t*)volume.cacheClear(); - + uint8_t* pCache = (uint8_t*)sd.vol()->cacheClear(); + // fill cache with eight lines of 64 bytes each memset(pCache, ' ', 512); for (uint16_t i = 0; i < 512; i += 64) { @@ -106,33 +99,26 @@ void loop(void) { pCache[i + 62] = '\r'; pCache[i + 63] = '\n'; } - - PgmPrint("Start raw write of "); - Serial.print(file.fileSize()); - PgmPrintln(" bytes at"); - - Serial.print(512000UL/MILLIS_PER_BLOCK); - PgmPrintln(" bytes per second"); - - PgmPrint("Please wait "); - Serial.print((BLOCK_COUNT*MILLIS_PER_BLOCK)/1000UL); - PgmPrintln(" seconds"); - + + cout << pstr("Start raw write of ") << file.fileSize() << pstr(" bytes at\n"); + cout << 512000000UL/MICROS_PER_BLOCK << pstr(" bytes per second\n"); + cout << pstr("Please wait ") << (BLOCK_COUNT*MICROS_PER_BLOCK)/1000000UL; + cout << pstr(" seconds\n"); + // tell card to setup for multiple block write with pre-erase - if (!card.erase(bgnBlock, endBlock)) error("card.erase failed"); - if (!card.writeStart(bgnBlock, BLOCK_COUNT)) { + if (!sd.card()->writeStart(bgnBlock, BLOCK_COUNT)) { error("writeStart failed"); } // init stats uint16_t overruns = 0; - uint16_t maxWriteTime = 0; - t = millis(); + uint32_t maxWriteTime = 0; + uint32_t t = micros(); uint32_t tNext = t; // write data for (uint32_t b = 0; b < BLOCK_COUNT; b++) { // write must be done by this time - tNext += MILLIS_PER_BLOCK; + tNext += MICROS_PER_BLOCK; // put block number at start of first line in block uint32_t n = b; @@ -142,45 +128,47 @@ void loop(void) { } // write a 512 byte block uint32_t tw = micros(); - if (!card.writeData(pCache)) error("writeData failed"); + if (!sd.card()->writeData(pCache)) error("writeData failed"); tw = micros() - tw; - + // check for max write time if (tw > maxWriteTime) { maxWriteTime = tw; } // check for overrun - if (millis() > tNext) { + if (micros() > tNext) { + if (overruns < OVER_DIM) { + over[overruns].block = b; + over[overruns].micros = tw; + } overruns++; // advance time to reflect overrun - tNext = millis(); + tNext = micros(); } else { // wait for time to write next block - while(millis() < tNext); + while(micros() < tNext); } } // total write time - t = millis() - t; - + t = micros() - t; + // end multiple block write mode - if (!card.writeStop()) error("writeStop failed"); - - PgmPrintln("Done"); - - PgmPrint("Overruns: "); - Serial.println(overruns); - - PgmPrint("Elapsed time: "); - Serial.print(t); - PgmPrintln(" millis"); - - PgmPrint("Max write time: "); - Serial.print(maxWriteTime); - PgmPrintln(" micros"); - - // close files for next pass of loop - root.close(); + if (!sd.card()->writeStop()) error("writeStop failed"); + + cout << pstr("Done\n"); + cout << pstr("Elapsed time: ") << setprecision(3)<< 1.e-6*t; + cout << pstr(" seconds\n"); + cout << pstr("Max write time: ") << maxWriteTime << pstr(" micros\n"); + cout << pstr("Overruns: ") << overruns << endl; + if (overruns) { + uint8_t n = overruns > OVER_DIM ? OVER_DIM : overruns; + cout << pstr("fileBlock,micros") << endl; + for (uint8_t i = 0; i < n; i++) { + cout << over[i].block << ',' << over[i].micros << endl; + } + } + // close file for next pass of loop file.close(); Serial.println(); -} +} \ No newline at end of file diff --git a/libs/SdFatBeta20120108/SdFat/examples/ReadWriteSdFat/ReadWriteSdFat.pde b/libs/SdFat-master/SdFat/examples/ReadWriteSdFat/ReadWriteSdFat.ino similarity index 83% rename from libs/SdFatBeta20120108/SdFat/examples/ReadWriteSdFat/ReadWriteSdFat.pde rename to libs/SdFat-master/SdFat/examples/ReadWriteSdFat/ReadWriteSdFat.ino index 2b33cc7..09bc124 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/ReadWriteSdFat/ReadWriteSdFat.pde +++ b/libs/SdFat-master/SdFat/examples/ReadWriteSdFat/ReadWriteSdFat.ino @@ -26,11 +26,15 @@ SdFile myFile; void setup() { Serial.begin(9600); - + while (!Serial) {} // wait for Leonardo + Serial.println("Type any character to start"); + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem + // Initialize SdFat or print a detailed error message and halt // Use half speed like the native library. // change to SPI_FULL_SPEED for more performance. - if (!sd.init(SPI_HALF_SPEED, chipSelect)) sd.initErrorHalt(); + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); // open the file for write at end like the Native SD library if (!myFile.open("test.txt", O_RDWR | O_CREAT | O_AT_END)) { @@ -52,7 +56,7 @@ void setup() { // read from the file until there's nothing else in it: int data; - while ((data = myFile.read()) > 0) Serial.write(data); + while ((data = myFile.read()) >= 0) Serial.write(data); // close the file: myFile.close(); } diff --git a/libs/SdFatBeta20120108/SdFat/examples/SdFormatter/SdFormatter.pde b/libs/SdFat-master/SdFat/examples/SdFormatter/SdFormatter.ino similarity index 98% rename from libs/SdFatBeta20120108/SdFat/examples/SdFormatter/SdFormatter.pde rename to libs/SdFat-master/SdFat/examples/SdFormatter/SdFormatter.ino index 0ca1927..35a5d00 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/SdFormatter/SdFormatter.pde +++ b/libs/SdFat-master/SdFat/examples/SdFormatter/SdFormatter.ino @@ -19,11 +19,11 @@ #endif // DEBUG_PRINT // // Change the value of chipSelect if your hardware does -// not use the default value, SS_PIN. Common values are: +// not use the default value, SS. Common values are: // Arduino Ethernet shield: pin 4 // Sparkfun SD shield: pin 8 // Adafruit SD shields and modules: pin 10 -const uint8_t chipSelect = SS_PIN; +const uint8_t chipSelect = SS; // Change spiSpeed to SPI_FULL_SPEED for better performance // Use SPI_QUARTER_SPEED for even slower SPI bus speed @@ -114,8 +114,11 @@ void initSizes() { sectorsPerCluster = 16; } else if (cardCapacityMB <= 1024) { sectorsPerCluster = 32; - } else { + } else if (cardCapacityMB <= 32768) { sectorsPerCluster = 64; + } else { + // SDXC cards + sectorsPerCluster = 128; } cout << pstr("Blocks/Cluster: ") << int(sectorsPerCluster) << endl; @@ -414,7 +417,10 @@ void formatCard() { void setup() { char c; Serial.begin(9600); + while (!Serial) {} // wait for Leonardo + cout << pstr( + "\n" "This sketch can erase and/or format SD/SDHC cards.\n" "\n" "Erase uses the card's fast flash erase command.\n" @@ -427,6 +433,8 @@ void setup() { "Warning, all data on the card will be erased.\n" "Enter 'Y' to continue: "); while (!Serial.available()) {} + delay(400); // catch Due restart problem + c = Serial.read(); cout << c << endl; if (c != 'Y') { diff --git a/libs/SdFatBeta20120108/SdFat/examples/SdInfo/SdInfo.pde b/libs/SdFat-master/SdFat/examples/SdInfo/SdInfo.ino similarity index 79% rename from libs/SdFatBeta20120108/SdFat/examples/SdInfo/SdInfo.pde rename to libs/SdFat-master/SdFat/examples/SdInfo/SdInfo.ino index 5dbb7e5..2b933dc 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/SdInfo/SdInfo.pde +++ b/libs/SdFat-master/SdFat/examples/SdInfo/SdInfo.ino @@ -10,7 +10,7 @@ * Adafruit SD shields and modules, pin 10. * Default SD chip select is the SPI SS pin. */ -const uint8_t SdChipSelect = SS_PIN; +const uint8_t SdChipSelect = SS; Sd2Card card; SdVolume vol; @@ -18,6 +18,9 @@ SdVolume vol; // serial output steam ArduinoOutStream cout(Serial); +// global for card size +uint32_t cardSize; + // global for card erase size uint32_t eraseSize; //------------------------------------------------------------------------------ @@ -48,7 +51,7 @@ uint8_t cidDmp() { } cout << pstr("\nVersion: "); cout << int(cid.prv_n) << '.' << int(cid.prv_m) << endl; - cout << pstr("Serial number: ") << cid.psn << endl; + cout << pstr("Serial number: ") << hex << cid.psn << dec << endl; cout << pstr("Manufacturing date: "); cout << int(cid.mdt_month) << '/'; cout << (2000 + cid.mdt_year_low + 10 * cid.mdt_year_high) << endl; @@ -59,8 +62,7 @@ uint8_t cidDmp() { uint8_t csdDmp() { csd_t csd; uint8_t eraseSingleBlock; - uint32_t cardSize = card.cardSize(); - if (cardSize == 0 || !card.readCSD(&csd)) { + if (!card.readCSD(&csd)) { sdErrorMsg("readCSD failed"); return false; } @@ -75,7 +77,9 @@ uint8_t csdDmp() { return false; } eraseSize++; - cout << pstr("cardSize: ") << cardSize << pstr(" (512 byte blocks)\n"); + cout << pstr("cardSize: ") << 0.000512*cardSize; + cout << pstr(" MB (MB = 1,000,000 bytes)\n"); + cout << pstr("flashEraseSize: ") << int(eraseSize) << pstr(" blocks\n"); cout << pstr("eraseSingleBlock: "); if (eraseSingleBlock) { @@ -89,10 +93,21 @@ uint8_t csdDmp() { // print partition table uint8_t partDmp() { cache_t *p = vol.cacheClear(); + if (!p) { + sdErrorMsg("cacheClear failed"); + return false; + } if (!card.readBlock(0, p->data)) { sdErrorMsg("read MBR failed"); return false; } + for (uint8_t ip = 1; ip < 5; ip++) { + part_t *pt = &p->mbr.part[ip - 1]; + if ((pt->boot & 0X7F) != 0 || pt->firstSector > cardSize) { + cout << pstr("\nNo MBR. Assuming Super Floppy format.\n"); + return true; + } + } cout << pstr("\nSD Partition Table\n"); cout << pstr("part,boot,type,start,length\n"); for (uint8_t ip = 1; ip < 5; ip++) { @@ -107,7 +122,10 @@ void volDmp() { cout << pstr("\nVolume is FAT") << int(vol.fatType()) << endl; cout << pstr("blocksPerCluster: ") << int(vol.blocksPerCluster()) << endl; cout << pstr("clusterCount: ") << vol.clusterCount() << endl; - cout << pstr("freeClusters: ") << vol.freeClusterCount() << endl; + uint32_t volFree = vol.freeClusterCount(); + cout << pstr("freeClusters: ") << volFree << endl; + float fs = 0.000512*volFree*vol.blocksPerCluster(); + cout << pstr("freeSpace: ") << fs << pstr(" MB (MB = 1,000,000 bytes)\n"); cout << pstr("fatStartBlock: ") << vol.fatStartBlock() << endl; cout << pstr("fatCount: ") << int(vol.fatCount()) << endl; cout << pstr("blocksPerFat: ") << vol.blocksPerFat() << endl; @@ -121,10 +139,11 @@ void volDmp() { //------------------------------------------------------------------------------ void setup() { Serial.begin(9600); + while(!Serial) {} // wait for Leonardo // use uppercase in hex and use 0X base prefix cout << uppercase << showbase << endl; - + // pstr stores strings in flash to save RAM cout << pstr("SdFat version: ") << SD_FAT_VERSION << endl; } @@ -132,11 +151,12 @@ void setup() { void loop() { // read any existing Serial data while (Serial.read() >= 0) {} - + // pstr stores strings in flash to save RAM cout << pstr("\ntype any character to start\n"); - while (Serial.read() < 0) {} - + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem + uint32_t t = millis(); // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with // breadboards. use SPI_FULL_SPEED for better performance. @@ -145,6 +165,12 @@ void loop() { return; } t = millis() - t; + + cardSize = card.cardSize(); + if (cardSize == 0) { + sdErrorMsg("cardSize failed"); + return; + } cout << pstr("\ninit time: ") << t << " ms" << endl; cout << pstr("\nCard type: "); switch (card.type()) { @@ -157,7 +183,11 @@ void loop() { break; case SD_CARD_TYPE_SDHC: - cout << pstr("SDHC\n"); + if (cardSize < 70000000) { + cout << pstr("SDHC\n"); + } else { + cout << pstr("SDXC\n"); + } break; default: @@ -165,10 +195,16 @@ void loop() { } if (!cidDmp()) return; if (!csdDmp()) return; + uint32_t ocr; + if (!card.readOCR(&ocr)) { + sdErrorMsg("\nreadOCR failed"); + return; + } + cout << pstr("OCR: ") << hex << ocr << dec << endl; if (!partDmp()) return; if (!vol.init(&card)) { sdErrorMsg("\nvol.init failed"); return; } volDmp(); -} +} \ No newline at end of file diff --git a/libs/SdFat-master/SdFat/examples/StdioBench/StdioBench.ino b/libs/SdFat-master/SdFat/examples/StdioBench/StdioBench.ino new file mode 100755 index 0000000..907691e --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/StdioBench/StdioBench.ino @@ -0,0 +1,200 @@ +// Benchmark comparing SdFile and StdioStream. +#include + +// Define PRINT_FIELD nonzero to use printField. +#define PRINT_FIELD 0 + +// Number of lines to list on Serial. +#define STDIO_LIST_COUNT 0 +#define VERIFY_CONTENT 0 + +const uint8_t SD_CS_PIN = SS; +SdFat sd; + +SdFile printFile; +StdioStream stdioFile; + +float f[100]; +char buf[20]; +char* label[] = + {"uint8_t 0 to 255, 100 times ", "uint16_t 0 to 20000", + "uint32_t 0 to 20000", "uint32_t 1000000000 to 1000010000", + "float nnn.ffff, 10000 times"}; +//------------------------------------------------------------------------------ +void setup() { + uint32_t m; + uint32_t printSize; + uint32_t stdioSize; + uint32_t printTime; + uint32_t stdioTime; + + Serial.begin(9600); + Serial.println(F("Type any character to start")); + while (!Serial.available()); + Serial.println(F("Starting test")); + if (!sd.begin(SD_CS_PIN)) sd.errorHalt(); + + for (uint8_t i = 0; i < 100; i++) { + f[i] = 123.0 + 0.12345*i; + } + + for (uint8_t dataType = 0; dataType < 5; dataType++) { + for (uint8_t fileType = 0; fileType < 2; fileType++) { + if (!fileType) { + if (!printFile.open("PRRINT.TXT", O_CREAT | O_RDWR | O_TRUNC)) { + Serial.println("open fail"); + return; + } + printTime = millis(); + switch (dataType) { + case 0: + for (uint16_t i =0; i < 100; i++) { + for (uint8_t j = 0; j < 255; j++) { + printFile.println(j); + } + } + break; + case 1: + for (uint16_t i = 0; i < 20000; i++) { + printFile.println(i); + } + break; + + case 2: + for (uint32_t i = 0; i < 20000; i++) { + printFile.println(i); + } + break; + + case 3: + for (uint16_t i = 0; i < 10000; i++) { + printFile.println(i + 1000000000UL); + } + break; + + case 4: + for (int j = 0; j < 100; j++) { + for (uint8_t i = 0; i < 100; i++) { + printFile.println(f[i], 4); + } + } + break; + default: + break; + } + printFile.sync(); + printTime = millis() - printTime; + printFile.rewind(); + printSize = printFile.fileSize(); + + } else { + if (!stdioFile.fopen("STREAM.TXT", "w+")) { + Serial.println("fopen fail"); + return; + } + stdioTime = millis(); + + switch (dataType) { + case 0: + for (uint16_t i =0; i < 100; i++) { + for (uint8_t j = 0; j < 255; j++) { + #if PRINT_FIELD + stdioFile.printField(j, '\n'); + #else // PRINT_FIELD + stdioFile.println(j); + #endif // PRINT_FIELD + } + } + break; + case 1: + for (uint16_t i = 0; i < 20000; i++) { + #if PRINT_FIELD + stdioFile.printField(i, '\n'); + #else // PRINT_FIELD + stdioFile.println(i); + #endif // PRINT_FIELD + } + break; + + case 2: + for (uint32_t i = 0; i < 20000; i++) { + #if PRINT_FIELD + stdioFile.printField(i, '\n'); + #else // PRINT_FIELD + stdioFile.println(i); + #endif // PRINT_FIELD + } + break; + + case 3: + for (uint16_t i = 0; i < 10000; i++) { + #if PRINT_FIELD + stdioFile.printField(i + 1000000000UL, '\n'); + #else // PRINT_FIELD + stdioFile.println(i + 1000000000UL); + #endif // PRINT_FIELD + } + break; + + case 4: + for (int j = 0; j < 100; j++) { + for (uint8_t i = 0; i < 100; i++) { + #if PRINT_FIELD + stdioFile.printField(f[i], '\n', 4); + #else // PRINT_FIELD + stdioFile.println(f[i], 4); + #endif // PRINT_FIELD + } + } + break; + default: + break; + } + stdioFile.fflush(); + stdioTime = millis() - stdioTime; + stdioSize = stdioFile.ftell(); + if (STDIO_LIST_COUNT) { + size_t len; + stdioFile.rewind(); + for (int i = 0; i < STDIO_LIST_COUNT; i++) { + stdioFile.fgets(buf, sizeof(buf), &len); + Serial.print(len);Serial.print(','); + Serial.print(buf); + } + } + + } + + } + Serial.println(label[dataType]); + if (VERIFY_CONTENT && printSize == stdioSize) { + printFile.rewind(); + stdioFile.rewind(); + for (uint32_t i = 0; i < stdioSize; i++) { + if (printFile.read() != stdioFile.getc()) { + Serial.print(F("Files differ at pos: ")); + Serial.println(i); + return; + } + } + } + + Serial.print("fileSize: "); + if (printSize != stdioSize) { + Serial.print(printSize); + Serial.print(" != "); + } + Serial.println(stdioSize); + Serial.print("print millis: "); + Serial.println(printTime); + Serial.print("stdio millis: "); + Serial.println(stdioTime); + Serial.print("ratio: "); + Serial.println((float)printTime/(float)stdioTime); + Serial.println(); + printFile.close(); + stdioFile.fclose(); + } + Serial.println("Done"); +} +void loop() {} \ No newline at end of file diff --git a/libs/SdFat-master/SdFat/examples/StreamParseInt/StreamParseInt.ino b/libs/SdFat-master/SdFat/examples/StreamParseInt/StreamParseInt.ino new file mode 100755 index 0000000..e09777f --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/StreamParseInt/StreamParseInt.ino @@ -0,0 +1,34 @@ +// Simple demo of the Stream parsInt() member function. +#include + +// SD card chip select pin - Modify the value of csPin for your SD module. +const uint8_t csPin = 10; + +SdFat SD; +File file; +//------------------------------------------------------------------------------ +void setup() { + Serial.begin(9600); + + // Initialize the SD. + if (!SD.begin(csPin)) { + Serial.println(F("begin error")); + return; + } + // Create and open the file. Use flag to truncate an existing file. + if (!file.open("stream.txt", O_RDWR|O_CREAT|O_TRUNC)) { + Serial.println(F("open error")); + return; + } + // Write a test number to the file. + file.println("12345"); + + // Rewind the file and read the number with parseInt(). + file.rewind(); + int i = file.parseInt(); + Serial.print(F("parseInt: ")); + Serial.println(i); + file.close(); +} + +void loop() {} diff --git a/libs/SdFat-master/SdFat/examples/StressTest/StressTest.ino b/libs/SdFat-master/SdFat/examples/StressTest/StressTest.ino new file mode 100755 index 0000000..20d102f --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/StressTest/StressTest.ino @@ -0,0 +1,75 @@ +// This stress test will create and write files until the SD is full. +#include + +// SD chip select pin. +const uint8_t SD_CS_PIN = SS; + +// Set write buffer size. +#ifdef __arm__ +#ifndef CORE_TEENSY +// Due +const size_t BUF_SIZE = 32768; +#else // CORE_TEENSY +// Teensy 3.0 +const size_t BUF_SIZE = 8192; +#endif // CORE_TEENSY +#elif defined(RAMEND) && RAMEND > 5000 +// AVR with more than 4 KB RAM +const size_t BUF_SIZE = 4096; +#else // __arm__ +// other +const size_t BUF_SIZE = 512; +#endif // __arm__ + +const size_t FILE_SIZE_KB = 10240; +const uint16_t BUFS_PER_FILE = (1024L*FILE_SIZE_KB/BUF_SIZE); + +SdFat sd; + +SdFile file; + +uint8_t buf[BUF_SIZE]; +char name[13]; +//------------------------------------------------------------------------------ +void setup() { + Serial.begin(9600); + Serial.print("BUF_SIZE "); + Serial.println(BUF_SIZE); + Serial.println("Type any character to start"); + while (Serial.read() < 0) {} + + if (!sd.begin(SD_CS_PIN))sd.errorHalt("sd.begin"); + + // Fill buf with known value. + for (size_t i = 0; i < BUF_SIZE; i++) buf[i] = i; + + // Wait to begin. + do {delay(10);} while (Serial.read() >= 0); + Serial.println("Type any character to stop after next file"); +} +//------------------------------------------------------------------------------ +void loop() { + // Free KB on SD. + uint32_t freeKB = sd.vol()->freeClusterCount()*sd.vol()->blocksPerCluster()/2; + + Serial.print("Free KB: "); + Serial.println(freeKB); + if (freeKB < 2*FILE_SIZE_KB) { + Serial.println(" Done!"); + while(1); + } + sprintf(name, "%lu.DAT", freeKB); + if (!file.open(name, O_WRITE | O_CREAT | O_TRUNC)) { + sd.errorHalt("Open error!"); + } + for (uint16_t i = 0; i < BUFS_PER_FILE; i++) { + if (file.write(buf, BUF_SIZE) != BUF_SIZE) { + sd.errorHalt("Write error!"); + } + } + file.close(); + if (Serial.available()) { + Serial.println("Stopped!"); + while(1); + } +} \ No newline at end of file diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatTimestamp/SdFatTimestamp.pde b/libs/SdFat-master/SdFat/examples/Timestamp/Timestamp.ino similarity index 72% rename from libs/SdFatBeta20120108/extra/examplesV1/SdFatTimestamp/SdFatTimestamp.pde rename to libs/SdFat-master/SdFat/examples/Timestamp/Timestamp.ino index 94b845a..32b870d 100755 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatTimestamp/SdFatTimestamp.pde +++ b/libs/SdFat-master/SdFat/examples/Timestamp/Timestamp.ino @@ -3,12 +3,25 @@ * and the timestamp() function. */ #include -#include // use PgmPrint + +SdFat sd; + +SdFile file; + +// Default SD chip select is SS pin +const uint8_t chipSelect = SS; + +// create Serial stream +ArduinoOutStream cout(Serial); +//------------------------------------------------------------------------------ +// store error strings in flash to save RAM +#define error(s) sd.errorHalt_P(PSTR(s)) +//------------------------------------------------------------------------------ /* * date/time values for debug * normally supplied by a real-time clock or GPS */ -// date 2009-10-01 1-Oct-09 +// date 1-Oct-09 uint16_t year = 2009; uint8_t month = 10; uint8_t day = 1; @@ -16,7 +29,8 @@ uint8_t day = 1; // time 20:30:40 uint8_t hour = 20; uint8_t minute = 30; -uint8_t second = 40; +uint8_t second = 40; +//------------------------------------------------------------------------------ /* * User provided date time callback function. * See SdFile::dateTimeCallback() for usage. @@ -24,68 +38,62 @@ uint8_t second = 40; void dateTime(uint16_t* date, uint16_t* time) { // User gets date and time from GPS or real-time // clock in real callback function - + // return date using FAT_DATE macro to format fields *date = FAT_DATE(year, month, day); - + // return time using FAT_TIME macro to format fields *time = FAT_TIME(hour, minute, second); } - -SdFat sd; - -SdFile file; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) - +//------------------------------------------------------------------------------ /* * Function to print all timestamps. */ void printTimestamps(SdFile& f) { dir_t d; if (!f.dirEntry(&d)) error("f.dirEntry failed"); - - PgmPrint("Creation: "); + + cout << pstr("Creation: "); f.printFatDate(d.creationDate); - Serial.write(' '); + cout << ' '; f.printFatTime(d.creationTime); - Serial.println(); - - PgmPrint("Modify: "); + cout << endl; + + cout << pstr("Modify: "); f.printFatDate(d.lastWriteDate); - Serial.write(' '); + cout <<' '; f.printFatTime(d.lastWriteTime); - Serial.println(); - - PgmPrint("Access: "); + cout << endl; + + cout << pstr("Access: "); f.printFatDate(d.lastAccessDate); - Serial.println(); + cout << endl; } - +//------------------------------------------------------------------------------ void setup(void) { Serial.begin(9600); - Serial.println(); - PgmPrintln("Type any character to start"); + while (!Serial) {} // wait for Leonardo + + cout << pstr("Type any character to start\n"); while (!Serial.available()); + delay(400); // catch Due reset problem // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); + // remove files if they exist sd.remove("CALLBACK.TXT"); sd.remove("DEFAULT.TXT"); sd.remove("STAMP.TXT"); - + // create a new file with default timestamps if (!file.open("DEFAULT.TXT", O_CREAT | O_WRITE)) { error("open DEFAULT.TXT failed"); } - Serial.println(); - PgmPrintln("Open with default times"); + cout << pstr("\nOpen with default times\n"); printTimestamps(file); - + // close file file.close(); /* @@ -101,31 +109,29 @@ void setup(void) { */ // set date time callback function SdFile::dateTimeCallback(dateTime); - + // create a new file with callback timestamps if (!file.open("CALLBACK.TXT", O_CREAT | O_WRITE)) { error("open CALLBACK.TXT failed"); - } - Serial.println(); - PgmPrintln("Open with callback times"); + } + cout << ("\nOpen with callback times\n"); printTimestamps(file); - + // change call back date day += 1; - + // must add two to see change since FAT second field is 5-bits - second += 2; - + second += 2; + // modify file by writing a byte file.write('t'); - + // force dir update file.sync(); - - Serial.println(); - PgmPrintln("Times after write"); + + cout << pstr("\nTimes after write\n"); printTimestamps(file); - + // close file file.close(); /* @@ -135,7 +141,7 @@ void setup(void) { * change access/modify timestamp */ SdFile::dateTimeCallbackCancel(); - + // create a new file with default timestamps if (!file.open("STAMP.TXT", O_CREAT | O_WRITE)) { error("open STAMP.TXT failed"); @@ -152,13 +158,11 @@ void setup(void) { if (!file.timestamp(T_ACCESS, 2009, 11, 12, 7, 8, 9)) { error("set access time failed"); } - Serial.println(); - PgmPrintln("Times after timestamp() calls"); + cout << pstr("\nTimes after timestamp() calls\n"); printTimestamps(file); - + file.close(); - Serial.println(); - PgmPrintln("Done"); + cout << pstr("\nDone\n"); } -void loop(void){} +void loop(void){} \ No newline at end of file diff --git a/libs/SdFatBeta20120108/SdFat/examples/TwoCards/TwoCards.pde b/libs/SdFat-master/SdFat/examples/TwoCards/TwoCards.ino similarity index 95% rename from libs/SdFatBeta20120108/SdFat/examples/TwoCards/TwoCards.pde rename to libs/SdFat-master/SdFat/examples/TwoCards/TwoCards.ino index 720ee89..9065e1f 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/TwoCards/TwoCards.pde +++ b/libs/SdFat-master/SdFat/examples/TwoCards/TwoCards.ino @@ -26,21 +26,24 @@ const uint16_t NWRITE = FILE_SIZE/BUF_DIM; //------------------------------------------------------------------------------ void setup() { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo PgmPrint("FreeRam: "); + Serial.println(FreeRam()); // fill buffer with known data for (int i = 0; i < sizeof(buf); i++) buf[i] = i; PgmPrintln("type any character to start"); - while (Serial.read() < 0) {} + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem // disable sd2 while initializing sd1 pinMode(SD2_CS, OUTPUT); digitalWrite(SD2_CS, HIGH); // initialize the first card - if (!sd1.init(SPI_FULL_SPEED, SD1_CS)) { + if (!sd1.begin(SD1_CS)) { sd1.initError("sd1:"); } // create DIR1 on sd1 if it does not exist @@ -48,7 +51,7 @@ void setup() { if (!sd1.mkdir("/DIR1")) sd1.errorExit("sd1.mkdir"); } // initialize the second card - if (!sd2.init(SPI_FULL_SPEED, SD2_CS)) { + if (!sd2.begin(SD2_CS)) { sd2.initError("sd2:"); } // create DIR2 on sd2 if it does not exist diff --git a/libs/SdFat-master/SdFat/examples/bench/bench.ino b/libs/SdFat-master/SdFat/examples/bench/bench.ino new file mode 100755 index 0000000..a357730 --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/bench/bench.ino @@ -0,0 +1,173 @@ +/* + * This sketch is a simple binary write/read benchmark. + */ +#include +#include + +// SD chip select pin +const uint8_t chipSelect = SS; + +// Size of read/write. +const size_t BUF_SIZE = 512; + +// File size in MB where MB = 1,000,000 bytes. +const uint32_t FILE_SIZE_MB = 5; + +// Write pass count. +const uint8_t WRITE_COUNT = 10; + +// Read pass count. +const uint8_t READ_COUNT = 5; +//============================================================================== +// End of configuration constants. +//------------------------------------------------------------------------------ +// File size in bytes. +const uint32_t FILE_SIZE = 1000000UL*FILE_SIZE_MB; + +uint8_t buf[BUF_SIZE]; + +// file system +SdFat sd; + +// test file +SdFile file; + +// Serial output stream +ArduinoOutStream cout(Serial); +//------------------------------------------------------------------------------ +// store error strings in flash to save RAM +#define error(s) sd.errorHalt_P(PSTR(s)) +//------------------------------------------------------------------------------ +void cidDmp() { + cid_t cid; + if (!sd.card()->readCID(&cid)) { + error("readCID failed"); + } + cout << pstr("\nManufacturer ID: "); + cout << hex << int(cid.mid) << dec << endl; + cout << pstr("OEM ID: ") << cid.oid[0] << cid.oid[1] << endl; + cout << pstr("Product: "); + for (uint8_t i = 0; i < 5; i++) { + cout << cid.pnm[i]; + } + cout << pstr("\nVersion: "); + cout << int(cid.prv_n) << '.' << int(cid.prv_m) << endl; + cout << pstr("Serial number: ") << hex << cid.psn << dec << endl; + cout << pstr("Manufacturing date: "); + cout << int(cid.mdt_month) << '/'; + cout << (2000 + cid.mdt_year_low + 10 * cid.mdt_year_high) << endl; + cout << endl; +} +//------------------------------------------------------------------------------ +void setup() { + Serial.begin(9600); + while (!Serial){} // wait for Leonardo + cout << pstr("\nUse a freshly formatted SD for best performance.\n"); + + // use uppercase in hex and use 0X base prefix + cout << uppercase << showbase << endl; +} +//------------------------------------------------------------------------------ +void loop() { + float s; + uint32_t t; + uint32_t maxLatency; + uint32_t minLatency; + uint32_t totalLatency; + + // discard any input + while (Serial.read() >= 0) {} + + // pstr stores strings in flash to save RAM + cout << pstr("Type any character to start\n"); + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem + + cout << pstr("Free RAM: ") << FreeRam() << endl; + + // initialize the SD card at SPI_FULL_SPEED for best performance. + // try SPI_HALF_SPEED if bus errors occur. + if (!sd.begin(chipSelect, SPI_FULL_SPEED)) sd.initErrorHalt(); + + cout << pstr("Type is FAT") << int(sd.vol()->fatType()) << endl; + cout << pstr("Card size: ") << sd.card()->cardSize()*512E-9; + cout << pstr(" GB (GB = 1E9 bytes)") << endl; + + cidDmp(); + + // open or create file - truncate existing file. + if (!file.open("BENCH.DAT", O_CREAT | O_TRUNC | O_RDWR)) { + error("open failed"); + } + + // fill buf with known data + for (uint16_t i = 0; i < (BUF_SIZE-2); i++) { + buf[i] = 'A' + (i % 26); + } + buf[BUF_SIZE-2] = '\r'; + buf[BUF_SIZE-1] = '\n'; + + cout << pstr("File size ") << FILE_SIZE_MB << pstr(" MB\n"); + cout << pstr("Buffer size ") << BUF_SIZE << pstr(" bytes\n"); + cout << pstr("Starting write test, please wait.") << endl << endl; + + // do write test + uint32_t n = FILE_SIZE/sizeof(buf); + cout < m) minLatency = m; + totalLatency += m; + } + file.sync(); + t = millis() - t; + s = file.fileSize(); + cout << s/t <<',' << maxLatency << ',' << minLatency; + cout << ',' << totalLatency/n << endl; + } + + cout << endl << pstr("Starting read test, please wait.") << endl; + cout << endl < m) minLatency = m; + totalLatency += m; + if (buf[BUF_SIZE-1] != '\n') { + error("data check"); + } + } + t = millis() - t; + cout << s/t <<',' << maxLatency << ',' << minLatency; + cout << ',' << totalLatency/n << endl; + } + cout << endl << pstr("Done") << endl; + file.close(); +} \ No newline at end of file diff --git a/libs/SdFatBeta20120108/SdFat/examples/cin_cout/cin_cout.pde b/libs/SdFat-master/SdFat/examples/cin_cout/cin_cout.ino similarity index 77% rename from libs/SdFatBeta20120108/SdFat/examples/cin_cout/cin_cout.pde rename to libs/SdFat-master/SdFat/examples/cin_cout/cin_cout.ino index 827f9cb..ef2ea2b 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/cin_cout/cin_cout.pde +++ b/libs/SdFat-master/SdFat/examples/cin_cout/cin_cout.ino @@ -6,7 +6,7 @@ // create serial output stream ArduinoOutStream cout(Serial); -// input buffer for line +// input line buffer char cinBuf[40]; // create serial input stream @@ -14,20 +14,21 @@ ArduinoInStream cin(Serial, cinBuf, sizeof(cinBuf)); //------------------------------------------------------------------------------ void setup() { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo } //------------------------------------------------------------------------------ void loop() { int32_t n; - cout << "enter an integer\n"; + cout << "\nenter an integer\n"; cin.readline(); if (cin >> n) { - cout << "The number is: " << n << endl; + cout << "The number is: " << n; } else { // will fail if no digits or not in range [-2147483648, 2147483647] - cout << "Invalid input: " << cinBuf << endl; + cout << "Invalid input: " << cinBuf; } cout << endl; } diff --git a/libs/SdFat-master/SdFat/examples/dataLogger/dataLogger.ino b/libs/SdFat-master/SdFat/examples/dataLogger/dataLogger.ino new file mode 100755 index 0000000..19e81aa --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/dataLogger/dataLogger.ino @@ -0,0 +1,138 @@ +/* + * Simple data logger. + */ +#include + +// SD chip select pin. Be sure to disable any other SPI devices such as Enet. +const uint8_t chipSelect = SS; + +// Interval between data records in milliseconds. +// The interval must be greater than the maximum SD write latency plus the +// time to acquire and write data to the SD to avoid overrun errors. +// Run the bench example to check the quality of your SD card. +const uint32_t SAMPLE_INTERVAL_MS = 200; + +// Log file base name. Must be six characters or less. +#define FILE_BASE_NAME "DATA" +//------------------------------------------------------------------------------ +// File system object. +SdFat sd; + +// Log file. +SdFile file; + +// Time in micros for next data record. +uint32_t logTime; + +//============================================================================== +// User functions. Edit writeHeader() and logData() for your requirements. + +const uint8_t ANALOG_COUNT = 4; +//------------------------------------------------------------------------------ +// Write data header. +void writeHeader() { + file.print(F("micros")); + for (uint8_t i = 0; i < ANALOG_COUNT; i++) { + file.print(F(",adc")); + file.print(i, DEC); + } + file.println(); +} +//------------------------------------------------------------------------------ +// Log a data record. +void logData() { + uint16_t data[ANALOG_COUNT]; + + // Read all channels to avoid SD write latency between readings. + for (uint8_t i = 0; i < ANALOG_COUNT; i++) { + data[i] = analogRead(i); + } + // Write data to file. Start with log time in micros. + file.print(logTime); + + // Write ADC data to CSV record. + for (uint8_t i = 0; i < ANALOG_COUNT; i++) { + file.write(','); + file.print(data[i]); + } + file.println(); +} +//============================================================================== +// Error messages stored in flash. +#define error(msg) error_P(PSTR(msg)) +//------------------------------------------------------------------------------ +void error_P(const char* msg) { + sd.errorHalt_P(msg); +} +//------------------------------------------------------------------------------ +void setup() { + const uint8_t BASE_NAME_SIZE = sizeof(FILE_BASE_NAME) - 1; + char fileName[13] = FILE_BASE_NAME "00.CSV"; + + Serial.begin(9600); + while (!Serial) {} // wait for Leonardo + delay(1000); + + Serial.println(F("Type any character to start")); + while (!Serial.available()) {} + + // Initialize the SD card at SPI_HALF_SPEED to avoid bus errors with + // breadboards. use SPI_FULL_SPEED for better performance. + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); + + // Find an unused file name. + if (BASE_NAME_SIZE > 6) { + error("FILE_BASE_NAME too long"); + } + while (sd.exists(fileName)) { + if (fileName[BASE_NAME_SIZE + 1] != '9') { + fileName[BASE_NAME_SIZE + 1]++; + } else if (fileName[BASE_NAME_SIZE] != '9') { + fileName[BASE_NAME_SIZE + 1] = '0'; + fileName[BASE_NAME_SIZE]++; + } else { + error("Can't create file name"); + } + } + if (!file.open(fileName, O_CREAT | O_WRITE | O_EXCL)) error("file.open"); + do { + delay(10); + } while (Serial.read() >= 0); + + Serial.print(F("Logging to: ")); + Serial.println(fileName); + Serial.println(F("Type any character to stop")); + + // Write data header. + writeHeader(); + + // Start on a multiple of the sample interval. + logTime = micros()/(1000UL*SAMPLE_INTERVAL_MS) + 1; + logTime *= 1000UL*SAMPLE_INTERVAL_MS; +} +//------------------------------------------------------------------------------ +void loop() { + // Time for next record. + logTime += 1000UL*SAMPLE_INTERVAL_MS; + + // Wait for log time. + int32_t diff; + do { + diff = micros() - logTime; + } while (diff < 0); + + // Check for data rate too high. + if (diff > 10) error("Missed data record"); + + logData(); + + // Force data to SD and update the directory entry to avoid data loss. + if (!file.sync() || file.getWriteError()) error("write error"); + + if (Serial.available()) { + // Close file and stop. + file.close(); + Serial.println(F("Done")); + while(1) {} + } +} \ No newline at end of file diff --git a/libs/SdFat-master/SdFat/examples/directoryFunctions/directoryFunctions.ino b/libs/SdFat-master/SdFat/examples/directoryFunctions/directoryFunctions.ino new file mode 100755 index 0000000..f69e084 --- /dev/null +++ b/libs/SdFat-master/SdFat/examples/directoryFunctions/directoryFunctions.ino @@ -0,0 +1,108 @@ +/* + * Example use of chdir(), ls(), mkdir(), and rmdir(). + */ +#include +// SD card chip select pin. +const uint8_t SD_CHIP_SELECT = SS; +//------------------------------------------------------------------------------ +// Permit SD to be wiped if ALLOW_WIPE is true. +const bool ALLOW_WIPE = false; + +// File system object. +SdFat sd; + +// Use for file creation in folders. +SdFile file; + +// Create a Serial output stream. +ArduinoOutStream cout(Serial); + +// Buffer for Serial input. +char cinBuf[40]; + +// Create a serial input stream. +ArduinoInStream cin(Serial, cinBuf, sizeof(cinBuf)); +//============================================================================== +// Error messages stored in flash. +#define error(msg) error_P(PSTR(msg)) +//------------------------------------------------------------------------------ +void error_P(const char* msg) { + sd.errorHalt_P(msg); +} +//------------------------------------------------------------------------------ +void setup() { + Serial.begin(9600); + while (!Serial) {} // wait for Leonardo + delay(1000); + + cout << pstr("Type any character to start\n"); + // Wait for input line and discard. + cin.readline(); + + // Initialize the SD card at SPI_HALF_SPEED to avoid bus errors with + // breadboards. use SPI_FULL_SPEED for better performance. + if (!sd.begin(SD_CHIP_SELECT, SPI_HALF_SPEED)) sd.initErrorHalt(); + + // Check for empty SD. + if (file.openNext(sd.vwd(), O_READ)) { + cout << pstr("Found files/folders in the root directory.\n"); + if (!ALLOW_WIPE) { + error("SD not empty, use a blank SD or set ALLOW_WIPE true."); + } else { + cout << pstr("Type: 'WIPE' to delete all SD files.\n"); + char buf[10]; + cin.readline(); + cin.get(buf, sizeof(buf)); + if (cin.fail() || strncmp(buf, "WIPE", 4) || buf[4] >= ' ') { + error("Invalid WIPE input"); + } + file.close(); + sd.vwd()->rmRfStar(); + cout << pstr("***SD wiped clean.***\n\n"); + } + } + + // Create a new folder. + if (!sd.mkdir("FOLDER1")) error("Create FOLDER1 failed"); + cout << pstr("Created FOLDER1\n"); + + // Create a file in FOLDER1 using a path. + if (!file.open("FOLDER1/FILE1.TXT", O_CREAT | O_WRITE)) { + error("create FOLDER1/FILE1.TXT failed"); + } + file.close(); + cout << pstr("Created FOLDER1/FILE1.TXT\n"); + + // Change volume working directory to FOLDER1. + if (!sd.chdir("FOLDER1")) error("chdir failed for FOLDER1.\n"); + cout << pstr("chdir to FOLDER1\n"); + + // Create FILE2.TXT in current directory. + if (!file.open("FILE2.TXT", O_CREAT | O_WRITE)) { + error("create FILE2.TXT failed"); + } + file.close(); + cout << pstr("Created FILE2.TXT in current directory\n"); + + cout << pstr("List of files on the SD.\n"); + sd.ls("/", LS_R); + + // Remove files from current directory. + if (!sd.remove("FILE1.TXT") || !sd.remove("FILE2.TXT")) error("remove failed"); + cout << pstr("\nFILE1.TXT and FILE2.TXT removed.\n"); + + // Change current directory to root. + if (!sd.chdir()) error("chdir to root failed.\n"); + + cout << pstr("List of files on the SD.\n"); + sd.ls(LS_R); + + // Remove FOLDER1. + if (!sd.rmdir("FOLDER1")) error("rmdir for FOLDER1 failed\n"); + + cout << pstr("\nFOLDER1 removed, SD empty.\n"); + cout << pstr("Done!\n"); +} +//------------------------------------------------------------------------------ +// Nothing happens in loop. +void loop() {} \ No newline at end of file diff --git a/libs/SdFatBeta20120108/SdFat/examples/fgets/fgets.pde b/libs/SdFat-master/SdFat/examples/fgets/fgets.ino similarity index 80% rename from libs/SdFatBeta20120108/SdFat/examples/fgets/fgets.pde rename to libs/SdFat-master/SdFat/examples/fgets/fgets.ino index fef627e..c7b909f 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/fgets/fgets.pde +++ b/libs/SdFat-master/SdFat/examples/fgets/fgets.ino @@ -1,5 +1,9 @@ // Demo of fgets function to read lines from a file. #include + +// SD chip select pin +const uint8_t chipSelect = SS; + SdFat sd; // print stream ArduinoOutStream cout(Serial); @@ -46,16 +50,20 @@ void makeTestFile() { "\n" // empty line "Line at EOF without NL" )); - // wrfile is closed when it goes out of scope + wrfile.close(); } //------------------------------------------------------------------------------ void setup(void) { Serial.begin(9600); + while (!Serial) {} // Wait for Leonardo + cout << pstr("Type any character to start\n"); - while (Serial.read() < 0) {} + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem - // initialize the file system - if (!sd.init()) sd.initErrorHalt(); + // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with + // breadboards. use SPI_FULL_SPEED for better performance. + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); makeTestFile(); diff --git a/libs/SdFatBeta20120108/SdFat/examples/formatting/formatting.pde b/libs/SdFat-master/SdFat/examples/formatting/formatting.ino similarity index 96% rename from libs/SdFatBeta20120108/SdFat/examples/formatting/formatting.pde rename to libs/SdFat-master/SdFat/examples/formatting/formatting.ino index 873802d..f42aa87 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/formatting/formatting.pde +++ b/libs/SdFat-master/SdFat/examples/formatting/formatting.ino @@ -38,7 +38,10 @@ void showDate(int m, int d, int y) { //------------------------------------------------------------------------------ void setup(void) { Serial.begin(9600); - + + while (!Serial) {} // wait for Leonardo + delay(2000); + cout << endl << "default formatting" << endl; example(); diff --git a/libs/SdFatBeta20120108/SdFat/examples/getline/getline.pde b/libs/SdFat-master/SdFat/examples/getline/getline.ino similarity index 88% rename from libs/SdFatBeta20120108/SdFat/examples/getline/getline.pde rename to libs/SdFat-master/SdFat/examples/getline/getline.ino index 42934da..60cb762 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/getline/getline.pde +++ b/libs/SdFat-master/SdFat/examples/getline/getline.ino @@ -9,7 +9,7 @@ #include // SD chip select pin -const uint8_t chipSelect = SS_PIN; +const uint8_t chipSelect = SS; // file system object SdFat sd; @@ -26,6 +26,8 @@ void makeTestFile() { "17 character line\n" "too long for buffer\n" "line with no nl"); + + sdout.close(); } //------------------------------------------------------------------------------ void testGetline() { @@ -51,20 +53,23 @@ void testGetline() { //------------------------------------------------------------------------------ void setup(void) { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo // pstr stores strings in flash to save RAM cout << pstr("Type any character to start\n"); - while (Serial.read() < 0) {} + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED, chipSelect)) sd.initErrorHalt(); + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); // make the test file makeTestFile(); // run the example testGetline(); + cout << "\nDone!\n"; } //------------------------------------------------------------------------------ void loop(void) {} diff --git a/libs/SdFatBeta20120108/SdFat/examples/readCSV/readCSV.pde b/libs/SdFat-master/SdFat/examples/readCSV/readCSV.ino similarity index 61% rename from libs/SdFatBeta20120108/SdFat/examples/readCSV/readCSV.pde rename to libs/SdFat-master/SdFat/examples/readCSV/readCSV.ino index b4d228d..5963448 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/readCSV/readCSV.pde +++ b/libs/SdFat-master/SdFat/examples/readCSV/readCSV.ino @@ -5,7 +5,7 @@ #include // SD chip select pin -const uint8_t chipSelect = SS_PIN; +const uint8_t chipSelect = SS; // file system object SdFat sd; @@ -13,7 +13,7 @@ SdFat sd; // create Serial stream ArduinoOutStream cout(Serial); -char fileName[] = "3V_FILE.CSV"; +char fileName[] = "TESTFILE.CSV"; //------------------------------------------------------------------------------ // store error strings in flash to save RAM #define error(s) sd.errorHalt_P(PSTR(s)) @@ -22,7 +22,8 @@ char fileName[] = "3V_FILE.CSV"; void readFile() { long lg; float f1, f2; - char c1, c2; + char text[10]; + char c1, c2, c3; // space for commas. // open input file ifstream sdin(fileName); @@ -31,13 +32,26 @@ void readFile() { if (!sdin.is_open()) error("open"); // read until input fails - while (sdin >> lg >> c1 >> f1 >> c2 >> f2) { + while (1) { + // Get text field. + sdin.get(text, sizeof(text), ','); + + // Assume EOF if fail. + if (sdin.fail()) break; + + // Get commas and numbers. + sdin >> c1 >> lg >> c2 >> f1 >> c3 >> f2; + + // Skip CR/LF. + sdin.skipWhite(); + + if (sdin.fail()) error("bad input"); // error in line if not commas - if (c1 != ',' || c2 != ',') error("comma"); + if (c1 != ',' || c2 != ',' || c3 != ',') error("comma"); // print in six character wide columns - cout << setw(6) << lg << setw(6) << f1 << setw(6) << f2 << endl; + cout << text << setw(6) << lg << setw(6) << f1 << setw(6) << f2 << endl; } // Error in an input line if file is not at EOF. if (!sdin.eof()) error("readFile"); @@ -51,30 +65,36 @@ void writeFile() { // write file from string stored in flash sdout << pstr( - "1,2.3,4.5\n" - "6,7.8,9.0\n" - "9,8.7,6.5\n" - "-4,-3.2,-1\n") << flush; + "Line 1,1,2.3,4.5\n" + "Line 2,6,7.8,9.0\n" + "Line 3,9,8.7,6.5\n" + "Line 4,-4,-3.2,-1\n") << flush; // check for any errors if (!sdout) error("writeFile"); - // file is closed by destructor when it goes out of scope. + sdout.close(); } //------------------------------------------------------------------------------ void setup() { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo + cout << pstr("Type any character to start\n"); + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with // breadboards. use SPI_FULL_SPEED for better performance - if (!sd.init(SPI_HALF_SPEED, chipSelect)) sd.initErrorHalt(); + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); // create test file writeFile(); + cout << endl; + // read and print test readFile(); - cout << "Done" << endl; + cout << "\nDone!" << endl; } -void loop() {} +void loop() {} \ No newline at end of file diff --git a/libs/SdFatBeta20120108/SdFat/examples/rename/rename.pde b/libs/SdFat-master/SdFat/examples/rename/rename.ino similarity index 90% rename from libs/SdFatBeta20120108/SdFat/examples/rename/rename.pde rename to libs/SdFat-master/SdFat/examples/rename/rename.ino index 453b6ca..9394569 100755 --- a/libs/SdFatBeta20120108/SdFat/examples/rename/rename.pde +++ b/libs/SdFat-master/SdFat/examples/rename/rename.ino @@ -5,7 +5,7 @@ #include // SD chip select pin -const uint8_t chipSelect = SS_PIN; +const uint8_t chipSelect = SS; // file system SdFat sd; @@ -18,12 +18,15 @@ ArduinoOutStream cout(Serial); //------------------------------------------------------------------------------ void setup() { Serial.begin(9600); + while (!Serial) {} // wait for Leonardo + cout << pstr("Insert an empty SD. Type any character to start.") << endl; - while (Serial.read() < 0) {} + while (Serial.read() <= 0) {} + delay(400); // catch Due reset problem // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED, chipSelect)) sd.initErrorHalt(); + if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); // create a file and write one line to the file SdFile file("NAME1.TXT", O_WRITE | O_CREAT); diff --git a/libs/SdFatBeta20120108/SdFat/ios.h b/libs/SdFat-master/SdFat/ios.h similarity index 89% rename from libs/SdFatBeta20120108/SdFat/ios.h rename to libs/SdFat-master/SdFat/ios.h index 7c5566c..800939e 100755 --- a/libs/SdFatBeta20120108/SdFat/ios.h +++ b/libs/SdFat-master/SdFat/ios.h @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -113,39 +113,39 @@ class ios_base { /** truncate an existing stream when opening */ static const openmode trunc = 0X80; //---------------------------------------------------------------------------- - ios_base() : fill_(' '), fmtflags_(dec | right | skipws) - , precision_(2), width_(0) {} + ios_base() : m_fill(' '), m_fmtflags(dec | right | skipws) + , m_precision(2), m_width(0) {} /** \return fill character */ - char fill() {return fill_;} + char fill() {return m_fill;} /** Set fill character * \param[in] c new fill character * \return old fill character */ char fill(char c) { - char r = fill_; - fill_ = c; + char r = m_fill; + m_fill = c; return r; } /** \return format flags */ - fmtflags flags() const {return fmtflags_;} + fmtflags flags() const {return m_fmtflags;} /** set format flags * \param[in] fl new flag * \return old flags */ fmtflags flags(fmtflags fl) { - fmtflags tmp = fmtflags_; - fmtflags_ = fl; + fmtflags tmp = m_fmtflags; + m_fmtflags = fl; return tmp; } /** \return precision */ - int precision() const {return precision_;} + int precision() const {return m_precision;} /** set precision * \param[in] n new precision * \return old precision */ int precision(unsigned int n) { - int r = precision_; - precision_ = n; + int r = m_precision; + m_precision = n; return r; } /** set format flags @@ -153,8 +153,8 @@ class ios_base { * \return old flags */ fmtflags setf(fmtflags fl) { - fmtflags r = fmtflags_; - fmtflags_ |= fl; + fmtflags r = m_fmtflags; + m_fmtflags |= fl; return r; } /** modify format flags @@ -163,9 +163,9 @@ class ios_base { * \return old flags */ fmtflags setf(fmtflags fl, fmtflags mask) { - fmtflags r = fmtflags_; - fmtflags_ &= ~mask; - fmtflags_ |= fl; + fmtflags r = m_fmtflags; + m_fmtflags &= ~mask; + m_fmtflags |= fl; return r; } /** clear format flags @@ -173,30 +173,32 @@ class ios_base { * \return old flags */ void unsetf(fmtflags fl) { - fmtflags_ &= ~fl; + m_fmtflags &= ~fl; } /** \return width */ - unsigned width() {return width_;} + unsigned width() {return m_width;} /** set width * \param[in] n new width * \return old width */ unsigned width(unsigned n) { - unsigned r = width_; - width_ = n; + unsigned r = m_width; + m_width = n; return r; } + protected: /** \return current number base */ uint8_t flagsToBase() { uint8_t f = flags() & basefield; return f == oct ? 8 : f != hex ? 10 : 16; } + private: - char fill_; - fmtflags fmtflags_; - unsigned char precision_; - unsigned int width_; + char m_fill; + fmtflags m_fmtflags; + unsigned char m_precision; + unsigned int m_width; }; //------------------------------------------------------------------------------ /** function for boolalpha manipulator @@ -351,7 +353,7 @@ inline ios_base& uppercase(ios_base& str) { class ios : public ios_base { public: /** Create ios with no error flags set */ - ios() : iostate_(0) {} + ios() : m_iostate(0) {} /** \return null pointer if fail() is true. */ operator const void*() const { @@ -360,9 +362,9 @@ class ios : public ios_base { /** \return true if fail() else false. */ bool operator!() const {return fail();} /** \return The iostate flags for this file. */ - iostate rdstate() const {return iostate_;} + iostate rdstate() const {return m_iostate;} /** \return True if no iostate flags are set else false. */ - bool good() const {return iostate_ == goodbit;} + bool good() const {return m_iostate == goodbit;} /** \return true if end of file has been reached else false. * * Warning: An empty file returns false before the first read. @@ -370,22 +372,23 @@ class ios : public ios_base { * Moral: eof() is only useful in combination with fail(), to find out * whether EOF was the cause for failure */ - bool eof() const {return iostate_ & eofbit;} + bool eof() const {return m_iostate & eofbit;} /** \return true if any iostate bit other than eof are set else false. */ - bool fail() const {return iostate_ & (failbit | badbit);} + bool fail() const {return m_iostate & (failbit | badbit);} /** \return true if bad bit is set else false. */ - bool bad() const {return iostate_ & badbit;} + bool bad() const {return m_iostate & badbit;} /** Clear iostate bits. * * \param[in] state The flags you want to set after clearing all flags. **/ - void clear(iostate state = goodbit) {iostate_ = state;} + void clear(iostate state = goodbit) {m_iostate = state;} /** Set iostate bits. * * \param[in] state Bitts to set. **/ - void setstate(iostate state) {iostate_ |= state;} + void setstate(iostate state) {m_iostate |= state;} + private: - iostate iostate_; + iostate m_iostate; }; #endif // ios_h diff --git a/libs/SdFatBeta20120108/SdFat/iostream.h b/libs/SdFat-master/SdFat/iostream.h similarity index 98% rename from libs/SdFatBeta20120108/SdFat/iostream.h rename to libs/SdFat-master/SdFat/iostream.h index 02e5f01..6a69f5f 100755 --- a/libs/SdFatBeta20120108/SdFat/iostream.h +++ b/libs/SdFat-master/SdFat/iostream.h @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * diff --git a/libs/SdFatBeta20120108/SdFat/istream.cpp b/libs/SdFat-master/SdFat/istream.cpp similarity index 92% rename from libs/SdFatBeta20120108/SdFat/istream.cpp rename to libs/SdFat-master/SdFat/istream.cpp index 3764813..49faec5 100755 --- a/libs/SdFatBeta20120108/SdFat/istream.cpp +++ b/libs/SdFat-master/SdFat/istream.cpp @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -27,13 +27,13 @@ * by the stream state. */ int istream::get() { - int16_t c; - gcount_ = 0; + int c; + m_gcount = 0; c = getch(); if (c < 0) { setstate(failbit); } else { - gcount_ = 1; + m_gcount = 1; } return c; } @@ -46,7 +46,7 @@ int istream::get() { * \return always returns *this. A failure is indicated by the stream state. */ istream& istream::get(char& c) { - int16_t tmp = get(); + int tmp = get(); if (tmp >= 0) c = tmp; return *this; } @@ -67,9 +67,9 @@ istream& istream::get(char& c) { */ istream& istream::get(char *str, streamsize n, char delim) { int c; - fpos_t pos; - gcount_ = 0; - while ((gcount_ + 1) < n) { + FatPos_t pos; + m_gcount = 0; + while ((m_gcount + 1) < n) { c = getch(&pos); if (c < 0) { break; @@ -78,10 +78,10 @@ istream& istream::get(char *str, streamsize n, char delim) { setpos(&pos); break; } - str[gcount_++] = c; + str[m_gcount++] = c; } - if (n > 0) str[gcount_] = '\0'; - if (gcount_ == 0) setstate(failbit); + if (n > 0) str[m_gcount] = '\0'; + if (m_gcount == 0) setstate(failbit); return *this; } //------------------------------------------------------------------------------ @@ -91,15 +91,14 @@ void istream::getBool(bool *b) { return; } PGM_P truePtr = PSTR("true"); - const uint8_t true_len = 4; PGM_P falsePtr = PSTR("false"); + const uint8_t true_len = 4; const uint8_t false_len = 5; bool trueOk = true; bool falseOk = true; uint8_t i = 0; int c = readSkip(); while (1) { -// if (c < 0) break; // not required falseOk = falseOk && c == pgm_read_byte(falsePtr + i); trueOk = trueOk && c == pgm_read_byte(truePtr + i); if (trueOk == false && falseOk == false) break; @@ -131,7 +130,7 @@ void istream::getChar(char* ch) { // int16_t const EXP_LIMIT = 100; static const uint32_t uint32_max = (uint32_t)-1; -bool istream::getFloat(float* value) { +bool istream::getDouble(double* value) { bool got_digit = false; bool got_dot = false; bool neg; @@ -140,9 +139,9 @@ bool istream::getFloat(float* value) { int16_t exp = 0; int16_t fracExp = 0; uint32_t frac = 0; - fpos_t endPos; - float pow10; - float v; + FatPos_t endPos; + double pow10; + double v; getpos(&endPos); c = readSkip(); @@ -180,7 +179,7 @@ bool istream::getFloat(float* value) { c = getch(&endPos); } } - v = static_cast(frac); + v = static_cast(frac); exp = expNeg ? fracExp - exp : fracExp + exp; expNeg = exp < 0; if (expNeg) exp = -exp; @@ -228,9 +227,9 @@ bool istream::getFloat(float* value) { * \return always returns *this. A failure is indicated by the stream state. */ istream& istream::getline(char *str, streamsize n, char delim) { - fpos_t pos; + FatPos_t pos; int c; - gcount_ = 0; + m_gcount = 0; if (n > 0) str[0] = '\0'; while (1) { c = getch(&pos); @@ -238,18 +237,18 @@ istream& istream::getline(char *str, streamsize n, char delim) { break; } if (c == delim) { - gcount_++; + m_gcount++; break; } - if ((gcount_ + 1) >= n) { + if ((m_gcount + 1) >= n) { setpos(&pos); setstate(failbit); break; } - str[gcount_++] = c; - str[gcount_] = '\0'; + str[m_gcount++] = c; + str[m_gcount] = '\0'; } - if (gcount_ == 0) setstate(failbit); + if (m_gcount == 0) setstate(failbit); return *this; } //------------------------------------------------------------------------------ @@ -261,7 +260,7 @@ bool istream::getNumber(uint32_t posMax, uint32_t negMax, uint32_t* num) { uint32_t val = 0; uint32_t cutoff; uint8_t cutlim; - fpos_t endPos; + FatPos_t endPos; uint8_t f = flags() & basefield; uint8_t base = f == oct ? 8 : f != hex ? 10 : 16; getpos(&endPos); @@ -320,7 +319,7 @@ bool istream::getNumber(uint32_t posMax, uint32_t negMax, uint32_t* num) { * */ void istream::getStr(char *str) { - fpos_t pos; + FatPos_t pos; uint16_t i = 0; uint16_t m = width() ? width() - 1 : 0XFFFE; if (m != 0) { @@ -361,13 +360,13 @@ void istream::getStr(char *str) { */ istream& istream::ignore(streamsize n, int delim) { int c; - gcount_ = 0; - while (gcount_ < n) { + m_gcount = 0; + while (m_gcount < n) { c = getch(); if (c < 0) { break; } - gcount_++; + m_gcount++; if (c == delim) break; } return *this; @@ -381,8 +380,8 @@ istream& istream::ignore(streamsize n, int delim) { */ int istream::peek() { int16_t c; - fpos_t pos; - gcount_ = 0; + FatPos_t pos; + m_gcount = 0; getpos(&pos); c = getch(); if (c < 0) { @@ -404,7 +403,7 @@ int16_t istream::readSkip() { /** used to implement ws() */ void istream::skipWhite() { int c; - fpos_t pos; + FatPos_t pos; do { c = getch(&pos); } while (isspace(c)); diff --git a/libs/SdFatBeta20120108/SdFat/istream.h b/libs/SdFat-master/SdFat/istream.h similarity index 92% rename from libs/SdFatBeta20120108/SdFat/istream.h rename to libs/SdFat-master/SdFat/istream.h index 347e9b8..64c1d00 100755 --- a/libs/SdFatBeta20120108/SdFat/istream.h +++ b/libs/SdFat-master/SdFat/istream.h @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -137,38 +137,38 @@ class istream : public virtual ios { return *this; } /** - * Extract a value of type int16_t. + * Extract a value of type int. * \param[out] arg location to store the value. * \return Is always *this. Failure is indicated by the state of *this. */ - istream &operator>>(int16_t& arg) { + istream &operator>>(int& arg) { getNumber(&arg); return *this; } /** - * Extract a value of type uint16_t. + * Extract a value of type unsigned int. * \param[out] arg location to store the value. * \return Is always *this. Failure is indicated by the state of *this. */ - istream &operator>>(uint16_t& arg) { + istream &operator>>(unsigned int& arg) { getNumber(&arg); return *this; } /** - * Extract a value of type int32_t. + * Extract a value of type long. * \param[out] arg location to store the value. * \return Is always *this. Failure is indicated by the state of *this. */ - istream &operator>>(int32_t& arg) { + istream &operator>>(long& arg) { // NOLINT getNumber(&arg); return *this; } /** - * Extract a value of type uint32_t. + * Extract a value of type unsigned long. * \param[out] arg location to store the value. * \return Is always *this. Failure is indicated by the state of *this. */ - istream &operator>>(uint32_t& arg) { + istream &operator>>(unsigned long& arg) { // NOLINT getNumber(&arg); return *this; } @@ -178,7 +178,7 @@ class istream : public virtual ios { * \return Is always *this. Failure is indicated by the state of *this. */ istream &operator>> (double& arg) { - getFloat(reinterpret_cast(&arg)); + getDouble(&arg); return *this; } /** @@ -187,7 +187,9 @@ class istream : public virtual ios { * \return Is always *this. Failure is indicated by the state of *this. */ istream &operator>> (float& arg) { - getFloat(&arg); + double v; + getDouble(&v); + arg = v; return *this; } /** @@ -205,7 +207,7 @@ class istream : public virtual ios { * \return The number of characters extracted by the last unformatted * input function. */ - streamsize gcount() const {return gcount_;} + streamsize gcount() const {return m_gcount;} int get(); istream& get(char& ch); istream& get(char *str, streamsize n, char delim = '\n'); @@ -253,7 +255,7 @@ class istream : public virtual ios { * \param[out] pos * \return */ - int16_t getch(fpos_t* pos) { + int16_t getch(FatPos_t* pos) { getpos(pos); return getch(); } @@ -261,26 +263,27 @@ class istream : public virtual ios { * Internal - do not use * \param[out] pos */ - virtual void getpos(fpos_t* pos) = 0; + virtual void getpos(FatPos_t* pos) = 0; /** * Internal - do not use * \param[in] pos */ virtual bool seekoff(off_type off, seekdir way) = 0; virtual bool seekpos(pos_type pos) = 0; - virtual void setpos(fpos_t* pos) = 0; + virtual void setpos(FatPos_t* pos) = 0; virtual pos_type tellpos() = 0; /// @endcond private: - uint16_t gcount_; void getBool(bool *b); void getChar(char* ch); - bool getFloat(float* value); + bool getDouble(double* value); template void getNumber(T* value); bool getNumber(uint32_t posMax, uint32_t negMax, uint32_t* num); void getStr(char *str); int16_t readSkip(); + + size_t m_gcount; }; //------------------------------------------------------------------------------ template diff --git a/libs/SdFatBeta20120108/SdFat/ostream.cpp b/libs/SdFat-master/SdFat/ostream.cpp similarity index 93% rename from libs/SdFatBeta20120108/SdFat/ostream.cpp rename to libs/SdFat-master/SdFat/ostream.cpp index 098e44b..d285549 100755 --- a/libs/SdFatBeta20120108/SdFat/ostream.cpp +++ b/libs/SdFat-master/SdFat/ostream.cpp @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -18,9 +18,12 @@ * . */ #include +#ifndef PSTR +#define PSTR(x) x +#endif //------------------------------------------------------------------------------ void ostream::do_fill(unsigned len) { - for (;len < width(); len++) putch(fill()); + for (; len < width(); len++) putch(fill()); width(0); } //------------------------------------------------------------------------------ @@ -44,11 +47,9 @@ char* ostream::fmtNum(uint32_t n, char *ptr, uint8_t base) { void ostream::putBool(bool b) { if (flags() & boolalpha) { if (b) { - pgm t(PSTR("true")); - putPgm(t); + putPgm(PSTR("true")); } else { - pgm f(PSTR("false")); - putPgm(f); + putPgm(PSTR("false")); } } else { putChar(b ? '1' : '0'); @@ -80,8 +81,7 @@ void ostream::putDouble(double n) { } // check for larger than uint32_t if (n > 4.0E9) { - pgm err(PSTR("BIG FLT")); - putPgm(err); + putPgm(PSTR("BIG FLT")); return; } // round up and separate in and fraction parts @@ -158,9 +158,9 @@ void ostream::putNum(uint32_t n, bool neg) { do_fill(len); } //------------------------------------------------------------------------------ -void ostream::putPgm(const pgm &arg) { - char *str = arg.ptr; - int n = strlen_P(str); +void ostream::putPgm(const char* str) { + int n; + for (n = 0; pgm_read_byte(&str[n]); n++) {} fill_not_left(n); for (uint8_t c; (c = pgm_read_byte(str)); str++) { putch(c); diff --git a/libs/SdFatBeta20120108/SdFat/ostream.h b/libs/SdFat-master/SdFat/ostream.h similarity index 83% rename from libs/SdFatBeta20120108/SdFat/ostream.h rename to libs/SdFat-master/SdFat/ostream.h index a8c0367..8591b40 100755 --- a/libs/SdFatBeta20120108/SdFat/ostream.h +++ b/libs/SdFat-master/SdFat/ostream.h @@ -1,5 +1,5 @@ /* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SdFat Library * @@ -130,11 +130,35 @@ class ostream : public virtual ios { putDouble(arg); return *this; } + /** Output float + * \param[in] arg value to output + * \return the stream + */ + ostream &operator<< (float arg) { + putDouble(arg); + return *this; + } + /** Output signed short + * \param[in] arg value to output + * \return the stream + */ + ostream &operator<< (short arg) { // NOLINT + putNum((int32_t)arg); + return *this; + } + /** Output unsigned short + * \param[in] arg value to output + * \return the stream + */ + ostream &operator<< (unsigned short arg) { // NOLINT + putNum((uint32_t)arg); + return *this; + } /** Output signed int * \param[in] arg value to output * \return the stream */ - ostream &operator<< (int16_t arg) { + ostream &operator<< (int arg) { putNum((int32_t)arg); return *this; } @@ -142,7 +166,7 @@ class ostream : public virtual ios { * \param[in] arg value to output * \return the stream */ - ostream &operator<< (uint16_t arg) { + ostream &operator<< (unsigned int arg) { putNum((uint32_t)arg); return *this; } @@ -150,16 +174,16 @@ class ostream : public virtual ios { * \param[in] arg value to output * \return the stream */ - ostream &operator<< (int32_t arg) { - putNum(arg); + ostream &operator<< (long arg) { // NOLINT + putNum((int32_t)arg); return *this; } - /** Output uint32_t + /** Output unsigned long * \param[in] arg value to output * \return the stream */ - ostream &operator<< (uint32_t arg) { - putNum(arg); + ostream &operator<< (unsigned long arg) { // NOLINT + putNum((uint32_t)arg); return *this; } /** Output pointer @@ -170,12 +194,20 @@ class ostream : public virtual ios { putNum(reinterpret_cast(arg)); return *this; } - /** Output a string from flash + /** Output a string from flash using the pstr() macro * \param[in] arg pgm struct pointing to string * \return the stream */ ostream &operator<< (pgm arg) { - putPgm(arg); + putPgm(arg.ptr); + return *this; + } + /** Output a string from flash using the Arduino F() macro. + * \param[in] arg pointing to flash string + * \return the stream + */ + ostream &operator<< (const __FlashStringHelper *arg) { + putPgm(reinterpret_cast(arg)); return *this; } /** @@ -226,6 +258,7 @@ class ostream : public virtual ios { if (!seekoff(off, way)) setstate(failbit); return *this; } + protected: /// @cond SHOW_PROTECTED /** Put character with binary/text conversion @@ -248,7 +281,7 @@ class ostream : public virtual ios { void putDouble(double n); void putNum(uint32_t n, bool neg = false); void putNum(int32_t n); - void putPgm(const pgm& arg); + void putPgm(const char* str); void putStr(const char* str); }; #endif // ostream_h diff --git a/libs/SdFat-master/SdFat/utility/DigitalPin.h b/libs/SdFat-master/SdFat/utility/DigitalPin.h new file mode 100755 index 0000000..92bfd2f --- /dev/null +++ b/libs/SdFat-master/SdFat/utility/DigitalPin.h @@ -0,0 +1,654 @@ +/* Arduino DigitalIO Library + * Copyright (C) 2013 by William Greiman + * + * This file is part of the Arduino DigitalIO Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino DigitalIO Library. If not, see + * . + */ +/** + * @file + * @brief Fast Digital Pin functions + * + * @defgroup digitalPin Fast Pin I/O + * @details Fast Digital I/O functions and template class. + * @{ + */ +#ifndef DigitalPin_h +#define DigitalPin_h +#include +#ifdef __arm__ +#ifdef CORE_TEENSY +//------------------------------------------------------------------------------ +/** read pin value + * @param[in] pin Arduino pin number + * @return value read + */ +static inline __attribute__((always_inline)) +bool fastDigitalRead(uint8_t pin) { + return *portInputRegister(pin); +} +//------------------------------------------------------------------------------ +/** Set pin value + * @param[in] pin Arduino pin number + * @param[in] level value to write + */ +static inline __attribute__((always_inline)) +void fastDigitalWrite(uint8_t pin, bool value) { + if (value) { + *portSetRegister(pin) = 1; + } else { + *portClearRegister(pin) = 1; + } +} +#else // CORE_TEENSY +//------------------------------------------------------------------------------ +/** read pin value + * @param[in] pin Arduino pin number + * @return value read + */ +static inline __attribute__((always_inline)) +bool fastDigitalRead(uint8_t pin){ + return g_APinDescription[pin].pPort->PIO_PDSR & g_APinDescription[pin].ulPin; +} +//------------------------------------------------------------------------------ +/** Set pin value + * @param[in] pin Arduino pin number + * @param[in] level value to write + */ +static inline __attribute__((always_inline)) +void fastDigitalWrite(uint8_t pin, bool value){ + if(value) { + g_APinDescription[pin].pPort->PIO_SODR = g_APinDescription[pin].ulPin; + } else { + g_APinDescription[pin].pPort->PIO_CODR = g_APinDescription[pin].ulPin; + } +} +#endif // CORE_TEENSY +//------------------------------------------------------------------------------ +inline void fastDigitalToggle(uint8_t pin) { + fastDigitalWrite(pin, !fastDigitalRead(pin)); + } +//------------------------------------------------------------------------------ +inline void fastPinMode(uint8_t pin, bool mode) {pinMode(pin, mode);} +#else // __arm__ +#include +#include +//------------------------------------------------------------------------------ +/** + * @class pin_map_t + * @brief struct for mapping digital pins + */ +struct pin_map_t { + volatile uint8_t* ddr; /**< address of DDR for this pin */ + volatile uint8_t* pin; /**< address of PIN for this pin */ + volatile uint8_t* port; /**< address of PORT for this pin */ + uint8_t bit; /**< bit number for this pin */ +}; +//------------------------------------------------------------------------------ +#if defined(__AVR_ATmega168__)\ +||defined(__AVR_ATmega168P__)\ +||defined(__AVR_ATmega328P__) +// 168 and 328 Arduinos +const static pin_map_t pinMap[] = { + {&DDRD, &PIND, &PORTD, 0}, // D0 0 + {&DDRD, &PIND, &PORTD, 1}, // D1 1 + {&DDRD, &PIND, &PORTD, 2}, // D2 2 + {&DDRD, &PIND, &PORTD, 3}, // D3 3 + {&DDRD, &PIND, &PORTD, 4}, // D4 4 + {&DDRD, &PIND, &PORTD, 5}, // D5 5 + {&DDRD, &PIND, &PORTD, 6}, // D6 6 + {&DDRD, &PIND, &PORTD, 7}, // D7 7 + {&DDRB, &PINB, &PORTB, 0}, // B0 8 + {&DDRB, &PINB, &PORTB, 1}, // B1 9 + {&DDRB, &PINB, &PORTB, 2}, // B2 10 + {&DDRB, &PINB, &PORTB, 3}, // B3 11 + {&DDRB, &PINB, &PORTB, 4}, // B4 12 + {&DDRB, &PINB, &PORTB, 5}, // B5 13 + {&DDRC, &PINC, &PORTC, 0}, // C0 14 + {&DDRC, &PINC, &PORTC, 1}, // C1 15 + {&DDRC, &PINC, &PORTC, 2}, // C2 16 + {&DDRC, &PINC, &PORTC, 3}, // C3 17 + {&DDRC, &PINC, &PORTC, 4}, // C4 18 + {&DDRC, &PINC, &PORTC, 5} // C5 19 +}; +//------------------------------------------------------------------------------ +#elif defined(__AVR_ATmega1280__)\ +|| defined(__AVR_ATmega2560__) +// Mega +static const pin_map_t pinMap[] = { + {&DDRE, &PINE, &PORTE, 0}, // E0 0 + {&DDRE, &PINE, &PORTE, 1}, // E1 1 + {&DDRE, &PINE, &PORTE, 4}, // E4 2 + {&DDRE, &PINE, &PORTE, 5}, // E5 3 + {&DDRG, &PING, &PORTG, 5}, // G5 4 + {&DDRE, &PINE, &PORTE, 3}, // E3 5 + {&DDRH, &PINH, &PORTH, 3}, // H3 6 + {&DDRH, &PINH, &PORTH, 4}, // H4 7 + {&DDRH, &PINH, &PORTH, 5}, // H5 8 + {&DDRH, &PINH, &PORTH, 6}, // H6 9 + {&DDRB, &PINB, &PORTB, 4}, // B4 10 + {&DDRB, &PINB, &PORTB, 5}, // B5 11 + {&DDRB, &PINB, &PORTB, 6}, // B6 12 + {&DDRB, &PINB, &PORTB, 7}, // B7 13 + {&DDRJ, &PINJ, &PORTJ, 1}, // J1 14 + {&DDRJ, &PINJ, &PORTJ, 0}, // J0 15 + {&DDRH, &PINH, &PORTH, 1}, // H1 16 + {&DDRH, &PINH, &PORTH, 0}, // H0 17 + {&DDRD, &PIND, &PORTD, 3}, // D3 18 + {&DDRD, &PIND, &PORTD, 2}, // D2 19 + {&DDRD, &PIND, &PORTD, 1}, // D1 20 + {&DDRD, &PIND, &PORTD, 0}, // D0 21 + {&DDRA, &PINA, &PORTA, 0}, // A0 22 + {&DDRA, &PINA, &PORTA, 1}, // A1 23 + {&DDRA, &PINA, &PORTA, 2}, // A2 24 + {&DDRA, &PINA, &PORTA, 3}, // A3 25 + {&DDRA, &PINA, &PORTA, 4}, // A4 26 + {&DDRA, &PINA, &PORTA, 5}, // A5 27 + {&DDRA, &PINA, &PORTA, 6}, // A6 28 + {&DDRA, &PINA, &PORTA, 7}, // A7 29 + {&DDRC, &PINC, &PORTC, 7}, // C7 30 + {&DDRC, &PINC, &PORTC, 6}, // C6 31 + {&DDRC, &PINC, &PORTC, 5}, // C5 32 + {&DDRC, &PINC, &PORTC, 4}, // C4 33 + {&DDRC, &PINC, &PORTC, 3}, // C3 34 + {&DDRC, &PINC, &PORTC, 2}, // C2 35 + {&DDRC, &PINC, &PORTC, 1}, // C1 36 + {&DDRC, &PINC, &PORTC, 0}, // C0 37 + {&DDRD, &PIND, &PORTD, 7}, // D7 38 + {&DDRG, &PING, &PORTG, 2}, // G2 39 + {&DDRG, &PING, &PORTG, 1}, // G1 40 + {&DDRG, &PING, &PORTG, 0}, // G0 41 + {&DDRL, &PINL, &PORTL, 7}, // L7 42 + {&DDRL, &PINL, &PORTL, 6}, // L6 43 + {&DDRL, &PINL, &PORTL, 5}, // L5 44 + {&DDRL, &PINL, &PORTL, 4}, // L4 45 + {&DDRL, &PINL, &PORTL, 3}, // L3 46 + {&DDRL, &PINL, &PORTL, 2}, // L2 47 + {&DDRL, &PINL, &PORTL, 1}, // L1 48 + {&DDRL, &PINL, &PORTL, 0}, // L0 49 + {&DDRB, &PINB, &PORTB, 3}, // B3 50 + {&DDRB, &PINB, &PORTB, 2}, // B2 51 + {&DDRB, &PINB, &PORTB, 1}, // B1 52 + {&DDRB, &PINB, &PORTB, 0}, // B0 53 + {&DDRF, &PINF, &PORTF, 0}, // F0 54 + {&DDRF, &PINF, &PORTF, 1}, // F1 55 + {&DDRF, &PINF, &PORTF, 2}, // F2 56 + {&DDRF, &PINF, &PORTF, 3}, // F3 57 + {&DDRF, &PINF, &PORTF, 4}, // F4 58 + {&DDRF, &PINF, &PORTF, 5}, // F5 59 + {&DDRF, &PINF, &PORTF, 6}, // F6 60 + {&DDRF, &PINF, &PORTF, 7}, // F7 61 + {&DDRK, &PINK, &PORTK, 0}, // K0 62 + {&DDRK, &PINK, &PORTK, 1}, // K1 63 + {&DDRK, &PINK, &PORTK, 2}, // K2 64 + {&DDRK, &PINK, &PORTK, 3}, // K3 65 + {&DDRK, &PINK, &PORTK, 4}, // K4 66 + {&DDRK, &PINK, &PORTK, 5}, // K5 67 + {&DDRK, &PINK, &PORTK, 6}, // K6 68 + {&DDRK, &PINK, &PORTK, 7} // K7 69 +}; +//------------------------------------------------------------------------------ +#elif defined(__AVR_ATmega1284P__)\ +|| defined(__AVR_ATmega1284__)\ +|| defined(__AVR_ATmega644P__)\ +|| defined(__AVR_ATmega644__)\ +|| defined(__AVR_ATmega64__)\ +|| defined(__AVR_ATmega32__)\ +|| defined(__AVR_ATmega324__)\ +|| defined(__AVR_ATmega16__) + +#ifdef defined(VARIANT_MIGHTY) +// Mighty Layout +static const pin_map_t pinMap[] = { + {&DDRB, &PINB, &PORTB, 0}, // B0 0 + {&DDRB, &PINB, &PORTB, 1}, // B1 1 + {&DDRB, &PINB, &PORTB, 2}, // B2 2 + {&DDRB, &PINB, &PORTB, 3}, // B3 3 + {&DDRB, &PINB, &PORTB, 4}, // B4 4 + {&DDRB, &PINB, &PORTB, 5}, // B5 5 + {&DDRB, &PINB, &PORTB, 6}, // B6 6 + {&DDRB, &PINB, &PORTB, 7}, // B7 7 + {&DDRD, &PIND, &PORTD, 0}, // D0 8 + {&DDRD, &PIND, &PORTD, 1}, // D1 9 + {&DDRD, &PIND, &PORTD, 2}, // D2 10 + {&DDRD, &PIND, &PORTD, 3}, // D3 11 + {&DDRD, &PIND, &PORTD, 4}, // D4 12 + {&DDRD, &PIND, &PORTD, 5}, // D5 13 + {&DDRD, &PIND, &PORTD, 6}, // D6 14 + {&DDRD, &PIND, &PORTD, 7}, // D7 15 + {&DDRC, &PINC, &PORTC, 0}, // C0 16 + {&DDRC, &PINC, &PORTC, 1}, // C1 17 + {&DDRC, &PINC, &PORTC, 2}, // C2 18 + {&DDRC, &PINC, &PORTC, 3}, // C3 19 + {&DDRC, &PINC, &PORTC, 4}, // C4 20 + {&DDRC, &PINC, &PORTC, 5}, // C5 21 + {&DDRC, &PINC, &PORTC, 6}, // C6 22 + {&DDRC, &PINC, &PORTC, 7}, // C7 23 + {&DDRA, &PINA, &PORTA, 0}, // A0 24 + {&DDRA, &PINA, &PORTA, 1}, // A1 25 + {&DDRA, &PINA, &PORTA, 2}, // A2 26 + {&DDRA, &PINA, &PORTA, 3}, // A3 27 + {&DDRA, &PINA, &PORTA, 4}, // A4 28 + {&DDRA, &PINA, &PORTA, 5}, // A5 29 + {&DDRA, &PINA, &PORTA, 6}, // A6 30 + {&DDRA, &PINA, &PORTA, 7} // A7 31 +}; +#elif defined(VARIANT_BOBUINO) +// Bobuino Layout +static const pin_map_t pinMap[] = { + {&DDRD, &PIND, &PORTD, 0}, // D0 0 + {&DDRD, &PIND, &PORTD, 1}, // D1 1 + {&DDRD, &PIND, &PORTD, 2}, // D2 2 + {&DDRD, &PIND, &PORTD, 3}, // D3 3 + {&DDRB, &PINB, &PORTB, 0}, // B0 4 + {&DDRB, &PINB, &PORTB, 1}, // B1 5 + {&DDRB, &PINB, &PORTB, 2}, // B2 6 + {&DDRB, &PINB, &PORTB, 3}, // B3 7 + {&DDRD, &PIND, &PORTD, 5}, // D5 8 + {&DDRD, &PIND, &PORTD, 6}, // D6 9 + {&DDRB, &PINB, &PORTB, 4}, // B4 10 + {&DDRB, &PINB, &PORTB, 5}, // B5 11 + {&DDRB, &PINB, &PORTB, 6}, // B6 12 + {&DDRB, &PINB, &PORTB, 7}, // B7 13 + {&DDRA, &PINA, &PORTA, 7}, // A7 14 + {&DDRA, &PINA, &PORTA, 6}, // A6 15 + {&DDRA, &PINA, &PORTA, 5}, // A5 16 + {&DDRA, &PINA, &PORTA, 4}, // A4 17 + {&DDRA, &PINA, &PORTA, 3}, // A3 18 + {&DDRA, &PINA, &PORTA, 2}, // A2 19 + {&DDRA, &PINA, &PORTA, 1}, // A1 20 + {&DDRA, &PINA, &PORTA, 0}, // A0 21 + {&DDRC, &PINC, &PORTC, 0}, // C0 22 + {&DDRC, &PINC, &PORTC, 1}, // C1 23 + {&DDRC, &PINC, &PORTC, 2}, // C2 24 + {&DDRC, &PINC, &PORTC, 3}, // C3 25 + {&DDRC, &PINC, &PORTC, 4}, // C4 26 + {&DDRC, &PINC, &PORTC, 5}, // C5 27 + {&DDRC, &PINC, &PORTC, 6}, // C6 28 + {&DDRC, &PINC, &PORTC, 7}, // C7 29 + {&DDRD, &PIND, &PORTD, 4}, // D4 30 + {&DDRD, &PIND, &PORTD, 7} // D7 31 +}; +#elif defined(VARIANT_STANDARD) +// Standard Layout +static const pin_map_t pinMap[] = { + {&DDRB, &PINB, &PORTB, 0}, // B0 0 + {&DDRB, &PINB, &PORTB, 1}, // B1 1 + {&DDRB, &PINB, &PORTB, 2}, // B2 2 + {&DDRB, &PINB, &PORTB, 3}, // B3 3 + {&DDRB, &PINB, &PORTB, 4}, // B4 4 + {&DDRB, &PINB, &PORTB, 5}, // B5 5 + {&DDRB, &PINB, &PORTB, 6}, // B6 6 + {&DDRB, &PINB, &PORTB, 7}, // B7 7 + {&DDRD, &PIND, &PORTD, 0}, // D0 8 + {&DDRD, &PIND, &PORTD, 1}, // D1 9 + {&DDRD, &PIND, &PORTD, 2}, // D2 10 + {&DDRD, &PIND, &PORTD, 3}, // D3 11 + {&DDRD, &PIND, &PORTD, 4}, // D4 12 + {&DDRD, &PIND, &PORTD, 5}, // D5 13 + {&DDRD, &PIND, &PORTD, 6}, // D6 14 + {&DDRD, &PIND, &PORTD, 7}, // D7 15 + {&DDRC, &PINC, &PORTC, 0}, // C0 16 + {&DDRC, &PINC, &PORTC, 1}, // C1 17 + {&DDRC, &PINC, &PORTC, 2}, // C2 18 + {&DDRC, &PINC, &PORTC, 3}, // C3 19 + {&DDRC, &PINC, &PORTC, 4}, // C4 20 + {&DDRC, &PINC, &PORTC, 5}, // C5 21 + {&DDRC, &PINC, &PORTC, 6}, // C6 22 + {&DDRC, &PINC, &PORTC, 7}, // C7 23 + {&DDRA, &PINA, &PORTA, 7}, // A7 24 + {&DDRA, &PINA, &PORTA, 6}, // A6 25 + {&DDRA, &PINA, &PORTA, 5}, // A5 26 + {&DDRA, &PINA, &PORTA, 4}, // A4 27 + {&DDRA, &PINA, &PORTA, 3}, // A3 28 + {&DDRA, &PINA, &PORTA, 2}, // A2 29 + {&DDRA, &PINA, &PORTA, 1}, // A1 30 + {&DDRA, &PINA, &PORTA, 0} // A0 31 +}; +#else // VARIANT_MIGHTY +#error Undefined variant 1284, 644, 324, 64, 32 +#endif // VARIANT_MIGHTY +//------------------------------------------------------------------------------ +#elif defined(__AVR_ATmega32U4__) +#ifdef CORE_TEENSY +// Teensy 2.0 +static const pin_map_t pinMap[] = { + {&DDRB, &PINB, &PORTB, 0}, // B0 0 + {&DDRB, &PINB, &PORTB, 1}, // B1 1 + {&DDRB, &PINB, &PORTB, 2}, // B2 2 + {&DDRB, &PINB, &PORTB, 3}, // B3 3 + {&DDRB, &PINB, &PORTB, 7}, // B7 4 + {&DDRD, &PIND, &PORTD, 0}, // D0 5 + {&DDRD, &PIND, &PORTD, 1}, // D1 6 + {&DDRD, &PIND, &PORTD, 2}, // D2 7 + {&DDRD, &PIND, &PORTD, 3}, // D3 8 + {&DDRC, &PINC, &PORTC, 6}, // C6 9 + {&DDRC, &PINC, &PORTC, 7}, // C7 10 + {&DDRD, &PIND, &PORTD, 6}, // D6 11 + {&DDRD, &PIND, &PORTD, 7}, // D7 12 + {&DDRB, &PINB, &PORTB, 4}, // B4 13 + {&DDRB, &PINB, &PORTB, 5}, // B5 14 + {&DDRB, &PINB, &PORTB, 6}, // B6 15 + {&DDRF, &PINF, &PORTF, 7}, // F7 16 + {&DDRF, &PINF, &PORTF, 6}, // F6 17 + {&DDRF, &PINF, &PORTF, 5}, // F5 18 + {&DDRF, &PINF, &PORTF, 4}, // F4 19 + {&DDRF, &PINF, &PORTF, 1}, // F1 20 + {&DDRF, &PINF, &PORTF, 0}, // F0 21 + {&DDRD, &PIND, &PORTD, 4}, // D4 22 + {&DDRD, &PIND, &PORTD, 5}, // D5 23 + {&DDRE, &PINE, &PORTE, 6} // E6 24 +}; +//------------------------------------------------------------------------------ +#else // CORE_TEENSY +// Leonardo +static const pin_map_t pinMap[] = { + {&DDRD, &PIND, &PORTD, 2}, // D2 0 + {&DDRD, &PIND, &PORTD, 3}, // D3 1 + {&DDRD, &PIND, &PORTD, 1}, // D1 2 + {&DDRD, &PIND, &PORTD, 0}, // D0 3 + {&DDRD, &PIND, &PORTD, 4}, // D4 4 + {&DDRC, &PINC, &PORTC, 6}, // C6 5 + {&DDRD, &PIND, &PORTD, 7}, // D7 6 + {&DDRE, &PINE, &PORTE, 6}, // E6 7 + {&DDRB, &PINB, &PORTB, 4}, // B4 8 + {&DDRB, &PINB, &PORTB, 5}, // B5 9 + {&DDRB, &PINB, &PORTB, 6}, // B6 10 + {&DDRB, &PINB, &PORTB, 7}, // B7 11 + {&DDRD, &PIND, &PORTD, 6}, // D6 12 + {&DDRC, &PINC, &PORTC, 7}, // C7 13 + {&DDRB, &PINB, &PORTB, 3}, // B3 14 + {&DDRB, &PINB, &PORTB, 1}, // B1 15 + {&DDRB, &PINB, &PORTB, 2}, // B2 16 + {&DDRB, &PINB, &PORTB, 0}, // B0 17 + {&DDRF, &PINF, &PORTF, 7}, // F7 18 + {&DDRF, &PINF, &PORTF, 6}, // F6 19 + {&DDRF, &PINF, &PORTF, 5}, // F5 20 + {&DDRF, &PINF, &PORTF, 4}, // F4 21 + {&DDRF, &PINF, &PORTF, 1}, // F1 22 + {&DDRF, &PINF, &PORTF, 0}, // F0 23 + {&DDRD, &PIND, &PORTD, 4}, // D4 24 + {&DDRD, &PIND, &PORTD, 7}, // D7 25 + {&DDRB, &PINB, &PORTB, 4}, // B4 26 + {&DDRB, &PINB, &PORTB, 5}, // B5 27 + {&DDRB, &PINB, &PORTB, 6}, // B6 28 + {&DDRD, &PIND, &PORTD, 6} // D6 29 +}; +#endif // CORE_TEENSY +//------------------------------------------------------------------------------ +#elif defined(__AVR_AT90USB646__)\ +|| defined(__AVR_AT90USB1286__) +// Teensy++ 1.0 & 2.0 +static const pin_map_t pinMap[] = { + {&DDRD, &PIND, &PORTD, 0}, // D0 0 + {&DDRD, &PIND, &PORTD, 1}, // D1 1 + {&DDRD, &PIND, &PORTD, 2}, // D2 2 + {&DDRD, &PIND, &PORTD, 3}, // D3 3 + {&DDRD, &PIND, &PORTD, 4}, // D4 4 + {&DDRD, &PIND, &PORTD, 5}, // D5 5 + {&DDRD, &PIND, &PORTD, 6}, // D6 6 + {&DDRD, &PIND, &PORTD, 7}, // D7 7 + {&DDRE, &PINE, &PORTE, 0}, // E0 8 + {&DDRE, &PINE, &PORTE, 1}, // E1 9 + {&DDRC, &PINC, &PORTC, 0}, // C0 10 + {&DDRC, &PINC, &PORTC, 1}, // C1 11 + {&DDRC, &PINC, &PORTC, 2}, // C2 12 + {&DDRC, &PINC, &PORTC, 3}, // C3 13 + {&DDRC, &PINC, &PORTC, 4}, // C4 14 + {&DDRC, &PINC, &PORTC, 5}, // C5 15 + {&DDRC, &PINC, &PORTC, 6}, // C6 16 + {&DDRC, &PINC, &PORTC, 7}, // C7 17 + {&DDRE, &PINE, &PORTE, 6}, // E6 18 + {&DDRE, &PINE, &PORTE, 7}, // E7 19 + {&DDRB, &PINB, &PORTB, 0}, // B0 20 + {&DDRB, &PINB, &PORTB, 1}, // B1 21 + {&DDRB, &PINB, &PORTB, 2}, // B2 22 + {&DDRB, &PINB, &PORTB, 3}, // B3 23 + {&DDRB, &PINB, &PORTB, 4}, // B4 24 + {&DDRB, &PINB, &PORTB, 5}, // B5 25 + {&DDRB, &PINB, &PORTB, 6}, // B6 26 + {&DDRB, &PINB, &PORTB, 7}, // B7 27 + {&DDRA, &PINA, &PORTA, 0}, // A0 28 + {&DDRA, &PINA, &PORTA, 1}, // A1 29 + {&DDRA, &PINA, &PORTA, 2}, // A2 30 + {&DDRA, &PINA, &PORTA, 3}, // A3 31 + {&DDRA, &PINA, &PORTA, 4}, // A4 32 + {&DDRA, &PINA, &PORTA, 5}, // A5 33 + {&DDRA, &PINA, &PORTA, 6}, // A6 34 + {&DDRA, &PINA, &PORTA, 7}, // A7 35 + {&DDRE, &PINE, &PORTE, 4}, // E4 36 + {&DDRE, &PINE, &PORTE, 5}, // E5 37 + {&DDRF, &PINF, &PORTF, 0}, // F0 38 + {&DDRF, &PINF, &PORTF, 1}, // F1 39 + {&DDRF, &PINF, &PORTF, 2}, // F2 40 + {&DDRF, &PINF, &PORTF, 3}, // F3 41 + {&DDRF, &PINF, &PORTF, 4}, // F4 42 + {&DDRF, &PINF, &PORTF, 5}, // F5 43 + {&DDRF, &PINF, &PORTF, 6}, // F6 44 + {&DDRF, &PINF, &PORTF, 7} // F7 45 +}; +//------------------------------------------------------------------------------ +#else // CPU type +#error unknown CPU type +#endif // CPU type +//------------------------------------------------------------------------------ +/** count of pins */ +static const uint8_t digitalPinCount = sizeof(pinMap)/sizeof(pin_map_t); +//============================================================================== +/** generate bad pin number error */ +void badPinNumber(void) + __attribute__((error("Pin number is too large or not a constant"))); +//------------------------------------------------------------------------------ +/** Check for valid pin number + * @param[in] pin Number of pin to be checked. + */ +static inline __attribute__((always_inline)) +void badPinCheck(uint8_t pin) { + if (!__builtin_constant_p(pin) || pin >= digitalPinCount) { + badPinNumber(); + } +} +//------------------------------------------------------------------------------ +/** fast write helper + * @param[in] address I/O register address + * @param[in] bit bit number to write + * @param[in] level value for bit + */ +static inline __attribute__((always_inline)) +void fastBitWriteSafe(volatile uint8_t* address, uint8_t bit, bool level) { + uint8_t oldSREG; + if (address > (uint8_t*)0X5F) { + oldSREG = SREG; + cli(); + } + if (level) { + *address |= 1 << bit; + } else { + *address &= ~(1 << bit); + } + if (address > (uint8_t*)0X5F) { + SREG = oldSREG; + } +} +//------------------------------------------------------------------------------ +/** read pin value + * @param[in] pin Arduino pin number + * @return value read + */ +static inline __attribute__((always_inline)) +bool fastDigitalRead(uint8_t pin) { + badPinCheck(pin); + return (*pinMap[pin].pin >> pinMap[pin].bit) & 1; +} +//------------------------------------------------------------------------------ +/** toggle a pin + * @param[in] pin Arduino pin number + * + * If the pin is in output mode toggle the pin level. + * If the pin is in input mode toggle the state of the 20K pullup. + */ +static inline __attribute__((always_inline)) +void fastDigitalToggle(uint8_t pin) { + badPinCheck(pin); + if (pinMap[pin].pin > (uint8_t*)0X5F) { + // must write bit to high address port + *pinMap[pin].pin = 1 << pinMap[pin].bit; + } else { + // will compile to sbi and PIN register will not be read. + *pinMap[pin].pin |= 1 << pinMap[pin].bit; + } +} +//------------------------------------------------------------------------------ +/** Set pin value + * @param[in] pin Arduino pin number + * @param[in] level value to write + */ +static inline __attribute__((always_inline)) +void fastDigitalWrite(uint8_t pin, bool level) { + badPinCheck(pin); + fastBitWriteSafe(pinMap[pin].port, pinMap[pin].bit, level); +} +//------------------------------------------------------------------------------ +/** set pin mode + * @param[in] pin Arduino pin number + * @param[in] mode if true set output mode else input mode + * + * fastPinMode does not enable or disable the 20K pullup for input mode. + */ +static inline __attribute__((always_inline)) +void fastPinMode(uint8_t pin, bool mode) { + badPinCheck(pin); + fastBitWriteSafe(pinMap[pin].ddr, pinMap[pin].bit, mode); +} + +#endif // __arm__ +//------------------------------------------------------------------------------ +/** set pin configuration + * @param[in] pin Arduino pin number + * @param[in] mode If true set output mode else input mode + * @param[in] level If mode is output, set level high/low. + * If mode is input, enable or disable the pin's 20K pullup. + */ +static inline __attribute__((always_inline)) +void fastPinConfig(uint8_t pin, bool mode, bool level) { + fastPinMode(pin, mode); + fastDigitalWrite(pin, level); +} +//============================================================================== +/** + * @class DigitalPin + * @brief Fast digital port I/O + */ +template +class DigitalPin { + public: + //---------------------------------------------------------------------------- + /** Constructor */ + DigitalPin() {} + //---------------------------------------------------------------------------- + /** Constructor + * @param[in] pinMode if true set output mode else input mode. + */ + explicit DigitalPin(bool pinMode) { + mode(pinMode); + } + //---------------------------------------------------------------------------- + /** Constructor + * @param[in] mode If true set output mode else input mode + * @param[in] level If mode is output, set level high/low. + * If mode is input, enable or disable the pin's 20K pullup. + */ + DigitalPin(bool mode, bool level) { + config(mode, level); + } + //---------------------------------------------------------------------------- + /** Asignment operator + * @param[in] value If true set the pin's level high else set the + * pin's level low. + * + * @return This DigitalPin instance. + */ + inline DigitalPin & operator = (bool value) __attribute__((always_inline)) { + write(value); + return *this; + } + //---------------------------------------------------------------------------- + /** Parenthesis operator + * @return Pin's level + */ + inline operator bool () const __attribute__((always_inline)) { + return read(); + } + //---------------------------------------------------------------------------- + /** set pin configuration + * @param[in] mode If true set output mode else input mode + * @param[in] level If mode is output, set level high/low. + * If mode is input, enable or disable the pin's 20K pullup. + */ + inline __attribute__((always_inline)) + void config(bool mode, bool level) { + fastPinConfig(PinNumber, mode, level); + } + //---------------------------------------------------------------------------- + /** + * Set pin level high if output mode or enable 20K pullup if input mode. + */ + inline __attribute__((always_inline)) + void high() {write(true);} + //---------------------------------------------------------------------------- + /** + * Set pin level low if output mode or disable 20K pullup if input mode. + */ + inline __attribute__((always_inline)) + void low() {write(false);} + //---------------------------------------------------------------------------- + /** + * Set pin mode + * @param[in] pinMode if true set output mode else input mode. + * + * mode() does not enable or disable the 20K pullup for input mode. + */ + inline __attribute__((always_inline)) + void mode(bool pinMode) { + fastPinMode(PinNumber, pinMode); + } + //---------------------------------------------------------------------------- + /** @return Pin's level */ + inline __attribute__((always_inline)) + bool read() const { + return fastDigitalRead(PinNumber); + } + //---------------------------------------------------------------------------- + /** toggle a pin + * + * If the pin is in output mode toggle the pin's level. + * If the pin is in input mode toggle the state of the 20K pullup. + */ + inline __attribute__((always_inline)) + void toggle() { + fastDigitalToggle(PinNumber); + } + //---------------------------------------------------------------------------- + /** Write the pin's level. + * @param[in] value If true set the pin's level high else set the + * pin's level low. + */ + inline __attribute__((always_inline)) + void write(bool value) { + fastDigitalWrite(PinNumber, value); + } +}; +#endif // DigitalPin_h +/** @} */ \ No newline at end of file diff --git a/libs/SdFat-master/SdFat/utility/FatApiConstants.h b/libs/SdFat-master/SdFat/utility/FatApiConstants.h new file mode 100755 index 0000000..6a444c9 --- /dev/null +++ b/libs/SdFat-master/SdFat/utility/FatApiConstants.h @@ -0,0 +1,65 @@ +/* FatLib Library + * Copyright (C) 2013 by William Greiman + * + * This file is part of the FatLib Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the FatLib Library. If not, see + * . + */ +#ifndef FatApiConstants_h +#define FatApiConstants_h +//------------------------------------------------------------------------------ +// use the gnu style oflag in open() +/** open() oflag for reading */ +uint8_t const O_READ = 0X01; +/** open() oflag - same as O_IN */ +uint8_t const O_RDONLY = O_READ; +/** open() oflag for write */ +uint8_t const O_WRITE = 0X02; +/** open() oflag - same as O_WRITE */ +uint8_t const O_WRONLY = O_WRITE; +/** open() oflag for reading and writing */ +uint8_t const O_RDWR = (O_READ | O_WRITE); +/** open() oflag mask for access modes */ +uint8_t const O_ACCMODE = (O_READ | O_WRITE); +/** The file offset shall be set to the end of the file prior to each write. */ +uint8_t const O_APPEND = 0X04; +/** synchronous writes - call sync() after each write */ +uint8_t const O_SYNC = 0X08; +/** truncate the file to zero length */ +uint8_t const O_TRUNC = 0X10; +/** set the initial position at the end of the file */ +uint8_t const O_AT_END = 0X20; +/** create the file if nonexistent */ +uint8_t const O_CREAT = 0X40; +/** If O_CREAT and O_EXCL are set, open() shall fail if the file exists */ +uint8_t const O_EXCL = 0X80; + +// SdBaseFile class static and const definitions +// flags for ls() +/** ls() flag to print modify date */ +uint8_t const LS_DATE = 1; +/** ls() flag to print file size */ +uint8_t const LS_SIZE = 2; +/** ls() flag for recursive list of subdirectories */ +uint8_t const LS_R = 4; + +// flags for timestamp +/** set the file's last access date */ +uint8_t const T_ACCESS = 1; +/** set the file's creation date and time */ +uint8_t const T_CREATE = 2; +/** Set the file's write date and time */ +uint8_t const T_WRITE = 4; +#endif // FatApiConstants_h diff --git a/libs/SdFatBeta20120108/SdFat/SdFatStructs.h b/libs/SdFat-master/SdFat/utility/FatStructs.h similarity index 88% rename from libs/SdFatBeta20120108/SdFat/SdFatStructs.h rename to libs/SdFat-master/SdFat/utility/FatStructs.h index 4ea82b7..bf0da38 100755 --- a/libs/SdFatBeta20120108/SdFat/SdFatStructs.h +++ b/libs/SdFat-master/SdFat/utility/FatStructs.h @@ -1,7 +1,7 @@ -/* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman +/* FatLib Library + * Copyright (C) 2013 by William Greiman * - * This file is part of the Arduino SdFat Library + * This file is part of the FatLib Library * * This Library is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,11 +14,11 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with the Arduino SdFat Library. If not, see + * along with the FatLib Library. If not, see * . */ -#ifndef SdFatStructs_h -#define SdFatStructs_h +#ifndef FatStructs_h +#define FatStructs_h /** * \file * \brief FAT file structures @@ -92,7 +92,7 @@ struct partitionTable { uint32_t firstSector; /** Length of the partition, in blocks. */ uint32_t totalSectors; -}; +}__attribute__((packed)); /** Type name for partitionTable */ typedef struct partitionTable part_t; //------------------------------------------------------------------------------ @@ -116,7 +116,7 @@ struct masterBootRecord { uint8_t mbrSig0; /** Second MBR signature byte. Must be 0XAA */ uint8_t mbrSig1; -}; +}__attribute__((packed)); /** Type name for masterBootRecord */ typedef struct masterBootRecord mbr_t; //------------------------------------------------------------------------------ @@ -130,7 +130,7 @@ struct fat_boot { /** * The first three bytes of the boot sector must be valid, * executable x 86-based CPU instructions. This includes a - * jump instruction that skips the next nonexecutable bytes. + * jump instruction that skips the next non-executable bytes. */ uint8_t jump[3]; /** @@ -173,7 +173,7 @@ struct fat_boot { * This field is the old 16-bit total count of sectors on the volume. * This count includes the count of all sectors in all four regions * of the volume. This field can be 0; if it is 0, then totalSectors32 - * must be nonzero. For FAT32 volumes, this field must be 0. For + * must be non-zero. For FAT32 volumes, this field must be 0. For * FAT12 and FAT16 volumes, this field contains the sector count, and * totalSectors32 is 0 if the total sector count fits * (is less than 0x10000). @@ -206,7 +206,7 @@ struct fat_boot { * This field is the new 32-bit total count of sectors on the volume. * This count includes the count of all sectors in all four regions * of the volume. This field can be 0; if it is 0, then - * totalSectors16 must be nonzero. + * totalSectors16 must be non-zero. */ uint32_t totalSectors32; /** @@ -244,7 +244,7 @@ struct fat_boot { uint8_t bootSectorSig0; /** must be 0XAA */ uint8_t bootSectorSig1; -}; +}__attribute__((packed)); /** Type name for FAT Boot Sector */ typedef struct fat_boot fat_boot_t; //------------------------------------------------------------------------------ @@ -258,7 +258,7 @@ struct fat32_boot { /** * The first three bytes of the boot sector must be valid, * executable x 86-based CPU instructions. This includes a - * jump instruction that skips the next nonexecutable bytes. + * jump instruction that skips the next non-executable bytes. */ uint8_t jump[3]; /** @@ -299,7 +299,7 @@ struct fat32_boot { /** * This dates back to the old MS-DOS 1.x media determination and is * no longer usually used for anything. 0xF8 is the standard value - * for fixed (nonremovable) media. For removable media, 0xF0 is + * for fixed (non-removable) media. For removable media, 0xF0 is * frequently used. Legal values are 0xF0 or 0xF8-0xFF. */ uint8_t mediaType; @@ -354,7 +354,7 @@ struct fat32_boot { */ uint16_t fat32FSInfo; /** - * If nonzero, indicates the sector number in the reserved area + * If non-zero, indicates the sector number in the reserved area * of the volume of a copy of the boot record. Usually 6. * No value other than 6 is recommended. */ @@ -398,7 +398,7 @@ struct fat32_boot { uint8_t bootSectorSig0; /** must be 0XAA */ uint8_t bootSectorSig1; -}; +}__attribute__((packed)); /** Type name for FAT32 Boot Sector */ typedef struct fat32_boot fat32_boot_t; //------------------------------------------------------------------------------ @@ -438,7 +438,7 @@ struct fat32_fsinfo { uint8_t reserved2[12]; /** must be 0X00, 0X00, 0X55, 0XAA */ uint8_t tailSignature[4]; -}; +}__attribute__((packed)); /** Type name for FAT32 FSINFO Sector */ typedef struct fat32_fsinfo fat32_fsinfo_t; //------------------------------------------------------------------------------ @@ -536,7 +536,7 @@ struct directoryEntry { uint16_t firstClusterLow; /** 32-bit unsigned holding this file's size in bytes. */ uint32_t fileSize; -}; +}__attribute__((packed)); //------------------------------------------------------------------------------ // Definitions for directory entries // @@ -601,4 +601,78 @@ static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) { static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) { return (dir->attributes & DIR_ATT_VOLUME_ID) == 0; } -#endif // SdFatStructs_h +/** date field for FAT directory entry + * \param[in] year [1980,2107] + * \param[in] month [1,12] + * \param[in] day [1,31] + * + * \return Packed date for dir_t entry. + */ +static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { + return (year - 1980) << 9 | month << 5 | day; +} +/** year part of FAT directory date field + * \param[in] fatDate Date in packed dir format. + * + * \return Extracted year [1980,2107] + */ +static inline uint16_t FAT_YEAR(uint16_t fatDate) { + return 1980 + (fatDate >> 9); +} +/** month part of FAT directory date field + * \param[in] fatDate Date in packed dir format. + * + * \return Extracted month [1,12] + */ +static inline uint8_t FAT_MONTH(uint16_t fatDate) { + return (fatDate >> 5) & 0XF; +} +/** day part of FAT directory date field + * \param[in] fatDate Date in packed dir format. + * + * \return Extracted day [1,31] + */ +static inline uint8_t FAT_DAY(uint16_t fatDate) { + return fatDate & 0X1F; +} +/** time field for FAT directory entry + * \param[in] hour [0,23] + * \param[in] minute [0,59] + * \param[in] second [0,59] + * + * \return Packed time for dir_t entry. + */ +static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) { + return hour << 11 | minute << 5 | second >> 1; +} +/** hour part of FAT directory time field + * \param[in] fatTime Time in packed dir format. + * + * \return Extracted hour [0,23] + */ +static inline uint8_t FAT_HOUR(uint16_t fatTime) { + return fatTime >> 11; +} +/** minute part of FAT directory time field + * \param[in] fatTime Time in packed dir format. + * + * \return Extracted minute [0,59] + */ +static inline uint8_t FAT_MINUTE(uint16_t fatTime) { + return(fatTime >> 5) & 0X3F; +} +/** second part of FAT directory time field + * Note second/2 is stored in packed time. + * + * \param[in] fatTime Time in packed dir format. + * + * \return Extracted second [0,58] + */ +static inline uint8_t FAT_SECOND(uint16_t fatTime) { + return 2*(fatTime & 0X1F); +} +/** Default date for file timestamps is 1 Jan 2000 */ +uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1; +/** Default time for file timestamp is 1 am */ +uint16_t const FAT_DEFAULT_TIME = (1 << 11); +#endif // FatStructs_h diff --git a/libs/SdFat-master/SdFat/utility/FmtNumber.cpp b/libs/SdFat-master/SdFat/utility/FmtNumber.cpp new file mode 100755 index 0000000..1c3e704 --- /dev/null +++ b/libs/SdFat-master/SdFat/utility/FmtNumber.cpp @@ -0,0 +1,405 @@ +/* FatLib Library + * Copyright (C) 2013 by William Greiman + * + * This file is part of the FatLib Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the FatLib Library. If not, see + * . + */ +#include +#include +// Use Stimmer div/mod 10 on avr +#ifdef __AVR__ +#define USE_STIMMER +#endif // __AVR__ +//------------------------------------------------------------------------------ +// Stimmer div/mod 10 for AVR +// this code fragment works out i/10 and i%10 by calculating +// i*(51/256)*(256/255)/2 == i*51/510 == i/10 +// by "j.k" I mean 32.8 fixed point, j is integer part, k is fractional part +// j.k = ((j+1.0)*51.0)/256.0 +// (we add 1 because we will be using the floor of the result later) +// divmod10_asm16 and divmod10_asm32 are public domain code by Stimmer. +// http://forum.arduino.cc/index.php?topic=167414.msg1293679#msg1293679 +#define divmod10_asm16(in32, mod8, tmp8) \ +asm volatile( \ + " ldi %2,51 \n\t" \ + " mul %A0,%2 \n\t" \ + " clr %A0 \n\t" \ + " add r0,%2 \n\t" \ + " adc %A0,r1 \n\t" \ + " mov %1,r0 \n\t" \ + " mul %B0,%2 \n\t" \ + " clr %B0 \n\t" \ + " add %A0,r0 \n\t" \ + " adc %B0,r1 \n\t" \ + " clr r1 \n\t" \ + " add %1,%A0 \n\t" \ + " adc %A0,%B0 \n\t" \ + " adc %B0,r1 \n\t" \ + " add %1,%B0 \n\t" \ + " adc %A0,r1 \n\t" \ + " adc %B0,r1 \n\t" \ + " lsr %B0 \n\t" \ + " ror %A0 \n\t" \ + " ror %1 \n\t" \ + " ldi %2,10 \n\t" \ + " mul %1,%2 \n\t" \ + " mov %1,r1 \n\t" \ + " clr r1 \n\t" \ + :"+r"(in32), "=d"(mod8), "=d"(tmp8) : : "r0") + +#define divmod10_asm32(in32, mod8, tmp8) \ +asm volatile( \ + " ldi %2,51 \n\t" \ + " mul %A0,%2 \n\t" \ + " clr %A0 \n\t" \ + " add r0,%2 \n\t" \ + " adc %A0,r1 \n\t" \ + " mov %1,r0 \n\t" \ + " mul %B0,%2 \n\t" \ + " clr %B0 \n\t" \ + " add %A0,r0 \n\t" \ + " adc %B0,r1 \n\t" \ + " mul %C0,%2 \n\t" \ + " clr %C0 \n\t" \ + " add %B0,r0 \n\t" \ + " adc %C0,r1 \n\t" \ + " mul %D0,%2 \n\t" \ + " clr %D0 \n\t" \ + " add %C0,r0 \n\t" \ + " adc %D0,r1 \n\t" \ + " clr r1 \n\t" \ + " add %1,%A0 \n\t" \ + " adc %A0,%B0 \n\t" \ + " adc %B0,%C0 \n\t" \ + " adc %C0,%D0 \n\t" \ + " adc %D0,r1 \n\t" \ + " add %1,%B0 \n\t" \ + " adc %A0,%C0 \n\t" \ + " adc %B0,%D0 \n\t" \ + " adc %C0,r1 \n\t" \ + " adc %D0,r1 \n\t" \ + " add %1,%D0 \n\t" \ + " adc %A0,r1 \n\t" \ + " adc %B0,r1 \n\t" \ + " adc %C0,r1 \n\t" \ + " adc %D0,r1 \n\t" \ + " lsr %D0 \n\t" \ + " ror %C0 \n\t" \ + " ror %B0 \n\t" \ + " ror %A0 \n\t" \ + " ror %1 \n\t" \ + " ldi %2,10 \n\t" \ + " mul %1,%2 \n\t" \ + " mov %1,r1 \n\t" \ + " clr r1 \n\t" \ + :"+r"(in32), "=d"(mod8), "=d"(tmp8) : : "r0") +//------------------------------------------------------------------------------ +/* +// C++ code is based on this version of divmod10 by robtillaart. +// http://forum.arduino.cc/index.php?topic=167414.msg1246851#msg1246851 +// from robtillaart post: +// The code is based upon the divu10() code from the book Hackers Delight1. +// My insight was that the error formula in divu10() was in fact modulo 10 +// but not always. Sometimes it was 10 more. +void divmod10(uint32_t in, uint32_t &div, uint32_t &mod) +{ + // q = in * 0.8; + uint32_t q = (in >> 1) + (in >> 2); + q = q + (q >> 4); + q = q + (q >> 8); + q = q + (q >> 16); // not needed for 16 bit version + + // q = q / 8; ==> q = in *0.1; + q = q >> 3; + + // determine error + uint32_t r = in - ((q << 3) + (q << 1)); // r = in - q*10; + div = q + (r > 9); + if (r > 9) mod = r - 10; + else mod = r; +} +// Hackers delight function is here: +// http://www.hackersdelight.org/hdcodetxt/divuc.c.txt +// Code below uses 8/10 = 0.1100 1100 1100 1100 1100 1100 1100 1100. +// 15 ops including the multiply, or 17 elementary ops. +unsigned divu10(unsigned n) { + unsigned q, r; + + q = (n >> 1) + (n >> 2); + q = q + (q >> 4); + q = q + (q >> 8); + q = q + (q >> 16); + q = q >> 3; + r = n - q*10; + return q + ((r + 6) >> 4); +// return q + (r > 9); +} +*/ +//------------------------------------------------------------------------------ + +static const float m[] PROGMEM = {1e-1, 1e-2, 1e-4, 1e-8, 1e-16, 1e-32}; +static const float p[] PROGMEM = {1e+1, 1e+2, 1e+4, 1e+8, 1e+16, 1e+32}; +// scale float v by power of ten. return v*10^n +float scale10(float v, int8_t n) { + const float *s; + if (n < 0) { + n = -n; + s = m; + } else { + s = p; + } + n &= 63; + for (uint8_t i = 0; n; n >>= 1, i++) { + if (n & 1) v *= pgm_read_float(&s[i]); + } + return v; +} +//------------------------------------------------------------------------------ +// Format 16-bit unsigned +char* fmtDec(uint16_t n, char* p) { + while (n > 9) { +#ifdef USE_STIMMER + uint8_t tmp8, r; + divmod10_asm16(n, r, tmp8); +#else // USE_STIMMER + uint16_t t = n; + n = (n >> 1) + (n >> 2); + n = n + (n >> 4); + n = n + (n >> 8); + // n = n + (n >> 16); // no code for 16-bit n + n = n >> 3; + uint8_t r = t - (((n << 2) + n) << 1); + if (r > 9) { + n++; + r -= 10; + } +#endif // USE_STIMMER + *--p = r + '0'; + } + *--p = n + '0'; + return p; +} +//------------------------------------------------------------------------------ +// format 32-bit unsigned +char* fmtDec(uint32_t n, char* p) { + while (n >> 16) { +#ifdef USE_STIMMER + uint8_t tmp8, r; + divmod10_asm32(n, r, tmp8); +#else // USE_STIMMER + uint32_t t = n; + n = (n >> 1) + (n >> 2); + n = n + (n >> 4); + n = n + (n >> 8); + n = n + (n >> 16); + n = n >> 3; + uint8_t r = t - (((n << 2) + n) << 1); + if (r > 9) { + n++; + r -= 10; + } +#endif // USE_STIMMER + *--p = r + '0'; + } + return fmtDec((uint16_t)n, p); +} +//------------------------------------------------------------------------------ +char* fmtFloat(float value, char* p, uint8_t prec) { + char sign = value < 0 ? '-' : 0; + if (sign) value = -value; + + if (isnan(value)) { + *--p = 'n'; + *--p = 'a'; + *--p = 'n'; + return p; + } + if (isinf(value)) { + *--p = 'f'; + *--p = 'n'; + *--p = 'i'; + return p; + } + if (value > 4294967040.0) { + *--p = 'f'; + *--p = 'v'; + *--p = 'o'; + return p; + } + if (prec > 9) prec = 9; + value += scale10(0.5, -prec); + + uint32_t whole = value; + if (prec) { + char* tmp = p - prec; + uint32_t fraction = scale10(value - whole, prec); + p = fmtDec(fraction, p); + while (p > tmp) *--p = '0'; + *--p = '.'; + } + p = fmtDec(whole, p); + if (sign) *--p = sign; + return p; +} +//------------------------------------------------------------------------------ +/** Print a number followed by a field terminator. + * \param[in] value The number to be printed. + * \param[in] ptr Pointer to last char in buffer. + * \param[in] prec Number of digits after decimal point. + * \param[in] expChar Use exp format if non zero. + * \return Pointer to first character of result. + */ +char* fmtFloat(float value, char* ptr, uint8_t prec, char expChar) { + bool neg = value < 0; + if (neg) value = -value; + + // check for nan inf ovf + if (isnan(value)) { + *--ptr = 'n'; + *--ptr = 'a'; + *--ptr = 'n'; + return ptr; + } + if (isinf(value)) { + *--ptr = 'f'; + *--ptr = 'n'; + *--ptr = 'i'; + return ptr; + } + if (!expChar && value > 4294967040.0) { + *--ptr = 'f'; + *--ptr = 'v'; + *--ptr = 'o'; + return ptr; + } + if (prec > 9) prec = 9; + float round = scale10(0.5, -prec); + if (expChar) { + int8_t exp = 0; + bool expNeg = false; + if (value) { + while (value > 10.0) { + value *= 0.1; + exp++; + } + while (value < 1.0) { + value *= 10.0; + exp--; + } + value += round; + if (value > 10.0) { + value *= 0.1; + exp++; + } + expNeg = exp < 0; + if (expNeg) exp = -exp; + } + ptr = fmtDec((uint16_t)exp, ptr); + if (exp < 10) *--ptr = '0'; + *--ptr = expNeg ? '-' : '+'; + *--ptr = expChar; + } else { + // round value + value += round; + } + uint32_t whole = value; + if (prec) { + char* tmp = ptr - prec; + uint32_t fraction = scale10(value - whole, prec); + ptr = fmtDec(fraction, ptr); + while (ptr > tmp) *--ptr = '0'; + *--ptr = '.'; + } + ptr = fmtDec(whole, ptr); + if (neg) *--ptr = '-'; + return ptr; +} +//------------------------------------------------------------------------------ +char* fmtHex(uint32_t n, char* p) { + do { + uint8_t h = n & 0XF; + *--p = h + (h < 10 ? '0' : 'A' - 10); + n >>= 4; + } while (n); + return p; +} +//------------------------------------------------------------------------------ +float scanFloat(const char* str, char** ptr) { + int16_t const EXP_LIMIT = 100; + bool digit = false; + bool dot = false; + uint32_t fract = 0; + int fracExp = 0; + uint8_t nd = 0; + bool neg; + int c; + float v; + const char* successPtr; + + if (ptr) *ptr = const_cast(str); + + while (isspace((c = *str++))) {} + neg = c == '-'; + if (c == '-' || c == '+') c = *str++; + // Skip leading zeros + while (c == '0') { + c = *str++; + digit = true; + } + for (;;) { + if (isdigit(c)) { + digit = true; + if (nd < 9) { + fract = 10*fract + c - '0'; + nd++; + if (dot) fracExp--; + } else { + if (!dot) fracExp++; + } + } else if (c == '.') { + if (dot) goto fail; + dot = true; + } else { + if (!digit) goto fail; + break; + } + successPtr = str; + c = *str++; + } + if (c == 'e' || c == 'E') { + int exp = 0; + c = *str++; + bool expNeg = c == '-'; + if (c == '-' || c == '+') { + c = *str++; + } + while (isdigit(c)) { + if (exp > EXP_LIMIT) goto fail; + exp = 10*exp + c - '0'; + successPtr = str; + c = *str++; + } + fracExp += expNeg ? -exp : exp; + } + if (ptr) *ptr = const_cast(successPtr); + v = scale10(static_cast(fract), fracExp); + return neg ? -v: v; + + fail: + return 0; +} + + diff --git a/libs/SdFat-master/SdFat/utility/FmtNumber.h b/libs/SdFat-master/SdFat/utility/FmtNumber.h new file mode 100755 index 0000000..dd11018 --- /dev/null +++ b/libs/SdFat-master/SdFat/utility/FmtNumber.h @@ -0,0 +1,30 @@ +/* FatLib Library + * Copyright (C) 2013 by William Greiman + * + * This file is part of the FatLib Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the FatLib Library. If not, see + * . + */ +#ifndef FmtNumber_h +#define FmtNumber_h +#include +char* fmtDec(uint16_t n, char* p); +char* fmtDec(uint32_t n, char* p); +char* fmtFloat(float value, char* p, uint8_t prec); +char* fmtFloat(float value, char* ptr, uint8_t prec, char expChar); +char* fmtHex(uint32_t n, char* p); +float scale10(float v, int8_t n); +float scanFloat(const char* str, char** ptr); +#endif // FmtNumber_h diff --git a/libs/SdFat-master/SdFat/utility/SoftSPI.h b/libs/SdFat-master/SdFat/utility/SoftSPI.h new file mode 100755 index 0000000..036fad6 --- /dev/null +++ b/libs/SdFat-master/SdFat/utility/SoftSPI.h @@ -0,0 +1,162 @@ +/* Arduino DigitalIO Library + * Copyright (C) 2013 by William Greiman + * + * This file is part of the Arduino DigitalIO Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino DigitalIO Library. If not, see + * . + */ +/** + * @file + * @brief Software SPI. + * + * @defgroup softSPI Software SPI + * @details Software SPI Template Class. + * @{ + */ + +#ifndef SoftSPI_h +#define SoftSPI_h +#include +//------------------------------------------------------------------------------ +/** Nop for timing. */ +#define nop asm volatile ("nop\n\t") +//------------------------------------------------------------------------------ +/** Pin Mode for MISO is input.*/ +const bool MISO_MODE = false; +/** Pullups disabled for MISO are disabled. */ +const bool MISO_LEVEL = false; +/** Pin Mode for MOSI is output.*/ +const bool MOSI_MODE = true; +/** Pin Mode for SCK is output. */ +const bool SCK_MODE = true; +//------------------------------------------------------------------------------ +/** + * @class SoftSPI + * @brief Fast software SPI. + */ +template +class SoftSPI { + public: + //---------------------------------------------------------------------------- + /** Initialize SoftSPI pins. */ + void begin() { + fastPinConfig(MisoPin, MISO_MODE, MISO_LEVEL); + fastPinConfig(MosiPin, MOSI_MODE, !MODE_CPHA(Mode)); + fastPinConfig(SckPin, SCK_MODE, MODE_CPOL(Mode)); + } + //---------------------------------------------------------------------------- + /** Soft SPI receive byte. + * @return Data byte received. + */ + inline __attribute__((always_inline)) + uint8_t receive() { + uint8_t data = 0; + receiveBit(7, &data); + receiveBit(6, &data); + receiveBit(5, &data); + receiveBit(4, &data); + receiveBit(3, &data); + receiveBit(2, &data); + receiveBit(1, &data); + receiveBit(0, &data); + return data; + } + //---------------------------------------------------------------------------- + /** Soft SPI send byte. + * @param[in] data Data byte to send. + */ + inline __attribute__((always_inline)) + void send(uint8_t data) { + sendBit(7, data); + sendBit(6, data); + sendBit(5, data); + sendBit(4, data); + sendBit(3, data); + sendBit(2, data); + sendBit(1, data); + sendBit(0, data); + } + //---------------------------------------------------------------------------- + /** Soft SPI transfer byte. + * @param[in] txData Data byte to send. + * @return Data byte received. + */ + inline __attribute__((always_inline)) + uint8_t transfer(uint8_t txData) { + uint8_t rxData = 0; + transferBit(7, &rxData, txData); + transferBit(6, &rxData, txData); + transferBit(5, &rxData, txData); + transferBit(4, &rxData, txData); + transferBit(3, &rxData, txData); + transferBit(2, &rxData, txData); + transferBit(1, &rxData, txData); + transferBit(0, &rxData, txData); + return rxData; + } + + private: + //---------------------------------------------------------------------------- + inline __attribute__((always_inline)) + bool MODE_CPHA(uint8_t mode) {return (mode & 1) != 0;} + inline __attribute__((always_inline)) + bool MODE_CPOL(uint8_t mode) {return (mode & 2) != 0;} + inline __attribute__((always_inline)) + void receiveBit(uint8_t bit, uint8_t* data) { + if (MODE_CPHA(Mode)) { + fastDigitalWrite(SckPin, !MODE_CPOL(Mode)); + } + nop; + nop; + fastDigitalWrite(SckPin, + MODE_CPHA(Mode) ? MODE_CPOL(Mode) : !MODE_CPOL(Mode)); + if (fastDigitalRead(MisoPin)) *data |= 1 << bit; + if (!MODE_CPHA(Mode)) { + fastDigitalWrite(SckPin, MODE_CPOL(Mode)); + } + } + //---------------------------------------------------------------------------- + inline __attribute__((always_inline)) + void sendBit(uint8_t bit, uint8_t data) { + if (MODE_CPHA(Mode)) { + fastDigitalWrite(SckPin, !MODE_CPOL(Mode)); + } + fastDigitalWrite(MosiPin, data & (1 << bit)); + fastDigitalWrite(SckPin, + MODE_CPHA(Mode) ? MODE_CPOL(Mode) : !MODE_CPOL(Mode)); + nop; + nop; + if (!MODE_CPHA(Mode)) { + fastDigitalWrite(SckPin, MODE_CPOL(Mode)); + } + } + //---------------------------------------------------------------------------- + inline __attribute__((always_inline)) + void transferBit(uint8_t bit, uint8_t* rxData, uint8_t txData) { + if (MODE_CPHA(Mode)) { + fastDigitalWrite(SckPin, !MODE_CPOL(Mode)); + } + fastDigitalWrite(MosiPin, txData & (1 << bit)); + fastDigitalWrite(SckPin, + MODE_CPHA(Mode) ? MODE_CPOL(Mode) : !MODE_CPOL(Mode)); + if (fastDigitalRead(MisoPin)) *rxData |= 1 << bit; + if (!MODE_CPHA(Mode)) { + fastDigitalWrite(SckPin, MODE_CPOL(Mode)); + } + } + //---------------------------------------------------------------------------- +}; +#endif // SoftSPI_h +/** @} */ diff --git a/libs/SdFatBeta20120108/extra/SdFatTestSuite/SdFatTestSuite.cpp b/libs/SdFat-master/SdFatTestSuite/SdFatTestSuite.cpp similarity index 83% rename from libs/SdFatBeta20120108/extra/SdFatTestSuite/SdFatTestSuite.cpp rename to libs/SdFat-master/SdFatTestSuite/SdFatTestSuite.cpp index 4c23e1c..1fc3435 100755 --- a/libs/SdFatBeta20120108/extra/SdFatTestSuite/SdFatTestSuite.cpp +++ b/libs/SdFat-master/SdFatTestSuite/SdFatTestSuite.cpp @@ -22,10 +22,19 @@ static uint16_t failCount; static uint16_t testCount; static Print* testOut = &Serial; //------------------------------------------------------------------------------ -void testBegin(Print* pr) { - testOut = pr; +static size_t strlenPGM(PGM_P str) { + PGM_P end = str; + while (pgm_read_byte(end++)) {} + return end - str; +} +//------------------------------------------------------------------------------ +void testBegin() { + Serial.begin(9600); + while (!Serial) {} // wait for leonardo + testOut = &Serial; SerialPrintln_P(PSTR("Type any character to begin.")); - while (!Serial.available()); + while (Serial.read() <= 0) {} + delay(200); // Catch Due reset problem print_P(testOut, PSTR("FreeRam: ")); testOut->println(FreeRam()); @@ -62,12 +71,12 @@ void testVerify_P(char* result, PGM_P expect) { testOut->print("\",\""); print_P(testOut, expect); testOut->write('"'); - uint8_t n = strlen(result) + strlen_P(expect) + 5; + uint8_t n = strlen(result) + strlenPGM(expect) + 5; testResult(!strcmp_P(result, expect), n); } //------------------------------------------------------------------------------ void testVerify_P(bool b, PGM_P msg) { print_P(testOut, msg); - uint8_t n = strlen_P(msg); + uint8_t n = strlenPGM(msg); testResult(b, n); } diff --git a/libs/SdFatBeta20120108/extra/SdFatTestSuite/SdFatTestSuite.h b/libs/SdFat-master/SdFatTestSuite/SdFatTestSuite.h similarity index 78% rename from libs/SdFatBeta20120108/extra/SdFatTestSuite/SdFatTestSuite.h rename to libs/SdFat-master/SdFatTestSuite/SdFatTestSuite.h index 47634f5..736f67f 100755 --- a/libs/SdFatBeta20120108/extra/SdFatTestSuite/SdFatTestSuite.h +++ b/libs/SdFat-master/SdFatTestSuite/SdFatTestSuite.h @@ -21,11 +21,24 @@ #define SdFatTestSuite_h #include #include + +#if defined(__arm__) && !defined(strcmp_P) +#define strcmp_P(a, b) strcmp((a), (b)) +#endif // strcmp_P + +#if defined(__arm__) && !defined(strncpy_P) +#define strncpy_P(s, t, n) strncpy(s, t, n) +#endif // strncpy_P + +#if defined(__arm__) && !defined(strlen_P) +#define strlen_P(str) strlen(str) +#endif // strlen_P + #define testVerifyBool(result) testVerify_P(result, PSTR(#result)) #define testVerifyMsg(result, msg) testVerify_P(result, PSTR(msg)) #define testVerifyStr(result, expect) testVerify_P(result, PSTR(expect)) -void testBegin(Print* pr); +void testBegin(); void testEnd(); void testVerify_P(bool b, PGM_P msg); void testVerify_P(char* result, PGM_P expect); diff --git a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ATS_SD_File/ATS_SD_File.pde b/libs/SdFat-master/SdFatTestSuite/examples/ATS_SD_File/ATS_SD_File.ino similarity index 96% rename from libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ATS_SD_File/ATS_SD_File.pde rename to libs/SdFat-master/SdFatTestSuite/examples/ATS_SD_File/ATS_SD_File.ino index 2349a85..215c735 100755 --- a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ATS_SD_File/ATS_SD_File.pde +++ b/libs/SdFat-master/SdFatTestSuite/examples/ATS_SD_File/ATS_SD_File.ino @@ -11,10 +11,10 @@ void setup() { boolean b; SdFile f; uint32_t fs; - Serial.begin(9600); - testBegin(&Serial); - ATS_PrintTestStatus("SD.init()", b = SD.init()); + testBegin(); + + ATS_PrintTestStatus("SD.begin()", b = SD.begin()); if (!b) goto done; SD.remove("test.txt"); diff --git a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ATS_SD_Files/ATS_SD_Files.pde b/libs/SdFat-master/SdFatTestSuite/examples/ATS_SD_Files/ATS_SD_Files.ino similarity index 97% rename from libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ATS_SD_Files/ATS_SD_Files.pde rename to libs/SdFat-master/SdFatTestSuite/examples/ATS_SD_Files/ATS_SD_Files.ino index 233bccb..74e7ff6 100755 --- a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ATS_SD_Files/ATS_SD_Files.pde +++ b/libs/SdFat-master/SdFatTestSuite/examples/ATS_SD_Files/ATS_SD_Files.ino @@ -8,10 +8,10 @@ SdFat SD; void setup() { boolean b; SdFile f; - Serial.begin(9600); - testBegin(&Serial); - ATS_PrintTestStatus("SD.init()", b = SD.init()); + testBegin(); + + ATS_PrintTestStatus("SD.begin()", b = SD.begin()); if (!b) goto done; ATS_PrintTestStatus("!SD.exists()", !SD.exists("asdf.txt")); diff --git a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ATS_SD_Seek/ATS_SD_Seek.pde b/libs/SdFat-master/SdFatTestSuite/examples/ATS_SD_Seek/ATS_SD_Seek.ino similarity index 97% rename from libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ATS_SD_Seek/ATS_SD_Seek.pde rename to libs/SdFat-master/SdFatTestSuite/examples/ATS_SD_Seek/ATS_SD_Seek.ino index 489708e..221d1d7 100755 --- a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ATS_SD_Seek/ATS_SD_Seek.pde +++ b/libs/SdFat-master/SdFatTestSuite/examples/ATS_SD_Seek/ATS_SD_Seek.ino @@ -10,10 +10,10 @@ SdFat SD; void setup() { boolean b; SdFile f; - Serial.begin(9600); - testBegin(&Serial); - ATS_PrintTestStatus("SD.init()", b = SD.init()); + testBegin(); + + ATS_PrintTestStatus("SD.begin()", b = SD.begin()); if (!b) goto done; SD.remove("test.txt"); diff --git a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/fstreamTest/fstreamTest.pde b/libs/SdFat-master/SdFatTestSuite/examples/fstreamTest/fstreamTest.ino similarity index 97% rename from libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/fstreamTest/fstreamTest.pde rename to libs/SdFat-master/SdFatTestSuite/examples/fstreamTest/fstreamTest.ino index 0df88e7..5b18b14 100755 --- a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/fstreamTest/fstreamTest.pde +++ b/libs/SdFat-master/SdFatTestSuite/examples/fstreamTest/fstreamTest.ino @@ -82,9 +82,9 @@ void testPosition() { } //------------------------------------------------------------------------------ void setup() { - Serial.begin(9600); - testBegin(&Serial); - if (!sd.init()) sd.initErrorHalt(); + + testBegin(); + if (!sd.begin()) sd.initErrorHalt(); fstreamOpen(); testPosition(); testEnd(); diff --git a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/istreamTest/istreamTest.pde b/libs/SdFat-master/SdFatTestSuite/examples/istreamTest/istreamTest.ino similarity index 71% rename from libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/istreamTest/istreamTest.pde rename to libs/SdFat-master/SdFatTestSuite/examples/istreamTest/istreamTest.ino index 578c579..3407cc4 100755 --- a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/istreamTest/istreamTest.pde +++ b/libs/SdFat-master/SdFatTestSuite/examples/istreamTest/istreamTest.ino @@ -4,6 +4,7 @@ char buf[100]; ibufstream ib; #define ibInit(s) ibInit_P(PSTR(s)) + //---------------------------------------------------------- void ibInit_P(PGM_P p) { if (strlen_P(p) >= sizeof(buf)) { @@ -22,12 +23,12 @@ void istreamBool() { testVerifyBool((ib >> b) && !b); testVerifyBool((ib >> b) && b); testVerifyBool(!(ib >> b) && !ib.good()); - + ibInit(" true false err"); testVerifyBool((ib >> boolalpha >> b) && b && ib.good()); testVerifyBool((ib >> b) && !b && ib.good()); testVerifyBool(!(ib >> b) && ib.fail()); - + ibInit("1"); testVerifyBool((ib >> noboolalpha >> b) && b && ib.eof()); } @@ -36,7 +37,7 @@ void istreamChar() { char c; signed char sc; unsigned char uc; - + ibInit("c s u g"); testVerifyBool((ib >> c) && ib.good() && c == 'c'); testVerifyBool((ib >> sc) && ib.good() && sc == 's'); @@ -47,8 +48,8 @@ void istreamChar() { testVerifyBool(ib.get() == -1 && ib.eof()); } //------------------------------------------------------------------------------ -void istreamFloat() { - float f; +void istreamDouble() { + double f; ibInit("0 .1 1. 2 3.4 .1e5 1e5 -1E6 +2.3e-3 -123.4567"); testVerifyBool((ib >> f) && f == 0 && ib.good()); testVerifyBool((ib >> f) && f == 0.1 && ib.good()); @@ -63,6 +64,22 @@ void istreamFloat() { if (fabs(f + 123.4567) >= 1e-5) Serial.println(f, 8); } //------------------------------------------------------------------------------ +void istreamFloat() { + float f; + ibInit("0 .1 1. 2 3.4 .1e5 1e5 -1E6 +2.3e-3 -123.4567"); + testVerifyBool((ib >> f) && f == 0 && ib.good()); + testVerifyBool((ib >> f) && f == 0.1f && ib.good()); + testVerifyBool((ib >> f) && f == 1.0 && ib.good()); + testVerifyBool((ib >> f) && f == 2.0 && ib.good()); + testVerifyBool((ib >> f) && f == 3.4f && ib.good()); + testVerifyBool((ib >> f) && f == 10000.0 && ib.good()); + testVerifyBool((ib >> f) && f == 1e5 && ib.good()); + testVerifyBool((ib >> f) && f == -1E6 && ib.good()); + testVerifyBool((ib >> f) && f == 2.3e-3f && ib.good()); + testVerifyBool((ib >> f) && fabs(f + 123.4567f) < 1e-5 && ib.eof()); + if (fabs(f + 123.4567) >= 1e-5) Serial.println(f, 8); +} +//------------------------------------------------------------------------------ void istreamGet() { char s[4]; ibInit("ab c"); @@ -71,7 +88,7 @@ void istreamGet() { testVerifyBool(ib.get() == ' ' && ib.good() && ib.gcount() == 1); testVerifyBool(ib.get() == 'c' && ib.good() && ib.gcount() == 1); testVerifyBool(ib.get() == -1 && ib.eof() && ib.gcount() == 0); - + ibInit("ab\ncdef"); ib.get(s, sizeof(s)); testVerifyBool(ib.good() && ib.gcount() == 2); @@ -83,7 +100,7 @@ void istreamGet() { ib.get(s, sizeof(s)); testVerifyBool(ib.eof() && ib.gcount() == 1); testVerifyStr(s, "f"); - + ibInit( "short line\n" "\n" @@ -122,7 +139,7 @@ void istreamNumber() { long l; signed long sl; unsigned long ul; - + ibInit("-32769"); testVerifyBool(!(ib >> s) && ib.fail()); ibInit("-32768 0 32767 32768"); @@ -138,33 +155,55 @@ void istreamNumber() { testVerifyBool((ib >> ss) && ss == 0 && ib.good()); testVerifyBool((ib >> ss) && ss == 32767 && ib.good()); testVerifyBool(!(ib >> ss) && ib.fail()); - + ibInit("0 65535 65536"); testVerifyBool((ib >> us) && us == 0 && ib.good()); testVerifyBool((ib >> us) && us == 65535 && ib.good()); testVerifyBool(!(ib >> us) && ib.fail()); - ibInit("-32769"); - testVerifyBool(!(ib >> i) && ib.fail()); - ibInit("-32768 0 32767 32768"); - testVerifyBool((ib >> i) && i == -32768 && ib.good()); - testVerifyBool((ib >> i) && i == 0 && ib.good()); - testVerifyBool((ib >> i) && i == 32767 && ib.good()); - testVerifyBool(!(ib >> i) && ib.fail()); +if (sizeof(int) == 2) { + ibInit("-32769"); + testVerifyBool(!(ib >> i) && ib.fail()); + ibInit("-32768 0 32767 32768"); + testVerifyBool((ib >> i) && i == -32768 && ib.good()); + testVerifyBool((ib >> i) && i == 0 && ib.good()); + testVerifyBool((ib >> i) && i == 32767 && ib.good()); + testVerifyBool(!(ib >> i) && ib.fail()); - ibInit("-32769"); - testVerifyBool(!(ib >> si) && ib.fail()); - ibInit("-32768 0 32767 32768"); - testVerifyBool((ib >> si) && si == -32768 && ib.good()); - testVerifyBool((ib >> si) && si == 0 && ib.good()); - testVerifyBool((ib >> si) && si == 32767 && ib.good()); - testVerifyBool(!(ib >> si) && ib.fail()); - - ibInit("0 65535 65536"); - testVerifyBool((ib >> ui) && ui == 0 && ib.good()); - testVerifyBool((ib >> ui) && ui == 65535 && ib.good()); - testVerifyBool(!(ib >> ui) && ib.fail()); - + ibInit("-32769"); + testVerifyBool(!(ib >> si) && ib.fail()); + ibInit("-32768 0 32767 32768"); + testVerifyBool((ib >> si) && si == -32768 && ib.good()); + testVerifyBool((ib >> si) && si == 0 && ib.good()); + testVerifyBool((ib >> si) && si == 32767 && ib.good()); + testVerifyBool(!(ib >> si) && ib.fail()); + + ibInit("0 65535 65536"); + testVerifyBool((ib >> ui) && ui == 0 && ib.good()); + testVerifyBool((ib >> ui) && ui == 65535 && ib.good()); + testVerifyBool(!(ib >> ui) && ib.fail()); + } else { + ibInit("-2147483649"); + testVerifyBool(!(ib >> i) && ib.fail()); + ibInit("-2147483648 0 2147483647 2147483648"); + testVerifyBool((ib >> i) && i == -2147483648 && ib.good()); + testVerifyBool((ib >> i) && i == 0 && ib.good()); + testVerifyBool((ib >> i) && i == 2147483647 && ib.good()); + testVerifyBool(!(ib >> i) && ib.fail()); + + ibInit("-2147483649"); + testVerifyBool(!(ib >> si) && ib.fail()); + ibInit("-2147483648 0 2147483647 2147483648"); + testVerifyBool((ib >> si) && si == -2147483648 && ib.good()); + testVerifyBool((ib >> si) && si == 0 && ib.good()); + testVerifyBool((ib >> si) && si == 2147483647 && ib.good()); + testVerifyBool(!(ib >> si) && ib.fail()); + + ibInit("0 4294967295 4294967296"); + testVerifyBool((ib >> ui) && ui == 0 && ib.good()); + testVerifyBool((ib >> ui) && ui == 4294967295 && ib.good()); + testVerifyBool(!(ib >> ui) && ib.fail()); + } ibInit("-2147483649"); testVerifyBool(!(ib >> l) && ib.fail()); ibInit("-2147483648 0 2147483647 2147483648"); @@ -180,12 +219,12 @@ void istreamNumber() { testVerifyBool((ib >> sl) && sl == 0 && ib.good()); testVerifyBool((ib >> sl) && sl == 2147483647 && ib.good()); testVerifyBool(!(ib >> sl) && ib.fail()); - + ibInit("0 4294967295 4294967296"); testVerifyBool((ib >> ul) && ul == 0 && ib.good()); testVerifyBool((ib >> ul) && ul == 4294967295 && ib.good()); testVerifyBool(!(ib >> ul) && ib.fail()); - + // octal hex ibInit("123 abc 0xdef 0XABC 567"); testVerifyBool((ib >> oct >> i) && i == 83); @@ -207,10 +246,10 @@ void istreamStr() { } //------------------------------------------------------------------------------ void setup() { - Serial.begin(9600); - testBegin(&Serial); + testBegin(); istreamBool(); istreamChar(); + istreamDouble(); istreamFloat(); istreamGet(); istreamNumber(); @@ -218,4 +257,4 @@ void setup() { testEnd(); } //------------------------------------------------------------------------------ -void loop() {} +void loop() {} \ No newline at end of file diff --git a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ostreamTest/ostreamTest.pde b/libs/SdFat-master/SdFatTestSuite/examples/ostreamTest/ostreamTest.ino similarity index 92% rename from libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ostreamTest/ostreamTest.pde rename to libs/SdFat-master/SdFatTestSuite/examples/ostreamTest/ostreamTest.ino index e3d4957..8c27438 100755 --- a/libs/SdFatBeta20120108/extra/SdFatTestSuite/examples/ostreamTest/ostreamTest.pde +++ b/libs/SdFat-master/SdFatTestSuite/examples/ostreamTest/ostreamTest.ino @@ -82,12 +82,19 @@ void ostreamNumber() { testVerifyStr(buf, "123456789-1-2-3-4-5-6"); ob.init(buf, sizeof(buf)); - s = ss = i = is = 0X8000; + s = ss = 0X8000; + i = is = sizeof(int) == 2 ? 0X8000 : 0X80000000; l = ls = 0X80000000; su = iu = lu = 0; - ob << su << iu << lu << s << ss << i << is; - testVerifyStr(buf, "000-32768-32768-32768-32768"); - + ob << su << iu << lu << s << ss; + testVerifyStr(buf, "000-32768-32768"); + ob.init(buf, sizeof(buf)); + ob << i << is; + if (sizeof(int) == 2) { + testVerifyStr(buf, "-32768-32768"); + } else { + testVerifyStr(buf, "-2147483648-2147483648"); + } ob.init(buf, sizeof(buf)); ob << l << ls; testVerifyStr(buf, "-2147483648-2147483648"); @@ -142,8 +149,8 @@ void ostreamStr() { const signed char* csc = (const signed char*)"CSC"; unsigned char *uc = (unsigned char *)"uc"; const unsigned char *cuc = (const unsigned char *)"CUC"; - ob << "lit" << c << cc << sc << csc << uc << cuc << pstr("pstr"); - testVerifyStr(buf, "litcCCscCSCucCUCpstr"); + ob << "lit" << c << cc << sc << csc << uc << cuc << pstr("pstr") << F("F"); + testVerifyStr(buf, "litcCCscCSCucCUCpstrF"); ob.init(buf, sizeof(buf)); ob << setfill('*') << "s" << setw(8) << "right"; @@ -152,8 +159,7 @@ void ostreamStr() { } //------------------------------------------------------------------------------ void setup() { - Serial.begin(9600); - testBegin(&Serial); + testBegin(); ostreamBool(); ostreamChar(); ostreamFloat(); diff --git a/libs/SdFatBeta20120108/SdLevel.png b/libs/SdFat-master/SdLevel.png similarity index 100% rename from libs/SdFatBeta20120108/SdLevel.png rename to libs/SdFat-master/SdLevel.png diff --git a/libs/SdFat-master/SoftwareSPI.txt b/libs/SdFat-master/SoftwareSPI.txt new file mode 100755 index 0000000..71e8b65 --- /dev/null +++ b/libs/SdFat-master/SoftwareSPI.txt @@ -0,0 +1,49 @@ +Software SPI is now supported on AVR, Due, and Teensy 3.x boards. + +Edit these variables in SdFatConfig.h to enable Software SPI. + +//------------------------------------------------------------------------------ +/** + * Define AVR_SOF_SPI nonzero to use software SPI on all AVR Arduinos. + */ +#define AVR_SOFT_SPI 0 +//------------------------------------------------------------------------------ +/** + * Define DUE_SOFT_SPI nonzero to use software SPI on Due Arduinos. + */ +#define DUE_SOFT_SPI 0 +//------------------------------------------------------------------------------ + +/** + * Define LEONARDO_SOFT_SPI nonzero to use software SPI on Leonardo Arduinos. + * LEONARDO_SOFT_SPI allows an unmodified 328 Shield to be used + * on Leonardo Arduinos. + */ +#define LEONARDO_SOFT_SPI 0 +//------------------------------------------------------------------------------ +/** + * Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos. + * MEGA_SOFT_SPI allows an unmodified 328 Shield to be used + * on Mega Arduinos. + */ +#define MEGA_SOFT_SPI 0 +//------------------------------------------------------------------------------ +/** + * Set TEENSY3_SOFT_SPI nonzero to use software SPI on Teensy 3.x boards. + */ +#define TEENSY3_SOFT_SPI 0 +//------------------------------------------------------------------------------ +/** + * Define software SPI pins. Default allows Uno shields to be used on other + * boards. + */ +// define software SPI pins +/** Default Software SPI chip select pin */ +uint8_t const SOFT_SPI_CS_PIN = 10; +/** Software SPI Master Out Slave In pin */ +uint8_t const SOFT_SPI_MOSI_PIN = 11; +/** Software SPI Master In Slave Out pin */ +uint8_t const SOFT_SPI_MISO_PIN = 12; +/** Software SPI Clock pin */ +uint8_t const SOFT_SPI_SCK_PIN = 13; + diff --git a/libs/SdFatBeta20120108/WorkingDirectory.txt b/libs/SdFat-master/WorkingDirectory.txt similarity index 100% rename from libs/SdFatBeta20120108/WorkingDirectory.txt rename to libs/SdFat-master/WorkingDirectory.txt diff --git a/libs/SdFatBeta20120108/changes.txt b/libs/SdFat-master/changes.txt similarity index 73% rename from libs/SdFatBeta20120108/changes.txt rename to libs/SdFat-master/changes.txt index 71fa8f0..0285461 100755 --- a/libs/SdFatBeta20120108/changes.txt +++ b/libs/SdFat-master/changes.txt @@ -1,3 +1,147 @@ +25 Oct 2014 + +Added File class for compatibility with the Arduino SD.h library + +Added StreamParseInt example. + +23 Oct 2014 + +Added Read SD OCR register. + +SdInfo example now prints OCR register. + +05 Sep 2014 + +Faster SdBaseFile::printField(); + +Added SdBaseFile::printField(float value, char term, uint8_t prec); + +24 Aug 2014 + +Added support for Software SPI on Due and Teensy 3.1 + +Added support for SPI transactions. + +05 Aug 2014 + +New examples. + +Teensy 3.x SPI mods. + +Test version of StdioStream. + +25 Dec 2013 + +Improved cluster allocation speed. + +Fix for Teensy 3.0 + +21 Jun 2013 + +Improved speed of single block write. + +Added StressTest example. + +04 May 2013 + +Fix FreeRam() for 1.05/1.53 malloc. + +Reorganised SPI code. + +SPI speed set by SCK divisor. + +Faster directory search in file open. + +Removed deprecated functions. + +13 Mar 2013 + +Fix for 1.0.4 malloc + +New Software SPI + +07 Feb 2013 + +Patch for 1.5.2 version of malloc. + +Updated SPI driver for Teensy 3.0 + +Added fast printField() functions. + +19 Dec 2012 + +Fixed SoftSPI bug + +01 Dec 2012 + +Added support for the Arduino Due. + +The default for ALLOW_DEPRECATED_FUNCTIONS has been changed to +false. If you get compile errors for these functions, either +change to the preferred replacement function indicated in the +error message or set ALLOW_DEPRECATED_FUNCTIONS nonzero. + +A key change was to remove sd.init(spiRateID, chipSelect) in favor of +sd.begin(chipSelect, spiRateID). The difference between these two is +the order of the arguments which has caused serious confusion at times. + +A massive number of internal changes have been made. There are over 2600 +lines in the diff file of this version and the 20120719 version. + +20 Oct 2012 + +Changes to support ARM processors. Tested with a Teensy 3.0. + +Changes for higher performance with large reads and writes. + +25 Aug 2012 + +Added uint32_t available(); + +Support for new industrial SD cards + +Better support for MiniSerial and MiniSerial example + +Changes to support newer versions of avr-gcc + +Changed RawWrite example to use micros() for delay between blocks. + +Changed SdFatSize example to use MiniSerial + +19 Jul 2012 + +Require Arduino 1.0 or greater. Change file type for all examples to *.ino. + +Modify the SdFormatter example to format SDXC cards as FAT32. This is not the +SDXC standard which is exFAT. + +30 May 2012 + +Added << operator for Arduino flash string macro F(). + +New RawWrite example for fast write of contiguous files. + +New faster software SPI + +Software SPI for Leonardo boards + +Don't use __cxa_pure_virtual by default for Arduino 1.0 or greater. + +26 Mar 2012 + +Removed definition for SS_PIN, MISO_PIN, MOSI_PIN, and SCK_PIN. Used the +Arduino 1.0 symbols SS, MISO, MOSI, and SCK. + +Added Arduino style SdFat::begin(chipSelect, spiSpeed); + +Added options for SD crc checking. Enabling crc checking increases reliability +at the cost of speed. Edit SdFatConfig.h to select CRC options. + +Override Print::getWriteError() and Print::clearWriteError() to use +SdBaseFile functions. + +Many internal changes. + 08 Jan 2012 Changes to allow use of the SerialPort library. diff --git a/libs/SdFat-master/html/_arduino_stream_8h.html b/libs/SdFat-master/html/_arduino_stream_8h.html new file mode 100755 index 0000000..f77db2a --- /dev/null +++ b/libs/SdFat-master/html/_arduino_stream_8h.html @@ -0,0 +1,92 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/ArduinoStream.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
ArduinoStream.h File Reference
+
+
+ +

ArduinoInStream and ArduinoOutStream classes. +More...

+
#include <bufstream.h>
+
+Include dependency graph for ArduinoStream.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + + + + +

+Classes

class  ArduinoInStream
 Input stream for Arduino Stream objects. More...
 
class  ArduinoOutStream
 Output stream for Arduino Print objects. More...
 
+

Detailed Description

+
+ + + + diff --git a/libs/SdFat-master/html/_arduino_stream_8h__dep__incl.png b/libs/SdFat-master/html/_arduino_stream_8h__dep__incl.png new file mode 100755 index 0000000..f1b5051 Binary files /dev/null and b/libs/SdFat-master/html/_arduino_stream_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/_arduino_stream_8h__incl.png b/libs/SdFat-master/html/_arduino_stream_8h__incl.png new file mode 100755 index 0000000..8a4d8e1 Binary files /dev/null and b/libs/SdFat-master/html/_arduino_stream_8h__incl.png differ diff --git a/libs/SdFat-master/html/_sd2_card_8h.html b/libs/SdFat-master/html/_sd2_card_8h.html new file mode 100755 index 0000000..d394773 --- /dev/null +++ b/libs/SdFat-master/html/_sd2_card_8h.html @@ -0,0 +1,562 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/Sd2Card.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
Sd2Card.h File Reference
+
+
+ +

Sd2Card class for V2 SD/SDHC cards. +More...

+
#include <Arduino.h>
+#include <SdFatConfig.h>
+#include <SdInfo.h>
+#include <SdSpi.h>
+
+Include dependency graph for Sd2Card.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + +

+Classes

class  Sd2Card
 Raw access to SD and SDHC flash memory cards. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Variables

uint8_t const SD_CARD_ERROR_ACMD23 = 0X9
 
uint8_t const SD_CARD_ERROR_ACMD41 = 0XA
 
uint8_t const SD_CARD_ERROR_BAD_CSD = 0XB
 
uint8_t const SD_CARD_ERROR_CMD0 = 0X1
 
uint8_t const SD_CARD_ERROR_CMD12 = 0X3
 
uint8_t const SD_CARD_ERROR_CMD17 = 0X4
 
uint8_t const SD_CARD_ERROR_CMD18 = 0X5
 
uint8_t const SD_CARD_ERROR_CMD24 = 0X6
 
uint8_t const SD_CARD_ERROR_CMD25 = 0X7
 
uint8_t const SD_CARD_ERROR_CMD58 = 0X8
 
uint8_t const SD_CARD_ERROR_CMD59 = 0X1A
 
uint8_t const SD_CARD_ERROR_CMD8 = 0X2
 
uint8_t const SD_CARD_ERROR_ERASE = 0XC
 
uint8_t const SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD
 
uint8_t const SD_CARD_ERROR_ERASE_TIMEOUT = 0XE
 
uint8_t const SD_CARD_ERROR_INIT_NOT_CALLED = 0X19
 
uint8_t const SD_CARD_ERROR_READ = 0XF
 
uint8_t const SD_CARD_ERROR_READ_CRC = 0X1B
 
uint8_t const SD_CARD_ERROR_READ_REG = 0X10
 
uint8_t const SD_CARD_ERROR_READ_TIMEOUT = 0X11
 
uint8_t const SD_CARD_ERROR_SCK_RATE = 0X18
 
uint8_t const SD_CARD_ERROR_SPI_DMA = 0X1C
 
uint8_t const SD_CARD_ERROR_STOP_TRAN = 0X12
 
uint8_t const SD_CARD_ERROR_WRITE = 0X13
 
uint8_t const SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0X14
 
uint8_t const SD_CARD_ERROR_WRITE_MULTIPLE = 0X15
 
uint8_t const SD_CARD_ERROR_WRITE_PROGRAMMING = 0X16
 
uint8_t const SD_CARD_ERROR_WRITE_TIMEOUT = 0X17
 
uint8_t const SD_CARD_TYPE_SD1 = 1
 
uint8_t const SD_CARD_TYPE_SD2 = 2
 
uint8_t const SD_CARD_TYPE_SDHC = 3
 
+

Detailed Description

+

Sd2Card class for V2 SD/SDHC cards.

+

Variable Documentation

+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_ACMD23 = 0X9
+
+

SET_WR_BLK_ERASE_COUNT failed

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_ACMD41 = 0XA
+
+

ACMD41 initialization process timeout

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_BAD_CSD = 0XB
+
+

card returned a bad CSR version field

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_CMD0 = 0X1
+
+

timeout error for command CMD0 (initialize card in SPI mode)

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_CMD12 = 0X3
+
+

card returned an error response for CMD12 (stop multiblock read)

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_CMD17 = 0X4
+
+

card returned an error response for CMD17 (read block)

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_CMD18 = 0X5
+
+

card returned an error response for CMD18 (read multiple block)

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_CMD24 = 0X6
+
+

card returned an error response for CMD24 (write block)

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_CMD25 = 0X7
+
+

WRITE_MULTIPLE_BLOCKS command failed

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_CMD58 = 0X8
+
+

card returned an error response for CMD58 (read OCR)

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_CMD59 = 0X1A
+
+

card returned an error for CMD59 (CRC_ON_OFF)

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_CMD8 = 0X2
+
+

CMD8 was not accepted - not a valid SD card

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_ERASE = 0XC
+
+

erase block group command failed

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD
+
+

card not capable of single block erase

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_ERASE_TIMEOUT = 0XE
+
+

Erase sequence timed out

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_INIT_NOT_CALLED = 0X19
+
+

init() not called

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_READ = 0XF
+
+

card returned an error token instead of read data

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_READ_CRC = 0X1B
+
+

invalid read CRC

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_READ_REG = 0X10
+
+

read CID or CSD failed

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_READ_TIMEOUT = 0X11
+
+

timeout while waiting for start of read data

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_SCK_RATE = 0X18
+
+

incorrect rate selected

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_SPI_DMA = 0X1C
+
+

SPI DMA error

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_STOP_TRAN = 0X12
+
+

card did not accept STOP_TRAN_TOKEN

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_WRITE = 0X13
+
+

card returned an error token as a response to a write operation

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0X14
+
+

attempt to write protected block zero

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_WRITE_MULTIPLE = 0X15
+
+

card did not go ready for a multiple block write

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_WRITE_PROGRAMMING = 0X16
+
+

card returned an error to a CMD13 status check after a write

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_ERROR_WRITE_TIMEOUT = 0X17
+
+

timeout occurred during write programming

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_TYPE_SD1 = 1
+
+

Standard capacity V1 SD card

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_TYPE_SD2 = 2
+
+

Standard capacity V2 SD card

+ +
+
+ +
+
+ + + + +
uint8_t const SD_CARD_TYPE_SDHC = 3
+
+

High Capacity SD card

+ +
+
+
+ + + + diff --git a/libs/SdFat-master/html/_sd2_card_8h__dep__incl.png b/libs/SdFat-master/html/_sd2_card_8h__dep__incl.png new file mode 100755 index 0000000..9806aeb Binary files /dev/null and b/libs/SdFat-master/html/_sd2_card_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/_sd2_card_8h__incl.png b/libs/SdFat-master/html/_sd2_card_8h__incl.png new file mode 100755 index 0000000..32dbf13 Binary files /dev/null and b/libs/SdFat-master/html/_sd2_card_8h__incl.png differ diff --git a/libs/SdFat-master/html/_sd_base_file_8h.html b/libs/SdFat-master/html/_sd_base_file_8h.html new file mode 100755 index 0000000..f353a14 --- /dev/null +++ b/libs/SdFat-master/html/_sd_base_file_8h.html @@ -0,0 +1,282 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/SdBaseFile.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
SdBaseFile.h File Reference
+
+
+ +

SdBaseFile class. +More...

+
#include <Arduino.h>
+#include <SdFatConfig.h>
+#include <SdVolume.h>
+#include <utility/FatApiConstants.h>
+
+Include dependency graph for SdBaseFile.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + + + + +

+Classes

struct  FatPos_t
 internal type for istream do not use in user apps More...
 
class  SdBaseFile
 Base class for SdFile with Print and C++ streams. More...
 
+ + + + + + + + + + + +

+Macros

#define PGM_P   const char*
 
#define pgm_read_byte(addr)   (*(const unsigned char*)(addr))
 
#define pgm_read_word(addr)   (*(const uint16_t*)(addr))
 
#define PROGMEM   const
 
#define PSTR(x)   (x)
 
+ + + + + + + + + + + + + +

+Variables

uint8_t const FAT_FILE_TYPE_CLOSED = 0
 
uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED
 
uint8_t const FAT_FILE_TYPE_NORMAL = 1
 
uint8_t const FAT_FILE_TYPE_ROOT32 = 3
 
uint8_t const FAT_FILE_TYPE_ROOT_FIXED = 2
 
uint8_t const FAT_FILE_TYPE_SUBDIR = 4
 
+

Detailed Description

+

SdBaseFile class.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define PGM_P   const char*
+
+

pointer to flash for ARM

+ +
+
+ +
+
+ + + + + + + + +
#define pgm_read_byte( addr)   (*(const unsigned char*)(addr))
+
+

read 8-bits from flash for ARM

+ +
+
+ +
+
+ + + + + + + + +
#define pgm_read_word( addr)   (*(const uint16_t*)(addr))
+
+

read 16-bits from flash for ARM

+ +
+
+ +
+
+ + + + +
#define PROGMEM   const
+
+

store in flash for ARM

+ +
+
+ +
+
+ + + + + + + + +
#define PSTR( x)   (x)
+
+

store literal string in flash for ARM

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
uint8_t const FAT_FILE_TYPE_CLOSED = 0
+
+

This file has not been opened.

+ +
+
+ +
+
+ + + + +
uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED
+
+

Test value for directory type

+ +
+
+ +
+
+ + + + +
uint8_t const FAT_FILE_TYPE_NORMAL = 1
+
+

A normal file

+ +
+
+ +
+
+ + + + +
uint8_t const FAT_FILE_TYPE_ROOT32 = 3
+
+

A FAT32 root directory

+ +
+
+ +
+
+ + + + +
uint8_t const FAT_FILE_TYPE_ROOT_FIXED = 2
+
+

A FAT12 or FAT16 root directory

+ +
+
+ +
+
+ + + + +
uint8_t const FAT_FILE_TYPE_SUBDIR = 4
+
+

A subdirectory file

+ +
+
+
+ + + + diff --git a/libs/SdFat-master/html/_sd_base_file_8h__dep__incl.png b/libs/SdFat-master/html/_sd_base_file_8h__dep__incl.png new file mode 100755 index 0000000..6e41d31 Binary files /dev/null and b/libs/SdFat-master/html/_sd_base_file_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/_sd_base_file_8h__incl.png b/libs/SdFat-master/html/_sd_base_file_8h__incl.png new file mode 100755 index 0000000..8b70887 Binary files /dev/null and b/libs/SdFat-master/html/_sd_base_file_8h__incl.png differ diff --git a/libs/SdFat-master/html/_sd_fat_8h.html b/libs/SdFat-master/html/_sd_fat_8h.html new file mode 100755 index 0000000..f7836af --- /dev/null +++ b/libs/SdFat-master/html/_sd_fat_8h.html @@ -0,0 +1,128 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/SdFat.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
SdFat.h File Reference
+
+
+ +

SdFat class. +More...

+
#include <SdFile.h>
+#include <SdStream.h>
+#include <StdioStream.h>
+#include <ArduinoStream.h>
+#include <MinimumSerial.h>
+
+Include dependency graph for SdFat.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + +

+Classes

class  SdFat
 Integration class for the SdFat library. More...
 
+ + + + + +

+Macros

#define DBG_FAIL_MACRO
 
#define SD_FAT_VERSION   20141025
 
+

Detailed Description

+

SdFat class.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define DBG_FAIL_MACRO
+
+

Macro for debug.

+ +
+
+ +
+
+ + + + +
#define SD_FAT_VERSION   20141025
+
+

SdFat version YYYYMMDD

+ +
+
+
+ + + + diff --git a/libs/SdFat-master/html/_sd_fat_8h__dep__incl.png b/libs/SdFat-master/html/_sd_fat_8h__dep__incl.png new file mode 100755 index 0000000..3909a34 Binary files /dev/null and b/libs/SdFat-master/html/_sd_fat_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/_sd_fat_8h__incl.png b/libs/SdFat-master/html/_sd_fat_8h__incl.png new file mode 100755 index 0000000..c67a5d3 Binary files /dev/null and b/libs/SdFat-master/html/_sd_fat_8h__incl.png differ diff --git a/libs/SdFat-master/html/_sd_fat_config_8h.html b/libs/SdFat-master/html/_sd_fat_config_8h.html new file mode 100755 index 0000000..86d7206 --- /dev/null +++ b/libs/SdFat-master/html/_sd_fat_config_8h.html @@ -0,0 +1,437 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/SdFatConfig.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
SdFatConfig.h File Reference
+
+
+ +

configuration definitions +More...

+
#include <stdint.h>
+
+Include dependency graph for SdFatConfig.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

#define AVR_SOFT_SPI   0
 
#define DESTRUCTOR_CLOSES_FILE   0
 
#define DUE_SOFT_SPI   0
 
#define ENABLE_SPI_TRANSACTION   0
 
#define ENABLE_SPI_YIELD   0
 
#define ENDL_CALLS_FLUSH   0
 
#define FAT12_SUPPORT   0
 
#define LEONARDO_SOFT_SPI   0
 
#define MEGA_SOFT_SPI   0
 
#define SD_FILE_USES_STREAM   0
 
#define TEENSY3_SOFT_SPI   0
 
#define USE_ARDUINO_SPI_LIBRARY   0
 
#define USE_MULTI_BLOCK_SD_IO   1
 
#define USE_MULTIPLE_CARDS   0
 
#define USE_SD_CRC   0
 
#define USE_SEPARATE_FAT_CACHE   0
 
#define USE_SERIAL_FOR_STD_OUT   0
 
+ + + + + + + + + + + +

+Variables

uint8_t const SOFT_SPI_CS_PIN = 10
 
uint8_t const SOFT_SPI_MISO_PIN = 12
 
uint8_t const SOFT_SPI_MOSI_PIN = 11
 
uint8_t const SOFT_SPI_SCK_PIN = 13
 
const uint8_t SPI_SCK_INIT_DIVISOR = 128
 
+

Detailed Description

+

configuration definitions

+

Macro Definition Documentation

+ +
+
+ + + + +
#define AVR_SOFT_SPI   0
+
+

Set AVR_SOFT_SPI nonzero to use software SPI on all AVR Arduinos.

+ +
+
+ +
+
+ + + + +
#define DESTRUCTOR_CLOSES_FILE   0
+
+

Set DESTRUCTOR_CLOSES_FILE nonzero to close a file in its destructor.

+

Causes use of lots of heap in ARM.

+ +
+
+ +
+
+ + + + +
#define DUE_SOFT_SPI   0
+
+

Set DUE_SOFT_SPI nonzero to use software SPI on Due Arduinos.

+ +
+
+ +
+
+ + + + +
#define ENABLE_SPI_TRANSACTION   0
+
+

Set ENABLE_SPI_TRANSACTION nonzero to enable the SPI transaction feature of the standard Arduino SPI library. You must include SPI.h in your sketches when ENABLE_SPI_TRANSACTION is nonzero.

+ +
+
+ +
+
+ + + + +
#define ENABLE_SPI_YIELD   0
+
+

Set ENABLE_SPI_YIELD nonzero to enable release of the SPI bus during SD card busy waits.

+

This will allow interrupt routines to access the SPI bus if ENABLE_SPI_TRANSACTION is nonzero.

+

Setting ENABLE_SPI_YIELD will introduce some extra overhead and will slightly slow transfer rates. A few older SD cards may fail when ENABLE_SPI_YIELD is nonzero.

+ +
+
+ +
+
+ + + + +
#define ENDL_CALLS_FLUSH   0
+
+

Call flush for endl if ENDL_CALLS_FLUSH is nonzero

+

The standard for iostreams is to call flush. This is very costly for SdFat. Each call to flush causes 2048 bytes of I/O to the SD.

+

SdFat has a single 512 byte buffer for SD I/O so it must write the current data block to the SD, read the directory block from the SD, update the directory entry, write the directory block to the SD and read the data block back into the buffer.

+

The SD flash memory controller is not designed for this many rewrites so performance may be reduced by more than a factor of 100.

+

If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force all data to be written to the SD.

+ +
+
+ +
+
+ + + + +
#define FAT12_SUPPORT   0
+
+

Set FAT12_SUPPORT nonzero to enable use if FAT12 volumes. FAT12 has not been well tested and requires additional flash.

+ +
+
+ +
+
+ + + + +
#define LEONARDO_SOFT_SPI   0
+
+

Set LEONARDO_SOFT_SPI nonzero to use software SPI on Leonardo Arduinos. LEONARDO_SOFT_SPI allows an unmodified 328 Shield to be used on Leonardo Arduinos.

+ +
+
+ +
+
+ + + + +
#define MEGA_SOFT_SPI   0
+
+

Set MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos. MEGA_SOFT_SPI allows an unmodified 328 Shield to be used on Mega Arduinos.

+ +
+
+ +
+
+ + + + +
#define SD_FILE_USES_STREAM   0
+
+

Set SD_FILE_USES_STREAM nonzero to use Stream instead of Print for SdFile. Using Stream will use more flash and may cause compatibility problems with code written for older versions of SdFat.

+ +
+
+ +
+
+ + + + +
#define TEENSY3_SOFT_SPI   0
+
+

Set TEENSY3_SOFT_SPI nonzero to use software SPI on Teensy 3.x boards.

+ +
+
+ +
+
+ + + + +
#define USE_ARDUINO_SPI_LIBRARY   0
+
+

Set USE_ARDUINO_SPI_LIBRARY nonzero to force use of Arduino Standard SPI library. This will override native and software SPI for all boards.

+ +
+
+ +
+
+ + + + +
#define USE_MULTI_BLOCK_SD_IO   1
+
+

Set USE_MULTI_BLOCK_SD_IO nonzero to use multi-block SD read/write.

+

Don't use mult-block read/write on small AVR boards.

+ +
+
+ +
+
+ + + + +
#define USE_MULTIPLE_CARDS   0
+
+

To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.

+

Using multiple cards costs about 200 bytes of flash.

+

Each card requires about 550 bytes of SRAM so use of a Mega is recommended.

+ +
+
+ +
+
+ + + + +
#define USE_SD_CRC   0
+
+

To enable SD card CRC checking set USE_SD_CRC nonzero.

+

Set USE_SD_CRC to 1 to use a smaller slower CRC-CCITT function.

+

Set USE_SD_CRC to 2 to used a larger faster table driven CRC-CCITT function.

+ +
+
+ +
+
+ + + + +
#define USE_SEPARATE_FAT_CACHE   0
+
+

Set USE_SEPARATE_FAT_CACHE nonzero to use a second 512 byte cache for FAT table entries. Improves performance for large writes that are not a multiple of 512 bytes.

+ +
+
+ +
+
+ + + + +
#define USE_SERIAL_FOR_STD_OUT   0
+
+

For AVR

+

Set USE_SERIAL_FOR_STD_OUT nonzero to use Serial (the HardwareSerial class) for error messages and output from print functions like ls().

+

If USE_SERIAL_FOR_STD_OUT is zero, a small non-interrupt driven class is used to output messages to serial port zero. This allows an alternate Serial library like SerialPort to be used with SdFat.

+

You can redirect stdOut with SdFat::setStdOut(Print* stream) and get the current stream with SdFat::stdOut().

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
uint8_t const SOFT_SPI_CS_PIN = 10
+
+

Define software SPI pins. Default allows Uno shields to be used on other boards.Default Software SPI chip select pin

+ +
+
+ +
+
+ + + + +
uint8_t const SOFT_SPI_MISO_PIN = 12
+
+

Software SPI Master In Slave Out pin

+ +
+
+ +
+
+ + + + +
uint8_t const SOFT_SPI_MOSI_PIN = 11
+
+

Software SPI Master Out Slave In pin

+ +
+
+ +
+
+ + + + +
uint8_t const SOFT_SPI_SCK_PIN = 13
+
+

Software SPI Clock pin

+ +
+
+ +
+
+ + + + +
const uint8_t SPI_SCK_INIT_DIVISOR = 128
+
+

SPI SCK divisor for SD initialization commands. or greater

+ +
+
+
+ + + + diff --git a/libs/SdFat-master/html/_sd_fat_config_8h__dep__incl.png b/libs/SdFat-master/html/_sd_fat_config_8h__dep__incl.png new file mode 100755 index 0000000..dfe5981 Binary files /dev/null and b/libs/SdFat-master/html/_sd_fat_config_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/_sd_fat_config_8h__incl.png b/libs/SdFat-master/html/_sd_fat_config_8h__incl.png new file mode 100755 index 0000000..27b925d Binary files /dev/null and b/libs/SdFat-master/html/_sd_fat_config_8h__incl.png differ diff --git a/libs/SdFat-master/html/_sd_fat_util_8h.html b/libs/SdFat-master/html/_sd_fat_util_8h.html new file mode 100755 index 0000000..0019295 --- /dev/null +++ b/libs/SdFat-master/html/_sd_fat_util_8h.html @@ -0,0 +1,132 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/SdFatUtil.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
SdFatUtil.h File Reference
+
+
+ +

Useful utility functions. +More...

+
#include <SdFat.h>
+
+Include dependency graph for SdFatUtil.h:
+
+
+ + +
+
+ + + + + +

+Macros

#define PgmPrint(x)   SerialPrint_P(PSTR(x))
 
#define PgmPrintln(x)   SerialPrintln_P(PSTR(x))
 
+ + + + + + + + + + + +

+Functions

int SdFatUtil::FreeRam ()
 
void SdFatUtil::print_P (Print *pr, PGM_P str)
 
void SdFatUtil::println_P (Print *pr, PGM_P str)
 
void SdFatUtil::SerialPrint_P (PGM_P str)
 
void SdFatUtil::SerialPrintln_P (PGM_P str)
 
+

Detailed Description

+

Useful utility functions.

+

Macro Definition Documentation

+ +
+
+ + + + + + + + +
#define PgmPrint( x)   SerialPrint_P(PSTR(x))
+
+

Store and print a string in flash memory.

+ +
+
+ +
+
+ + + + + + + + +
#define PgmPrintln( x)   SerialPrintln_P(PSTR(x))
+
+

Store and print a string in flash memory followed by a CR/LF.

+ +
+
+
+ + + + diff --git a/libs/SdFat-master/html/_sd_fat_util_8h__incl.png b/libs/SdFat-master/html/_sd_fat_util_8h__incl.png new file mode 100755 index 0000000..2cddf1f Binary files /dev/null and b/libs/SdFat-master/html/_sd_fat_util_8h__incl.png differ diff --git a/libs/SdFat-master/html/_sd_file_8h.html b/libs/SdFat-master/html/_sd_file_8h.html new file mode 100755 index 0000000..1a95e0c --- /dev/null +++ b/libs/SdFat-master/html/_sd_file_8h.html @@ -0,0 +1,128 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/SdFile.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
SdFile.h File Reference
+
+
+ +

SdFile class. +More...

+
#include <limits.h>
+#include <SdBaseFile.h>
+
+Include dependency graph for SdFile.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + + + + +

+Classes

class  File
 Arduino SD.h style File API. More...
 
class  SdFile
 SdBaseFile with Arduino Stream. More...
 
+ + + + + +

+Macros

#define FILE_READ   O_READ
 
#define FILE_WRITE   (O_RDWR | O_CREAT | O_AT_END)
 
+

Detailed Description

+

SdFile class.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define FILE_READ   O_READ
+
+

Arduino SD.h style flag for open for read.

+ +
+
+ +
+
+ + + + +
#define FILE_WRITE   (O_RDWR | O_CREAT | O_AT_END)
+
+

Arduino SD.h style flag for open at EOF for read/write with create.

+ +
+
+
+ + + + diff --git a/libs/SdFat-master/html/_sd_file_8h__dep__incl.png b/libs/SdFat-master/html/_sd_file_8h__dep__incl.png new file mode 100755 index 0000000..a8e863f Binary files /dev/null and b/libs/SdFat-master/html/_sd_file_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/_sd_file_8h__incl.png b/libs/SdFat-master/html/_sd_file_8h__incl.png new file mode 100755 index 0000000..410d1a6 Binary files /dev/null and b/libs/SdFat-master/html/_sd_file_8h__incl.png differ diff --git a/libs/SdFat-master/html/_sd_spi_8h.html b/libs/SdFat-master/html/_sd_spi_8h.html new file mode 100755 index 0000000..ec62a17 --- /dev/null +++ b/libs/SdFat-master/html/_sd_spi_8h.html @@ -0,0 +1,130 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/SdSpi.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
SdSpi.h File Reference
+
+
+ +

SdSpi class for V2 SD/SDHC cards. +More...

+
#include <Arduino.h>
+#include <SdFatConfig.h>
+
+Include dependency graph for SdSpi.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + +

+Classes

class  SdSpi
 SPI class for access to SD and SDHC flash memory cards. More...
 
+ + + +

+Macros

#define USE_AVR_NATIVE_SPI_INLINE   1
 
+ + + +

+Variables

uint8_t const SD_CHIP_SELECT_PIN = SS
 
+

Detailed Description

+

SdSpi class for V2 SD/SDHC cards.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define USE_AVR_NATIVE_SPI_INLINE   1
+
+

inline avr native functions if nonzero.

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
uint8_t const SD_CHIP_SELECT_PIN = SS
+
+

The default chip select pin for the SD card is SS.

+ +
+
+
+ + + + diff --git a/libs/SdFat-master/html/_sd_spi_8h__dep__incl.png b/libs/SdFat-master/html/_sd_spi_8h__dep__incl.png new file mode 100755 index 0000000..384d600 Binary files /dev/null and b/libs/SdFat-master/html/_sd_spi_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/_sd_spi_8h__incl.png b/libs/SdFat-master/html/_sd_spi_8h__incl.png new file mode 100755 index 0000000..f139ffd Binary files /dev/null and b/libs/SdFat-master/html/_sd_spi_8h__incl.png differ diff --git a/libs/SdFat-master/html/_sd_stream_8h.html b/libs/SdFat-master/html/_sd_stream_8h.html new file mode 100755 index 0000000..0164f2e --- /dev/null +++ b/libs/SdFat-master/html/_sd_stream_8h.html @@ -0,0 +1,99 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/SdStream.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
SdStream.h File Reference
+
+
+ +

fstream, ifstream, and ofstream classes +More...

+
#include <SdBaseFile.h>
+#include <iostream.h>
+
+Include dependency graph for SdStream.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + + + + + + + + + + +

+Classes

class  fstream
 SD file input/output stream. More...
 
class  ifstream
 SD file input stream. More...
 
class  ofstream
 SD card output stream. More...
 
class  SdStreamBase
 Base class for SD streams. More...
 
+

Detailed Description

+

fstream, ifstream, and ofstream classes

+
+ + + + diff --git a/libs/SdFat-master/html/_sd_stream_8h__dep__incl.png b/libs/SdFat-master/html/_sd_stream_8h__dep__incl.png new file mode 100755 index 0000000..921e0e5 Binary files /dev/null and b/libs/SdFat-master/html/_sd_stream_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/_sd_stream_8h__incl.png b/libs/SdFat-master/html/_sd_stream_8h__incl.png new file mode 100755 index 0000000..b396434 Binary files /dev/null and b/libs/SdFat-master/html/_sd_stream_8h__incl.png differ diff --git a/libs/SdFat-master/html/_sd_volume_8h.html b/libs/SdFat-master/html/_sd_volume_8h.html new file mode 100755 index 0000000..dcfe783 --- /dev/null +++ b/libs/SdFat-master/html/_sd_volume_8h.html @@ -0,0 +1,94 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/SdVolume.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
SdVolume.h File Reference
+
+
+ +

SdVolume class. +More...

+
#include <SdFatConfig.h>
+#include <Sd2Card.h>
+#include <utility/FatStructs.h>
+
+Include dependency graph for SdVolume.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + + + + +

+Classes

union  cache_t
 Cache for an SD data block. More...
 
class  SdVolume
 Access FAT16 and FAT32 volumes on SD and SDHC cards. More...
 
+

Detailed Description

+

SdVolume class.

+
+ + + + diff --git a/libs/SdFat-master/html/_sd_volume_8h__dep__incl.png b/libs/SdFat-master/html/_sd_volume_8h__dep__incl.png new file mode 100755 index 0000000..0a577be Binary files /dev/null and b/libs/SdFat-master/html/_sd_volume_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/_sd_volume_8h__incl.png b/libs/SdFat-master/html/_sd_volume_8h__incl.png new file mode 100755 index 0000000..543574c Binary files /dev/null and b/libs/SdFat-master/html/_sd_volume_8h__incl.png differ diff --git a/libs/SdFat-master/html/_stdio_stream_8h.html b/libs/SdFat-master/html/_stdio_stream_8h.html new file mode 100755 index 0000000..a1201eb --- /dev/null +++ b/libs/SdFat-master/html/_stdio_stream_8h.html @@ -0,0 +1,208 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/StdioStream.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
StdioStream.h File Reference
+
+
+ +

StdioStream class. +More...

+
#include <limits.h>
+#include <Arduino.h>
+#include <SdFat.h>
+#include <SdBaseFile.h>
+#include <stdio.h>
+
+Include dependency graph for StdioStream.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + +

+Classes

class  StdioStream
 StdioStream implements a minimal stdio stream. More...
 
+ + + + + + + + + + + +

+Macros

#define EOF   (-1)
 
#define NULL   0
 
#define SEEK_CUR   1
 
#define SEEK_END   2
 
#define SEEK_SET   0
 
+ + + + + +

+Variables

const uint8_t STREAM_BUF_SIZE = 64
 
const uint8_t UNGETC_BUF_SIZE = 2
 
+

Detailed Description

+

StdioStream class.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define EOF   (-1)
+
+

End-of-file return value.

+ +
+
+ +
+
+ + + + +
#define NULL   0
+
+

Null pointer

+ +
+
+ +
+
+ + + + +
#define SEEK_CUR   1
+
+

Seek relative to current position.

+ +
+
+ +
+
+ + + + +
#define SEEK_END   2
+
+

Seek relative to end-of-file.

+ +
+
+ +
+
+ + + + +
#define SEEK_SET   0
+
+

Seek relative to start-of-file.

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
const uint8_t STREAM_BUF_SIZE = 64
+
+

Total size of stream buffer. The entire buffer is used for output. During input UNGETC_BUF_SIZE of this space is reserved for ungetc.

+ +
+
+ +
+
+ + + + +
const uint8_t UNGETC_BUF_SIZE = 2
+
+

Amount of buffer allocated for ungetc during input.

+ +
+
+
+ + + + diff --git a/libs/SdFat-master/html/_stdio_stream_8h__dep__incl.png b/libs/SdFat-master/html/_stdio_stream_8h__dep__incl.png new file mode 100755 index 0000000..ff83845 Binary files /dev/null and b/libs/SdFat-master/html/_stdio_stream_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/_stdio_stream_8h__incl.png b/libs/SdFat-master/html/_stdio_stream_8h__incl.png new file mode 100755 index 0000000..183820d Binary files /dev/null and b/libs/SdFat-master/html/_stdio_stream_8h__incl.png differ diff --git a/libs/SdFat-master/html/annotated.html b/libs/SdFat-master/html/annotated.html new file mode 100755 index 0000000..3d31fab --- /dev/null +++ b/libs/SdFat-master/html/annotated.html @@ -0,0 +1,89 @@ + + + + + + +SdFat: Class List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 CArduinoInStreamInput stream for Arduino Stream objects
 CArduinoOutStreamOutput stream for Arduino Print objects
 Ccache_tCache for an SD data block
 CFatPos_tInternal type for istream do not use in user apps
 CFileArduino SD.h style File API
 CfstreamSD file input/output stream
 CibufstreamParse a char string
 CifstreamSD file input stream
 CiosError and state information for all streams
 Cios_baseBase class for all streams
 CiostreamInput/Output stream
 CistreamInput Stream
 CMinimumSerialMini serial class for the SdFat library
 CobufstreamFormat a char string
 CofstreamSD card output stream
 CostreamOutput Stream
 CpgmType for string in flash
 CSd2CardRaw access to SD and SDHC flash memory cards
 CSdBaseFileBase class for SdFile with Print and C++ streams
 CSdFatIntegration class for the SdFat library
 CSdFileSdBaseFile with Arduino Stream
 CSdSpiSPI class for access to SD and SDHC flash memory cards
 CSdStreamBaseBase class for SD streams
 CSdVolumeAccess FAT16 and FAT32 volumes on SD and SDHC cards
 CsetfillType for setfill manipulator
 CsetprecisionType for setprecision manipulator
 CsetwType for setw manipulator
 CStdioStreamStdioStream implements a minimal stdio stream
+
+
+ + + + diff --git a/libs/SdFat-master/html/bc_s.png b/libs/SdFat-master/html/bc_s.png new file mode 100755 index 0000000..224b29a Binary files /dev/null and b/libs/SdFat-master/html/bc_s.png differ diff --git a/libs/SdFat-master/html/bdwn.png b/libs/SdFat-master/html/bdwn.png new file mode 100755 index 0000000..940a0b9 Binary files /dev/null and b/libs/SdFat-master/html/bdwn.png differ diff --git a/libs/SdFat-master/html/bufstream_8h.html b/libs/SdFat-master/html/bufstream_8h.html new file mode 100755 index 0000000..af06755 --- /dev/null +++ b/libs/SdFat-master/html/bufstream_8h.html @@ -0,0 +1,92 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/bufstream.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
bufstream.h File Reference
+
+
+ +

ibufstream and obufstream classes +More...

+
#include <iostream.h>
+
+Include dependency graph for bufstream.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + + + + +

+Classes

class  ibufstream
 parse a char string More...
 
class  obufstream
 format a char string More...
 
+

Detailed Description

+

ibufstream and obufstream classes

+
+ + + + diff --git a/libs/SdFat-master/html/bufstream_8h__dep__incl.png b/libs/SdFat-master/html/bufstream_8h__dep__incl.png new file mode 100755 index 0000000..d704fe2 Binary files /dev/null and b/libs/SdFat-master/html/bufstream_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/bufstream_8h__incl.png b/libs/SdFat-master/html/bufstream_8h__incl.png new file mode 100755 index 0000000..76258a4 Binary files /dev/null and b/libs/SdFat-master/html/bufstream_8h__incl.png differ diff --git a/libs/SdFat-master/html/class_arduino_in_stream-members.html b/libs/SdFat-master/html/class_arduino_in_stream-members.html new file mode 100755 index 0000000..4cde3c6 --- /dev/null +++ b/libs/SdFat-master/html/class_arduino_in_stream-members.html @@ -0,0 +1,155 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
ArduinoInStream Member List
+
+
+ +

This is the complete list of members for ArduinoInStream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ArduinoInStream(Stream &hws, char *buf, size_t size)ArduinoInStreaminline
ateios_basestatic
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
clear(iostate state=goodbit)iosinline
cur enum valueios_base
decios_basestatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
fail() const iosinline
failbitios_basestatic
fill()ios_baseinline
fill(char c)ios_baseinline
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
fmtflags typedefios_base
gcount() const istreaminline
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getline(char *str, streamsize count, char delim= '\n')istream
good() const iosinline
goodbitios_basestatic
hexios_basestatic
ibufstream()ibufstreaminline
ibufstream(const char *str)ibufstreaminlineexplicit
ignore(streamsize n=1, int delim=-1)istream
inios_basestatic
init(const char *str)ibufstreaminline
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
istream() (defined in istream)istreaminline
leftios_basestatic
octios_basestatic
off_type typedefios_base
openmode typedefios_base
operator const void *() const iosinline
operator!() const iosinline
operator>>(istream &(*pf)(istream &str))istreaminline
operator>>(ios_base &(*pf)(ios_base &str))istreaminline
operator>>(ios &(*pf)(ios &str))istreaminline
operator>>(char *str)istreaminline
operator>>(char &ch)istreaminline
operator>>(signed char *str)istreaminline
operator>>(signed char &ch)istreaminline
operator>>(unsigned char *str)istreaminline
operator>>(unsigned char &ch)istreaminline
operator>>(bool &arg)istreaminline
operator>>(short &arg)istreaminline
operator>>(unsigned short &arg)istreaminline
operator>>(int &arg)istreaminline
operator>>(unsigned int &arg)istreaminline
operator>>(long &arg)istreaminline
operator>>(unsigned long &arg)istreaminline
operator>>(double &arg)istreaminline
operator>>(float &arg)istreaminline
operator>>(void *&arg)istreaminline
outios_basestatic
peek()istream
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
rdstate() const iosinline
readline()ArduinoInStreaminline
rightios_basestatic
seekdir enum nameios_base
seekg(pos_type pos)istreaminline
seekg(off_type off, seekdir way)istreaminline
seekoff(off_type off, seekdir way)ArduinoInStreaminlineprotected
seekpos(pos_type pos)ArduinoInStreaminlineprotected
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipWhite()istream
skipwsios_basestatic
streamsize typedefios_base
tellg()istreaminline
truncios_basestatic
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
width()ios_baseinline
width(unsigned n)ios_baseinline
+ + + + diff --git a/libs/SdFat-master/html/class_arduino_in_stream.html b/libs/SdFat-master/html/class_arduino_in_stream.html new file mode 100755 index 0000000..406ad2f --- /dev/null +++ b/libs/SdFat-master/html/class_arduino_in_stream.html @@ -0,0 +1,2664 @@ + + + + + + +SdFat: ArduinoInStream Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

Input stream for Arduino Stream objects. + More...

+ +

#include <ArduinoStream.h>

+
+Inheritance diagram for ArduinoInStream:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for ArduinoInStream:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 ArduinoInStream (Stream &hws, char *buf, size_t size)
 
bool bad () const
 
void clear (iostate state=goodbit)
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
streamsize gcount () const
 
int get ()
 
istreamget (char &ch)
 
istreamget (char *str, streamsize n, char delim= '\n')
 
istreamgetline (char *str, streamsize count, char delim= '\n')
 
bool good () const
 
istreamignore (streamsize n=1, int delim=-1)
 
void init (const char *str)
 
 operator const void * () const
 
bool operator! () const
 
istreamoperator>> (istream &(*pf)(istream &str))
 
istreamoperator>> (ios_base &(*pf)(ios_base &str))
 
istreamoperator>> (ios &(*pf)(ios &str))
 
istreamoperator>> (char *str)
 
istreamoperator>> (char &ch)
 
istreamoperator>> (signed char *str)
 
istreamoperator>> (signed char &ch)
 
istreamoperator>> (unsigned char *str)
 
istreamoperator>> (unsigned char &ch)
 
istreamoperator>> (bool &arg)
 
istreamoperator>> (short &arg)
 
istreamoperator>> (unsigned short &arg)
 
istreamoperator>> (int &arg)
 
istreamoperator>> (unsigned int &arg)
 
istreamoperator>> (long &arg)
 
istreamoperator>> (unsigned long &arg)
 
istreamoperator>> (double &arg)
 
istreamoperator>> (float &arg)
 
istreamoperator>> (void *&arg)
 
int peek ()
 
int precision () const
 
int precision (unsigned int n)
 
iostate rdstate () const
 
void readline ()
 
istreamseekg (pos_type pos)
 
istreamseekg (off_type off, seekdir way)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
void skipWhite ()
 
pos_type tellg ()
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + + + + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
bool seekoff (off_type off, seekdir way)
 
bool seekpos (pos_type pos)
 
+

Detailed Description

+

Input stream for Arduino Stream objects.

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
ArduinoInStream::ArduinoInStream (Stream & hws,
char * buf,
size_t size 
)
+
+inline
+
+

Constructor

Parameters
+ + + + +
[in]hwshardware stream
[in]bufbuffer for input line
[in]sizesize of input buffer
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inlineinherited
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::clear (iostate state = goodbit)
+
+inlineinherited
+
+

Clear iostate bits.

+
Parameters
+ + +
[in]stateThe flags you want to set after clearing all flags.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inlineinherited
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inlineinherited
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
streamsize istream::gcount () const
+
+inlineinherited
+
+
Returns
The number of characters extracted by the last unformatted input function.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int istream::get ()
+
+inherited
+
+

Extract a character if one is available.

+
Returns
The character or -1 if a failure occurs. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream & istream::get (char & c)
+
+inherited
+
+

Extract a character if one is available.

+
Parameters
+ + +
[out]clocation to receive the extracted character.
+
+
+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
)
+
+inherited
+
+

Extract characters.

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
)
+
+inherited
+
+

Extract characters

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

+

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inlineinherited
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream & istream::ignore (streamsize n = 1,
int delim = -1 
)
+
+inherited
+
+

Extract characters and discard them.

+
Parameters
+ + + +
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
+
+
+

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

+

Failures are indicated by the state of the stream.

+
Returns
*this
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ibufstream::init (const char * str)
+
+inlineinherited
+
+

Initialize an ibufstream

Parameters
+ + +
[in]strpointer to string to be parsed Warning: The string will not be copied so must stay in scope.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inlineinherited
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inlineinherited
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (istream &(*)(istream &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios &(*)(ios &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (bool & arg)
+
+inlineinherited
+
+

Extract a value of type bool.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (short & arg)
+
+inlineinherited
+
+

Extract a value of type short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned short & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (int & arg)
+
+inlineinherited
+
+

Extract a value of type int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned int & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (long & arg)
+
+inlineinherited
+
+

Extract a value of type long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned long & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (double & arg)
+
+inlineinherited
+
+

Extract a value of type double.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (float & arg)
+
+inlineinherited
+
+

Extract a value of type float.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (void *& arg)
+
+inlineinherited
+
+

Extract a value of type void*.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int istream::peek ()
+
+inherited
+
+

Return the next available character without consuming it.

+
Returns
The character if the stream state is good else -1;
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inlineinherited
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void ArduinoInStream::readline ()
+
+inline
+
+

read a line.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::seekg (pos_type pos)
+
+inlineinherited
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the read pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream& istream::seekg (off_type off,
seekdir way 
)
+
+inlineinherited
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool ArduinoInStream::seekoff (off_type off,
seekdir way 
)
+
+inlineprotected
+
+

Internal - do not use.

Parameters
+ + + +
[in]off
[in]way
+
+
+
Returns
true/false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool ArduinoInStream::seekpos (pos_type pos)
+
+inlineprotected
+
+

Internal - do not use.

Parameters
+ + +
[in]pos
+
+
+
Returns
true/false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inlineinherited
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void istream::skipWhite ()
+
+inherited
+
+

used to implement ws()

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type istream::tellg ()
+
+inlineinherited
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/class_arduino_in_stream__coll__graph.png b/libs/SdFat-master/html/class_arduino_in_stream__coll__graph.png new file mode 100755 index 0000000..4df6fab Binary files /dev/null and b/libs/SdFat-master/html/class_arduino_in_stream__coll__graph.png differ diff --git a/libs/SdFat-master/html/class_arduino_in_stream__inherit__graph.png b/libs/SdFat-master/html/class_arduino_in_stream__inherit__graph.png new file mode 100755 index 0000000..4df6fab Binary files /dev/null and b/libs/SdFat-master/html/class_arduino_in_stream__inherit__graph.png differ diff --git a/libs/SdFat-master/html/class_arduino_out_stream-members.html b/libs/SdFat-master/html/class_arduino_out_stream-members.html new file mode 100755 index 0000000..607de1d --- /dev/null +++ b/libs/SdFat-master/html/class_arduino_out_stream-members.html @@ -0,0 +1,144 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
ArduinoOutStream Member List
+
+
+ +

This is the complete list of members for ArduinoOutStream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ArduinoOutStream(Print &pr)ArduinoOutStreaminlineexplicit
ateios_basestatic
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
clear(iostate state=goodbit)iosinline
cur enum valueios_base
decios_basestatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
fail() const iosinline
failbitios_basestatic
fill()ios_baseinline
fill(char c)ios_baseinline
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
flush()ostreaminline
fmtflags typedefios_base
good() const iosinline
goodbitios_basestatic
hexios_basestatic
inios_basestatic
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
leftios_basestatic
octios_basestatic
off_type typedefios_base
openmode typedefios_base
operator const void *() const iosinline
operator!() const iosinline
operator<<(ostream &(*pf)(ostream &str))ostreaminline
operator<<(ios_base &(*pf)(ios_base &str))ostreaminline
operator<<(bool arg)ostreaminline
operator<<(const char *arg)ostreaminline
operator<<(const signed char *arg)ostreaminline
operator<<(const unsigned char *arg)ostreaminline
operator<<(char arg)ostreaminline
operator<<(signed char arg)ostreaminline
operator<<(unsigned char arg)ostreaminline
operator<<(double arg)ostreaminline
operator<<(float arg)ostreaminline
operator<<(short arg)ostreaminline
operator<<(unsigned short arg)ostreaminline
operator<<(int arg)ostreaminline
operator<<(unsigned int arg)ostreaminline
operator<<(long arg)ostreaminline
operator<<(unsigned long arg)ostreaminline
operator<<(const void *arg)ostreaminline
operator<<(pgm arg)ostreaminline
operator<<(const __FlashStringHelper *arg)ostreaminline
ostream() (defined in ostream)ostreaminline
outios_basestatic
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
put(char ch)ostreaminline
rdstate() const iosinline
rightios_basestatic
seekdir enum nameios_base
seekp(pos_type pos)ostreaminline
seekp(off_type off, seekdir way)ostreaminline
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipwsios_basestatic
streamsize typedefios_base
tellp()ostreaminline
truncios_basestatic
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
width()ios_baseinline
width(unsigned n)ios_baseinline
+ + + + diff --git a/libs/SdFat-master/html/class_arduino_out_stream.html b/libs/SdFat-master/html/class_arduino_out_stream.html new file mode 100755 index 0000000..4a4f994 --- /dev/null +++ b/libs/SdFat-master/html/class_arduino_out_stream.html @@ -0,0 +1,2312 @@ + + + + + + +SdFat: ArduinoOutStream Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

Output stream for Arduino Print objects. + More...

+ +

#include <ArduinoStream.h>

+
+Inheritance diagram for ArduinoOutStream:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for ArduinoOutStream:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 ArduinoOutStream (Print &pr)
 
bool bad () const
 
void clear (iostate state=goodbit)
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
ostreamflush ()
 
bool good () const
 
 operator const void * () const
 
bool operator! () const
 
ostreamoperator<< (ostream &(*pf)(ostream &str))
 
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
 
ostreamoperator<< (bool arg)
 
ostreamoperator<< (const char *arg)
 
ostreamoperator<< (const signed char *arg)
 
ostreamoperator<< (const unsigned char *arg)
 
ostreamoperator<< (char arg)
 
ostreamoperator<< (signed char arg)
 
ostreamoperator<< (unsigned char arg)
 
ostreamoperator<< (double arg)
 
ostreamoperator<< (float arg)
 
ostreamoperator<< (short arg)
 
ostreamoperator<< (unsigned short arg)
 
ostreamoperator<< (int arg)
 
ostreamoperator<< (unsigned int arg)
 
ostreamoperator<< (long arg)
 
ostreamoperator<< (unsigned long arg)
 
ostreamoperator<< (const void *arg)
 
ostreamoperator<< (pgm arg)
 
ostreamoperator<< (const __FlashStringHelper *arg)
 
int precision () const
 
int precision (unsigned int n)
 
ostreamput (char ch)
 
iostate rdstate () const
 
ostreamseekp (pos_type pos)
 
ostreamseekp (off_type off, seekdir way)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
pos_type tellp ()
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
+

Detailed Description

+

Output stream for Arduino Print objects.

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
ArduinoOutStream::ArduinoOutStream (Print & pr)
+
+inlineexplicit
+
+

constructor

+
Parameters
+ + +
[in]prPrint object for this ArduinoOutStream.
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inlineinherited
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::clear (iostate state = goodbit)
+
+inlineinherited
+
+

Clear iostate bits.

+
Parameters
+ + +
[in]stateThe flags you want to set after clearing all flags.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inlineinherited
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inlineinherited
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ostream& ostream::flush ()
+
+inlineinherited
+
+

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inlineinherited
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inlineinherited
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inlineinherited
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (bool arg)
+
+inlineinherited
+
+

Output bool

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const signed char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const unsigned char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (signed char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (double arg)
+
+inlineinherited
+
+

Output double

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (float arg)
+
+inlineinherited
+
+

Output float

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (short arg)
+
+inlineinherited
+
+

Output signed short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned short arg)
+
+inlineinherited
+
+

Output unsigned short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (int arg)
+
+inlineinherited
+
+

Output signed int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned int arg)
+
+inlineinherited
+
+

Output unsigned int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (long arg)
+
+inlineinherited
+
+

Output signed long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned long arg)
+
+inlineinherited
+
+

Output unsigned long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const void * arg)
+
+inlineinherited
+
+

Output pointer

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (pgm arg)
+
+inlineinherited
+
+

Output a string from flash using the pstr() macro

Parameters
+ + +
[in]argpgm struct pointing to string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const __FlashStringHelper * arg)
+
+inlineinherited
+
+

Output a string from flash using the Arduino F() macro.

Parameters
+ + +
[in]argpointing to flash string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::put (char ch)
+
+inlineinherited
+
+

Puts a character in a stream.

+

The unformatted output function inserts the element ch. It returns *this.

+
Parameters
+ + +
[in]chThe character
+
+
+
Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inlineinherited
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::seekp (pos_type pos)
+
+inlineinherited
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the write pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ostream& ostream::seekp (off_type off,
seekdir way 
)
+
+inlineinherited
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inlineinherited
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type ostream::tellp ()
+
+inlineinherited
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/class_arduino_out_stream__coll__graph.png b/libs/SdFat-master/html/class_arduino_out_stream__coll__graph.png new file mode 100755 index 0000000..97a213b Binary files /dev/null and b/libs/SdFat-master/html/class_arduino_out_stream__coll__graph.png differ diff --git a/libs/SdFat-master/html/class_arduino_out_stream__inherit__graph.png b/libs/SdFat-master/html/class_arduino_out_stream__inherit__graph.png new file mode 100755 index 0000000..97a213b Binary files /dev/null and b/libs/SdFat-master/html/class_arduino_out_stream__inherit__graph.png differ diff --git a/libs/SdFat-master/html/class_file-members.html b/libs/SdFat-master/html/class_file-members.html new file mode 100755 index 0000000..7d62537 --- /dev/null +++ b/libs/SdFat-master/html/class_file-members.html @@ -0,0 +1,141 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
File Member List
+
+
+ +

This is the complete list of members for File, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
available()Fileinline
clearWriteError()Fileinline
close()SdBaseFile
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFile
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFile
curCluster() const SdBaseFileinline
curPosition() const SdBaseFileinline
cwd()SdBaseFileinlinestatic
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFileinlinestatic
dateTimeCallbackCancel()SdBaseFileinlinestatic
dirEntry(dir_t *dir)SdBaseFile
dirName(const dir_t &dir, char *name)SdBaseFilestatic
exists(const char *name)SdBaseFile
fgets(char *str, int16_t num, char *delim=0)SdBaseFile
fileSize() const SdBaseFileinline
firstCluster() const SdBaseFileinline
flush()Fileinline
getFilename(char *name)SdBaseFile
getpos(FatPos_t *pos)SdBaseFile
getWriteError()Fileinline
isDir() const SdBaseFileinline
isDirectory()Fileinline
isFile() const SdBaseFileinline
isOpen() const SdBaseFileinline
isRoot() const SdBaseFileinline
isSubDir() const SdBaseFileinline
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFile
ls(uint8_t flags=0)SdBaseFile
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFile
name()Fileinline
open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFile
open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFile
open(const char *path, uint8_t oflag=O_READ)SdBaseFile
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFile
openNextFile(uint8_t mode=O_READ)Fileinline
openRoot(SdVolume *vol)SdBaseFile
operator bool()Fileinline
peek()Fileinline
position()Fileinline
printCreateDateTime(Print *pr)SdBaseFile
printFatDate(uint16_t fatDate)SdBaseFilestatic
printFatDate(Print *pr, uint16_t fatDate)SdBaseFilestatic
printFatTime(uint16_t fatTime)SdBaseFilestatic
printFatTime(Print *pr, uint16_t fatTime)SdBaseFilestatic
printField(float value, char term, uint8_t prec=2)SdBaseFile
printField(int16_t value, char term)SdBaseFile
printField(uint16_t value, char term)SdBaseFile
printField(int32_t value, char term)SdBaseFile
printField(uint32_t value, char term)SdBaseFile
printFileSize(Print *pr)SdBaseFile
printModifyDateTime(Print *pr)SdBaseFile
printName()SdBaseFile
printName(Print *pr)SdBaseFile
read()Fileinline
read(void *buf, size_t nbyte)Fileinline
readDir(dir_t *dir)SdBaseFile
remove(SdBaseFile *dirFile, const char *path)SdBaseFilestatic
remove()SdBaseFile
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFile
rewind()SdBaseFileinline
rewindDirectory()Fileinline
rmdir()SdBaseFile
rmRfStar()SdBaseFile
SdBaseFile()SdBaseFileinline
SdBaseFile(const char *path, uint8_t oflag)SdBaseFile
seek(uint32_t pos)Fileinline
seekCur(int32_t offset)SdBaseFileinline
seekEnd(int32_t offset=0)SdBaseFileinline
seekSet(uint32_t pos)SdBaseFile
setpos(FatPos_t *pos)SdBaseFile
size()Fileinline
sync()SdBaseFile
timestamp(SdBaseFile *file)SdBaseFile
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFile
truncate(uint32_t size)SdBaseFile
type() const SdBaseFileinline
volume() const SdBaseFileinline
write(uint8_t b)Fileinline
write(const void *buf, size_t nbyte)File
write(const uint8_t *buf, size_t size)Fileinline
writeErrorSdBaseFile
+ + + + diff --git a/libs/SdFat-master/html/class_file.html b/libs/SdFat-master/html/class_file.html new file mode 100755 index 0000000..a3705ba --- /dev/null +++ b/libs/SdFat-master/html/class_file.html @@ -0,0 +1,2906 @@ + + + + + + +SdFat: File Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

Arduino SD.h style File API. + More...

+ +

#include <SdFile.h>

+
+Inheritance diagram for File:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for File:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

int available ()
 
void clearWriteError ()
 
bool close ()
 
bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
 
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
 
uint32_t curCluster () const
 
uint32_t curPosition () const
 
bool dirEntry (dir_t *dir)
 
bool exists (const char *name)
 
int16_t fgets (char *str, int16_t num, char *delim=0)
 
uint32_t fileSize () const
 
uint32_t firstCluster () const
 
void flush ()
 
bool getFilename (char *name)
 
void getpos (FatPos_t *pos)
 
bool getWriteError ()
 
bool isDir () const
 
bool isDirectory ()
 
bool isFile () const
 
bool isOpen () const
 
bool isRoot () const
 
bool isSubDir () const
 
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
 
void ls (uint8_t flags=0)
 
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
 
char * name ()
 
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
 
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
 
bool open (const char *path, uint8_t oflag=O_READ)
 
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
 
File openNextFile (uint8_t mode=O_READ)
 
bool openRoot (SdVolume *vol)
 
 operator bool ()
 
int peek ()
 
uint32_t position ()
 
bool printCreateDateTime (Print *pr)
 
int printField (float value, char term, uint8_t prec=2)
 
int printField (int16_t value, char term)
 
int printField (uint16_t value, char term)
 
int printField (int32_t value, char term)
 
int printField (uint32_t value, char term)
 
size_t printFileSize (Print *pr)
 
bool printModifyDateTime (Print *pr)
 
size_t printName ()
 
size_t printName (Print *pr)
 
int read ()
 
int read (void *buf, size_t nbyte)
 
int8_t readDir (dir_t *dir)
 
bool remove ()
 
bool rename (SdBaseFile *dirFile, const char *newPath)
 
void rewind ()
 
void rewindDirectory ()
 
bool rmdir ()
 
bool rmRfStar ()
 
bool seek (uint32_t pos)
 
bool seekCur (int32_t offset)
 
bool seekEnd (int32_t offset=0)
 
bool seekSet (uint32_t pos)
 
void setpos (FatPos_t *pos)
 
uint32_t size ()
 
bool sync ()
 
bool timestamp (SdBaseFile *file)
 
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
 
bool truncate (uint32_t size)
 
uint8_t type () const
 
SdVolumevolume () const
 
size_t write (uint8_t b)
 
int write (const void *buf, size_t nbyte)
 
size_t write (const uint8_t *buf, size_t size)
 
+ + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

static SdBaseFilecwd ()
 
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
 
static void dateTimeCallbackCancel ()
 
static void dirName (const dir_t &dir, char *name)
 
static void printFatDate (uint16_t fatDate)
 
static void printFatDate (Print *pr, uint16_t fatDate)
 
static void printFatTime (uint16_t fatTime)
 
static void printFatTime (Print *pr, uint16_t fatTime)
 
static bool remove (SdBaseFile *dirFile, const char *path)
 
+ + + +

+Public Attributes

bool writeError
 
+

Detailed Description

+

Arduino SD.h style File API.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
int File::available ()
+
+inline
+
+
Returns
number of bytes available from the current position to EOF or INT_MAX if more than INT_MAX bytes are available.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void File::clearWriteError ()
+
+inline
+
+

Set writeError to zero

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::close ()
+
+inherited
+
+

Close a file and force cached data and directory information to be written to the storage device.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include no file is open or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::contiguousRange (uint32_t * bgnBlock,
uint32_t * endBlock 
)
+
+inherited
+
+

Check for contiguous file and return its raw block range.

+
Parameters
+ + + +
[out]bgnBlockthe first block address for the file.
[out]endBlockthe last block address for the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is not contiguous, file has zero length or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::createContiguous (SdBaseFiledirFile,
const char * path,
uint32_t size 
)
+
+inherited
+
+

Create and open a new contiguous file of a specified size.

+
Note
This function only supports short DOS 8.3 names. See open() for more information.
+
Parameters
+ + + + +
[in]dirFileThe directory where the file will be created.
[in]pathA path with a valid DOS 8.3 file name.
[in]sizeThe desired file size.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include path contains an invalid DOS 8.3 file name, the FAT volume has not been initialized, a file is already open, the file already exists, the root directory is full or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::curCluster () const
+
+inlineinherited
+
+
Returns
The current cluster number for a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::curPosition () const
+
+inlineinherited
+
+
Returns
The current position for a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static SdBaseFile* SdBaseFile::cwd ()
+
+inlinestaticinherited
+
+
Returns
Current working directory
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
static void SdBaseFile::dateTimeCallback (void(*)(uint16_t *date, uint16_t *time) dateTime)
+
+inlinestaticinherited
+
+

Set the date/time callback function

+
Parameters
+ + +
[in]dateTimeThe user's call back function. The callback function is of the form:
+
+
+
void dateTime(uint16_t* date, uint16_t* time) {
+
uint16_t year;
+
uint8_t month, day, hour, minute, second;
+
+
// User gets date and time from GPS or real-time clock here
+
+
// return date using FAT_DATE macro to format fields
+
*date = FAT_DATE(year, month, day);
+
+
// return time using FAT_TIME macro to format fields
+
*time = FAT_TIME(hour, minute, second);
+
}
+

Sets the function that is called when a file is created or when a file's directory entry is modified by sync(). All timestamps, access, creation, and modify, are set when a file is created. sync() maintains the last access date and last modify date/time.

+

See the timestamp() function.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static void SdBaseFile::dateTimeCallbackCancel ()
+
+inlinestaticinherited
+
+

Cancel the date/time callback function.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::dirEntry (dir_t * dir)
+
+inherited
+
+

Return a file's directory entry.

+
Parameters
+ + +
[out]dirLocation for return of the file's directory entry.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::dirName (const dir_t & dir,
char * name 
)
+
+staticinherited
+
+

Format the name field of dir into the 13 byte array name in standard 8.3 short name format.

+
Parameters
+ + + +
[in]dirThe directory structure containing the name.
[out]nameA 13 byte char array for the formatted name.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::exists (const char * name)
+
+inherited
+
+

Test for the existence of a file in a directory

+
Parameters
+ + +
[in]nameName of the file to be tested for.
+
+
+

The calling instance must be an open directory file.

+

dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory dirFile.

+
Returns
true if the file exists else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int16_t SdBaseFile::fgets (char * str,
int16_t num,
char * delim = 0 
)
+
+inherited
+
+

Get a string from a file.

+

fgets() reads bytes from a file into the array pointed to by str, until num - 1 bytes are read, or a delimiter is read and transferred to str, or end-of-file is encountered. The string is then terminated with a null byte.

+

fgets() deletes CR, '\r', from the string. This insures only a '\n' terminates the string for Windows text files which use CRLF for newline.

+
Parameters
+ + + + +
[out]strPointer to the array where the string is stored.
[in]numMaximum number of characters to be read (including the final null byte). Usually the length of the array str is used.
[in]delimOptional set of delimiters. The default is "\n".
+
+
+
Returns
For success fgets() returns the length of the string in str. If no data is read, fgets() returns zero for EOF or -1 if an error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::fileSize () const
+
+inlineinherited
+
+
Returns
The total number of bytes in a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::firstCluster () const
+
+inlineinherited
+
+
Returns
The first cluster number for a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void File::flush ()
+
+inline
+
+

Ensure that any bytes written to the file are saved to the SD card.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::getFilename (char * name)
+
+inherited
+
+

Get a file's name

+
Parameters
+ + +
[out]nameAn array of 13 characters for the file's name.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::getpos (FatPos_tpos)
+
+inherited
+
+

get position for streams

Parameters
+ + +
[out]posstruct to receive position
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool File::getWriteError ()
+
+inline
+
+
Returns
value of writeError
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isDir () const
+
+inlineinherited
+
+
Returns
True if this is a directory else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool File::isDirectory ()
+
+inline
+
+

This function reports if the current file is a directory or not.

Returns
true if the file is a directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isFile () const
+
+inlineinherited
+
+
Returns
True if this is a normal file else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isOpen () const
+
+inlineinherited
+
+
Returns
True if this is an open file/directory else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isRoot () const
+
+inlineinherited
+
+
Returns
True if this is the root directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isSubDir () const
+
+inlineinherited
+
+
Returns
True if this is a subdirectory else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void SdBaseFile::ls (Print * pr,
uint8_t flags = 0,
uint8_t indent = 0 
)
+
+inherited
+
+

List directory contents.

+
Parameters
+ + + +
[in]prPrint stream for list.
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+
Parameters
+ + +
[in]indentAmount of space before file name. Used for recursive list to indicate subdirectory level.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::ls (uint8_t flags = 0)
+
+inherited
+
+

List directory contents to stdOut.

+
Parameters
+ + +
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::mkdir (SdBaseFileparent,
const char * path,
bool pFlag = true 
)
+
+inherited
+
+

Make a new directory.

+
Parameters
+ + + + +
[in]parentAn open SdFat instance for the directory that will contain the new directory.
[in]pathA path with a valid 8.3 DOS name for the new directory.
[in]pFlagCreate missing parent directories if true.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, parent is not a directory, path is invalid or already exists in parent.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char* File::name ()
+
+inline
+
+
Returns
a pointer to the file's name.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (SdBaseFiledirFile,
uint16_t index,
uint8_t oflag 
)
+
+inherited
+
+

Open a file by index.

+
Parameters
+ + + + +
[in]dirFileAn open SdFat instance for the directory.
[in]indexThe index of the directory entry for the file to be opened. The value for index is (directory file position)/32.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
+
+
+

See open() by path for definition of flags.

Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (SdBaseFiledirFile,
const char * path,
uint8_t oflag 
)
+
+inherited
+
+

Open a file or directory by name.

+
Parameters
+ + + + +
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags from the following list
+
+
+

O_READ - Open for reading.

+

O_RDONLY - Same as O_READ.

+

O_WRITE - Open for writing.

+

O_WRONLY - Same as O_WRITE.

+

O_RDWR - Open for reading and writing.

+

O_APPEND - If set, the file offset shall be set to the end of the file prior to each write.

+

O_AT_END - Set the initial position at the end of the file.

+

O_CREAT - If the file exists, this flag has no effect except as noted under O_EXCL below. Otherwise, the file shall be created

+

O_EXCL - If O_CREAT and O_EXCL are set, open() shall fail if the file exists.

+

O_SYNC - Call sync() after each write. This flag should not be used with write(uint8_t), write_P(PGM_P), writeln_P(PGM_P), or the Arduino Print class. These functions do character at a time writes so sync() will be called after each byte.

+

O_TRUNC - If the file exists and is a regular file, and the file is successfully opened and is not read only, its length shall be truncated to 0.

+

WARNING: A given file must not be opened by more than one SdBaseFile object or file corruption may occur.

+
Note
Directory files must be opened read only. Write and truncation is not allowed for directory files.
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, dirFile is not a directory, path is invalid, the file does not exist or can't be opened in the access mode specified by oflag.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (const char * path,
uint8_t oflag = O_READ 
)
+
+inherited
+
+

Open a file in the current working directory.

+
Parameters
+ + + +
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::openNext (SdBaseFiledirFile,
uint8_t oflag 
)
+
+inherited
+
+

Open the next file or subdirectory in a directory.

+
Parameters
+ + + +
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
+
+
+

See open() by path for definition of flags.

Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
File File::openNextFile (uint8_t mode = O_READ)
+
+inline
+
+

Opens the next file or folder in a directory.

+
Parameters
+ + +
[in]modeopen mode flags.
+
+
+
Returns
a File object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::openRoot (SdVolumevol)
+
+inherited
+
+

Open a volume's root directory.

+
Parameters
+ + +
[in]volThe FAT volume containing the root directory to be opened.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is already open, the FAT volume has not been initialized or it a FAT12 volume.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
File::operator bool ()
+
+inline
+
+

The parenthesis operator.

+
Returns
true if a file is open.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int File::peek ()
+
+inline
+
+

Return the next available byte without consuming it.

+
Returns
The byte if no error and not at eof else -1;
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t File::position ()
+
+inline
+
+
Returns
the current file position.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::printCreateDateTime (Print * pr)
+
+inherited
+
+

Print a file's creation date and time

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::printFatDate (uint16_t fatDate)
+
+staticinherited
+
+

Print a directory date field to stdOut.

+

Format is yyyy-mm-dd.

+
Parameters
+ + +
[in]fatDateThe date field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::printFatDate (Print * pr,
uint16_t fatDate 
)
+
+staticinherited
+
+

Print a directory date field.

+

Format is yyyy-mm-dd.

+
Parameters
+ + + +
[in]prPrint stream for output.
[in]fatDateThe date field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::printFatTime (uint16_t fatTime)
+
+staticinherited
+
+

Print a directory time field to stdOut.

+

Format is hh:mm:ss.

+
Parameters
+ + +
[in]fatTimeThe time field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::printFatTime (Print * pr,
uint16_t fatTime 
)
+
+staticinherited
+
+

Print a directory time field.

+

Format is hh:mm:ss.

+
Parameters
+ + + +
[in]prPrint stream for output.
[in]fatTimeThe time field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (float value,
char term,
uint8_t prec = 2 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
[in]precNumber of digits after decimal point.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (int16_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (uint16_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (int32_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (uint32_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
size_t SdBaseFile::printFileSize (Print * pr)
+
+inherited
+
+

Print a file's size.

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::printModifyDateTime (Print * pr)
+
+inherited
+
+

Print a file's modify date and time

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t SdBaseFile::printName ()
+
+inherited
+
+

Print a file's name to stdOut

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
size_t SdBaseFile::printName (Print * pr)
+
+inherited
+
+

Print a file's name

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int File::read ()
+
+inline
+
+

Read the next byte from a file.

+
Returns
For success return the next byte in the file as an int. If an error occurs or end of file is reached return -1.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int File::read (void * buf,
size_t nbyte 
)
+
+inline
+
+

Read data from a file starting at the current position.

+
Parameters
+ + + +
[out]bufPointer to the location that will receive the data.
[in]nbyteMaximum number of bytes to read.
+
+
+
Returns
For success read() returns the number of bytes read. A value less than nbyte, including zero, will be returned if end of file is reached. If an error occurs, read() returns -1. Possible errors include read() called before a file has been opened, corrupt file system or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int8_t SdBaseFile::readDir (dir_t * dir)
+
+inherited
+
+

Read the next directory entry from a directory file.

+
Parameters
+ + +
[out]dirThe dir_t struct that will receive the data.
+
+
+
Returns
For success readDir() returns the number of bytes read. A value of zero will be returned if end of file is reached. If an error occurs, readDir() returns -1. Possible errors include readDir() called before a directory has been opened, this is not a directory file or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::remove (SdBaseFiledirFile,
const char * path 
)
+
+staticinherited
+
+

Remove a file.

+

The directory entry and all data for the file are deleted.

+
Parameters
+ + + +
[in]dirFileThe directory that contains the file.
[in]pathPath for the file to be removed.
+
+
+
Note
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is a directory, is read only, dirFile is not a directory, path is not found or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::remove ()
+
+inherited
+
+

Remove a file.

+

The directory entry and all data for the file are deleted.

+
Note
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file read-only, is a directory, or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::rename (SdBaseFiledirFile,
const char * newPath 
)
+
+inherited
+
+

Rename a file or subdirectory.

+
Parameters
+ + + +
[in]dirFileDirectory for the new path.
[in]newPathNew path name for the file/directory.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include dirFile is not open or is not a directory file, newPath is invalid or already exists, or an I/O error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SdBaseFile::rewind ()
+
+inlineinherited
+
+

Set the file's current position to zero.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void File::rewindDirectory ()
+
+inline
+
+

Rewind a file if it is a directory

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::rmdir ()
+
+inherited
+
+

Remove a directory file.

+

The directory file will be removed only if it is empty and is not the root directory. rmdir() follows DOS and Windows and ignores the read-only attribute for the directory.

+
Note
This function should not be used to delete the 8.3 version of a directory that has a long name. For example if a directory has the long name "New folder" you should not delete the 8.3 name "NEWFOL~1".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is not a directory, is the root directory, is not empty, or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::rmRfStar ()
+
+inherited
+
+

Recursively delete a directory and all contained files.

+

This is like the Unix/Linux 'rm -rf *' if called with the root directory hence the name.

+

Warning - This will remove all contents of the directory including subdirectories. The directory will then be removed if it is not root. The read-only attribute for files will be ignored.

+
Note
This function should not be used to delete the 8.3 version of a directory that has a long name. See remove() and rmdir().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool File::seek (uint32_t pos)
+
+inline
+
+

Seek to a new position in the file, which must be between 0 and the size of the file (inclusive).

+
Parameters
+ + +
[in]posthe new file position.
+
+
+
Returns
true for success else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::seekCur (int32_t offset)
+
+inlineinherited
+
+

Set the files position to current position + pos. See seekSet().

Parameters
+ + +
[in]offsetThe new position in bytes from the current position.
+
+
+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::seekEnd (int32_t offset = 0)
+
+inlineinherited
+
+

Set the files position to end-of-file + offset. See seekSet().

Parameters
+ + +
[in]offsetThe new position in bytes from end-of-file.
+
+
+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::seekSet (uint32_t pos)
+
+inherited
+
+

Sets a file's position.

+
Parameters
+ + +
[in]posThe new position in bytes from the beginning of the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::setpos (FatPos_tpos)
+
+inherited
+
+

set position for streams

Parameters
+ + +
[out]posstruct with value for new position
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t File::size ()
+
+inline
+
+
Returns
the file's size.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::sync ()
+
+inherited
+
+

The sync() call causes all modified data and directory fields to be written to the storage device.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include a call to sync() before a file has been opened or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::timestamp (SdBaseFilefile)
+
+inherited
+
+

Copy a file's timestamps

+
Parameters
+ + +
[in]fileFile to copy timestamps from.
+
+
+
Note
Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::timestamp (uint8_t flags,
uint16_t year,
uint8_t month,
uint8_t day,
uint8_t hour,
uint8_t minute,
uint8_t second 
)
+
+inherited
+
+

Set a file's timestamps in its directory entry.

+
Parameters
+ + +
[in]flagsValues for flags are constructed by a bitwise-inclusive OR of flags from the following list
+
+
+

T_ACCESS - Set the file's last access date.

+

T_CREATE - Set the file's creation date and time.

+

T_WRITE - Set the file's last write/modification date and time.

+
Parameters
+ + + + + + + +
[in]yearValid range 1980 - 2107 inclusive.
[in]monthValid range 1 - 12 inclusive.
[in]dayValid range 1 - 31 inclusive.
[in]hourValid range 0 - 23 inclusive.
[in]minuteValid range 0 - 59 inclusive.
[in]secondValid range 0 - 59 inclusive
+
+
+
Note
It is possible to set an invalid date since there is no check for the number of days in a month.
+
+Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::truncate (uint32_t length)
+
+inherited
+
+

Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to length otherwise it will be set to end of file.

+
Parameters
+ + +
[in]lengthThe desired length for the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is read only, file is a directory, length is greater than the current file size or an I/O error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t SdBaseFile::type () const
+
+inlineinherited
+
+

Type of file. You should use isFile() or isDir() instead of type() if possible.

+
Returns
The file or directory type.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
SdVolume* SdBaseFile::volume () const
+
+inlineinherited
+
+
Returns
SdVolume that contains this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
size_t File::write (uint8_t b)
+
+inline
+
+

Write a byte to a file. Required by the Arduino Print class.

Parameters
+ + +
[in]bthe byte to be written. Use getWriteError to check for errors.
+
+
+
Returns
1 for success and 0 for failure.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int File::write (const void * buf,
size_t nbyte 
)
+
+

Write data to an open file.

+
Note
Data is moved to the cache but may not be written to the storage device until sync() is called.
+
Parameters
+ + + +
[in]bufPointer to the location of the data to be written.
[in]nbyteNumber of bytes to write.
+
+
+
Returns
For success write() returns the number of bytes written, always nbyte. If an error occurs, write() returns -1. Possible errors include write() is called before a file has been opened, write is called for a read-only file, device is full, a corrupt file system or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
size_t File::write (const uint8_t * buf,
size_t size 
)
+
+inline
+
+

Write data to an open file. Form required by Print.

+
Note
Data is moved to the cache but may not be written to the storage device until sync() is called.
+
Parameters
+ + + +
[in]bufPointer to the location of the data to be written.
[in]sizeNumber of bytes to write.
+
+
+
Returns
For success write() returns the number of bytes written, always nbyte. If an error occurs, write() returns -1. Possible errors include write() is called before a file has been opened, write is called for a read-only file, device is full, a corrupt file system or an I/O error.
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
bool SdBaseFile::writeError
+
+inherited
+
+

writeError is set to true if an error occurs during a write(). Set writeError to false before calling print() and/or write() and check for true after calls to print() and/or write().

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/class_file__coll__graph.png b/libs/SdFat-master/html/class_file__coll__graph.png new file mode 100755 index 0000000..5fb4ad0 Binary files /dev/null and b/libs/SdFat-master/html/class_file__coll__graph.png differ diff --git a/libs/SdFat-master/html/class_file__inherit__graph.png b/libs/SdFat-master/html/class_file__inherit__graph.png new file mode 100755 index 0000000..5fb4ad0 Binary files /dev/null and b/libs/SdFat-master/html/class_file__inherit__graph.png differ diff --git a/libs/SdFat-master/html/class_minimum_serial-members.html b/libs/SdFat-master/html/class_minimum_serial-members.html new file mode 100755 index 0000000..36ebf6d --- /dev/null +++ b/libs/SdFat-master/html/class_minimum_serial-members.html @@ -0,0 +1,63 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
MinimumSerial Member List
+
+
+ +

This is the complete list of members for MinimumSerial, including all inherited members.

+ + + + +
begin(uint32_t baud)MinimumSerial
read()MinimumSerial
write(uint8_t b)MinimumSerial
+ + + + diff --git a/libs/SdFat-master/html/class_minimum_serial.html b/libs/SdFat-master/html/class_minimum_serial.html new file mode 100755 index 0000000..0e6721c --- /dev/null +++ b/libs/SdFat-master/html/class_minimum_serial.html @@ -0,0 +1,158 @@ + + + + + + +SdFat: MinimumSerial Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+ +
+
MinimumSerial Class Reference
+
+
+ +

mini serial class for the SdFat library. + More...

+ +

#include <MinimumSerial.h>

+
+Inheritance diagram for MinimumSerial:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for MinimumSerial:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + +

+Public Member Functions

void begin (uint32_t baud)
 
int read ()
 
size_t write (uint8_t b)
 
+

Detailed Description

+

mini serial class for the SdFat library.

+

Member Function Documentation

+ +
+
+ + + + + + + + +
void MinimumSerial::begin (uint32_t baud)
+
+

Set baud rate for serial port zero and enable in non interrupt mode. Do not call this function if you use another serial library.

Parameters
+ + +
[in]baudrate
+
+
+ +
+
+ +
+
+ + + + + + + +
int MinimumSerial::read ()
+
+

Unbuffered read

Returns
-1 if no character is available or an available character.
+ +
+
+ +
+
+ + + + + + + + +
size_t MinimumSerial::write (uint8_t b)
+
+

Unbuffered write

+
Parameters
+ + +
[in]bbyte to write.
+
+
+
Returns
1
+ +
+
+
The documentation for this class was generated from the following files:
    +
  • Arduino/libraries/SdFat/MinimumSerial.h
  • +
  • Arduino/libraries/SdFat/MinimumSerial.cpp
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/class_minimum_serial__coll__graph.png b/libs/SdFat-master/html/class_minimum_serial__coll__graph.png new file mode 100755 index 0000000..1121af8 Binary files /dev/null and b/libs/SdFat-master/html/class_minimum_serial__coll__graph.png differ diff --git a/libs/SdFat-master/html/class_minimum_serial__inherit__graph.png b/libs/SdFat-master/html/class_minimum_serial__inherit__graph.png new file mode 100755 index 0000000..1121af8 Binary files /dev/null and b/libs/SdFat-master/html/class_minimum_serial__inherit__graph.png differ diff --git a/libs/SdFat-master/html/class_sd2_card-members.html b/libs/SdFat-master/html/class_sd2_card-members.html new file mode 100755 index 0000000..41bc335 --- /dev/null +++ b/libs/SdFat-master/html/class_sd2_card-members.html @@ -0,0 +1,83 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
Sd2Card Member List
+
+
+ +

This is the complete list of members for Sd2Card, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + +
begin(uint8_t chipSelectPin=SD_CHIP_SELECT_PIN, uint8_t sckDivisor=SPI_FULL_SPEED)Sd2Card
cardSize()Sd2Card
erase(uint32_t firstBlock, uint32_t lastBlock)Sd2Card
eraseSingleBlockEnable()Sd2Card
error(uint8_t code)Sd2Cardinline
errorCode() const Sd2Cardinline
errorData() const Sd2Cardinline
init(uint8_t sckDivisor=SPI_FULL_SPEED, uint8_t chipSelectPin=SD_CHIP_SELECT_PIN)Sd2Cardinline
isBusy()Sd2Card
readBlock(uint32_t block, uint8_t *dst)Sd2Card
readCID(cid_t *cid)Sd2Cardinline
readCSD(csd_t *csd)Sd2Cardinline
readData(uint8_t *dst)Sd2Card
readOCR(uint32_t *ocr)Sd2Card
readStart(uint32_t blockNumber)Sd2Card
readStop()Sd2Card
sckDivisor()Sd2Cardinline
Sd2Card()Sd2Cardinline
type() const Sd2Cardinline
writeBlock(uint32_t blockNumber, const uint8_t *src)Sd2Card
writeData(const uint8_t *src)Sd2Card
writeStart(uint32_t blockNumber, uint32_t eraseCount)Sd2Card
writeStop()Sd2Card
+ + + + diff --git a/libs/SdFat-master/html/class_sd2_card.html b/libs/SdFat-master/html/class_sd2_card.html new file mode 100755 index 0000000..f610066 --- /dev/null +++ b/libs/SdFat-master/html/class_sd2_card.html @@ -0,0 +1,739 @@ + + + + + + +SdFat: Sd2Card Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+ +
+
Sd2Card Class Reference
+
+
+ +

Raw access to SD and SDHC flash memory cards. + More...

+ +

#include <Sd2Card.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool begin (uint8_t chipSelectPin=SD_CHIP_SELECT_PIN, uint8_t sckDivisor=SPI_FULL_SPEED)
 
uint32_t cardSize ()
 
bool erase (uint32_t firstBlock, uint32_t lastBlock)
 
bool eraseSingleBlockEnable ()
 
void error (uint8_t code)
 
int errorCode () const
 
int errorData () const
 
bool init (uint8_t sckDivisor=SPI_FULL_SPEED, uint8_t chipSelectPin=SD_CHIP_SELECT_PIN)
 
bool isBusy ()
 
bool readBlock (uint32_t block, uint8_t *dst)
 
bool readCID (cid_t *cid)
 
bool readCSD (csd_t *csd)
 
bool readData (uint8_t *dst)
 
bool readOCR (uint32_t *ocr)
 
bool readStart (uint32_t blockNumber)
 
bool readStop ()
 
uint8_t sckDivisor ()
 
 Sd2Card ()
 
int type () const
 
bool writeBlock (uint32_t blockNumber, const uint8_t *src)
 
bool writeData (const uint8_t *src)
 
bool writeStart (uint32_t blockNumber, uint32_t eraseCount)
 
bool writeStop ()
 
+

Detailed Description

+

Raw access to SD and SDHC flash memory cards.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
Sd2Card::Sd2Card ()
+
+inline
+
+

Construct an instance of Sd2Card.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Sd2Card::begin (uint8_t chipSelectPin = SD_CHIP_SELECT_PIN,
uint8_t sckDivisor = SPI_FULL_SPEED 
)
+
+

Initialize an SD flash memory card.

+
Parameters
+ + + +
[in]chipSelectPinSD chip select pin number.
[in]sckDivisorSPI SCK clock rate divisor.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. The reason for failure can be determined by calling errorCode() and errorData().
+ +
+
+ +
+
+ + + + + + + +
uint32_t Sd2Card::cardSize ()
+
+

Determine the size of an SD flash memory card.

+
Returns
The number of 512 byte data blocks in the card or zero if an error occurs.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Sd2Card::erase (uint32_t firstBlock,
uint32_t lastBlock 
)
+
+

Erase a range of blocks.

+
Parameters
+ + + +
[in]firstBlockThe address of the first block in the range.
[in]lastBlockThe address of the last block in the range.
+
+
+
Note
This function requests the SD card to do a flash erase for a range of blocks. The data on the card after an erase operation is either 0 or 1, depends on the card vendor. The card must support single block erase.
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + +
bool Sd2Card::eraseSingleBlockEnable ()
+
+

Determine if card supports single block erase.

+
Returns
The value one, true, is returned if single block erase is supported. The value zero, false, is returned if single block erase is not supported.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void Sd2Card::error (uint8_t code)
+
+inline
+
+

Set SD error code.

Parameters
+ + +
[in]codevalue for error code.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int Sd2Card::errorCode () const
+
+inline
+
+
Returns
error code for last error. See Sd2Card.h for a list of error codes.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int Sd2Card::errorData () const
+
+inline
+
+
Returns
error data for last error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool Sd2Card::init (uint8_t sckDivisor = SPI_FULL_SPEED,
uint8_t chipSelectPin = SD_CHIP_SELECT_PIN 
)
+
+inline
+
+

Initialize an SD flash memory card.

+
Parameters
+ + + +
[in]chipSelectPinSD chip select pin number.
[in]sckDivisorSPI SCK clock rate divisor.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. The reason for failure can be determined by calling errorCode() and errorData().
+ +
+
+ +
+
+ + + + + + + +
bool Sd2Card::isBusy ()
+
+

Check for busy. MISO low indicates the card is busy.

+
Returns
true if busy else false.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Sd2Card::readBlock (uint32_t blockNumber,
uint8_t * dst 
)
+
+

Read a 512 byte block from an SD card.

+
Parameters
+ + + +
[in]blockNumberLogical block to be read.
[out]dstPointer to the location that will receive the data.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool Sd2Card::readCID (cid_t * cid)
+
+inline
+
+

Read a card's CID register. The CID contains card identification information such as Manufacturer ID, Product name, Product serial number and Manufacturing date.

+
Parameters
+ + +
[out]cidpointer to area for returned data.
+
+
+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool Sd2Card::readCSD (csd_t * csd)
+
+inline
+
+

Read a card's CSD register. The CSD contains Card-Specific Data that provides information regarding access to the card's contents.

+
Parameters
+ + +
[out]csdpointer to area for returned data.
+
+
+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + + + + +
bool Sd2Card::readData (uint8_t * dst)
+
+

Read one data block in a multiple block read sequence

+
Parameters
+ + +
[in]dstPointer to the location for the data to be read.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + +
bool Sd2Card::readOCR (uint32_t * ocr)
+
+

Read OCR register.

+
Parameters
+ + +
[out]ocrValue of OCR register.
+
+
+
Returns
true for success else false.
+ +
+
+ +
+
+ + + + + + + + +
bool Sd2Card::readStart (uint32_t blockNumber)
+
+

Start a read multiple blocks sequence.

+
Parameters
+ + +
[in]blockNumberAddress of first block in sequence.
+
+
+
Note
This function is used with readData() and readStop() for optimized multiple block reads. SPI chipSelect must be low for the entire sequence.
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + +
bool Sd2Card::readStop ()
+
+

End a read multiple blocks sequence.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t Sd2Card::sckDivisor ()
+
+inline
+
+

Return SCK divisor.

+
Returns
Requested SCK divisor.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int Sd2Card::type () const
+
+inline
+
+

Return the card type: SD V1, SD V2 or SDHC

Returns
0 - SD V1, 1 - SD V2, or 3 - SDHC.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Sd2Card::writeBlock (uint32_t blockNumber,
const uint8_t * src 
)
+
+

Writes a 512 byte block to an SD card.

+
Parameters
+ + + +
[in]blockNumberLogical block to be written.
[in]srcPointer to the location of the data to be written.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + +
bool Sd2Card::writeData (const uint8_t * src)
+
+

Write one data block in a multiple block write sequence

Parameters
+ + +
[in]srcPointer to the location of the data to be written.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Sd2Card::writeStart (uint32_t blockNumber,
uint32_t eraseCount 
)
+
+

Start a write multiple blocks sequence.

+
Parameters
+ + + +
[in]blockNumberAddress of first block in sequence.
[in]eraseCountThe number of blocks to be pre-erased.
+
+
+
Note
This function is used with writeData() and writeStop() for optimized multiple block writes.
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + +
bool Sd2Card::writeStop ()
+
+

End a write multiple blocks sequence.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+
The documentation for this class was generated from the following files:
    +
  • Arduino/libraries/SdFat/Sd2Card.h
  • +
  • Arduino/libraries/SdFat/Sd2Card.cpp
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/class_sd_base_file-members.html b/libs/SdFat-master/html/class_sd_base_file-members.html new file mode 100755 index 0000000..1b81aa3 --- /dev/null +++ b/libs/SdFat-master/html/class_sd_base_file-members.html @@ -0,0 +1,131 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
SdBaseFile Member List
+
+
+ +

This is the complete list of members for SdBaseFile, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
available()SdBaseFileinline
clearWriteError()SdBaseFileinline
close()SdBaseFile
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFile
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFile
curCluster() const SdBaseFileinline
curPosition() const SdBaseFileinline
cwd()SdBaseFileinlinestatic
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFileinlinestatic
dateTimeCallbackCancel()SdBaseFileinlinestatic
dirEntry(dir_t *dir)SdBaseFile
dirName(const dir_t &dir, char *name)SdBaseFilestatic
exists(const char *name)SdBaseFile
fgets(char *str, int16_t num, char *delim=0)SdBaseFile
fileSize() const SdBaseFileinline
firstCluster() const SdBaseFileinline
getFilename(char *name)SdBaseFile
getpos(FatPos_t *pos)SdBaseFile
getWriteError()SdBaseFileinline
isDir() const SdBaseFileinline
isFile() const SdBaseFileinline
isOpen() const SdBaseFileinline
isRoot() const SdBaseFileinline
isSubDir() const SdBaseFileinline
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFile
ls(uint8_t flags=0)SdBaseFile
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFile
open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFile
open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFile
open(const char *path, uint8_t oflag=O_READ)SdBaseFile
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFile
openRoot(SdVolume *vol)SdBaseFile
peek()SdBaseFile
printCreateDateTime(Print *pr)SdBaseFile
printFatDate(uint16_t fatDate)SdBaseFilestatic
printFatDate(Print *pr, uint16_t fatDate)SdBaseFilestatic
printFatTime(uint16_t fatTime)SdBaseFilestatic
printFatTime(Print *pr, uint16_t fatTime)SdBaseFilestatic
printField(float value, char term, uint8_t prec=2)SdBaseFile
printField(int16_t value, char term)SdBaseFile
printField(uint16_t value, char term)SdBaseFile
printField(int32_t value, char term)SdBaseFile
printField(uint32_t value, char term)SdBaseFile
printFileSize(Print *pr)SdBaseFile
printModifyDateTime(Print *pr)SdBaseFile
printName()SdBaseFile
printName(Print *pr)SdBaseFile
read()SdBaseFile
read(void *buf, size_t nbyte)SdBaseFile
readDir(dir_t *dir)SdBaseFile
remove(SdBaseFile *dirFile, const char *path)SdBaseFilestatic
remove()SdBaseFile
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFile
rewind()SdBaseFileinline
rmdir()SdBaseFile
rmRfStar()SdBaseFile
SdBaseFile()SdBaseFileinline
SdBaseFile(const char *path, uint8_t oflag)SdBaseFile
SdFat (defined in SdBaseFile)SdBaseFilefriend
seekCur(int32_t offset)SdBaseFileinline
seekEnd(int32_t offset=0)SdBaseFileinline
seekSet(uint32_t pos)SdBaseFile
setpos(FatPos_t *pos)SdBaseFile
sync()SdBaseFile
timestamp(SdBaseFile *file)SdBaseFile
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFile
truncate(uint32_t size)SdBaseFile
type() const SdBaseFileinline
volume() const SdBaseFileinline
write(const void *buf, size_t nbyte)SdBaseFile
writeErrorSdBaseFile
+ + + + diff --git a/libs/SdFat-master/html/class_sd_base_file.html b/libs/SdFat-master/html/class_sd_base_file.html new file mode 100755 index 0000000..127d492 --- /dev/null +++ b/libs/SdFat-master/html/class_sd_base_file.html @@ -0,0 +1,2313 @@ + + + + + + +SdFat: SdBaseFile Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

Base class for SdFile with Print and C++ streams. + More...

+ +

#include <SdBaseFile.h>

+
+Inheritance diagram for SdBaseFile:
+
+
Inheritance graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

uint32_t available ()
 
void clearWriteError ()
 
bool close ()
 
bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
 
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
 
uint32_t curCluster () const
 
uint32_t curPosition () const
 
bool dirEntry (dir_t *dir)
 
bool exists (const char *name)
 
int16_t fgets (char *str, int16_t num, char *delim=0)
 
uint32_t fileSize () const
 
uint32_t firstCluster () const
 
bool getFilename (char *name)
 
void getpos (FatPos_t *pos)
 
bool getWriteError ()
 
bool isDir () const
 
bool isFile () const
 
bool isOpen () const
 
bool isRoot () const
 
bool isSubDir () const
 
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
 
void ls (uint8_t flags=0)
 
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
 
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
 
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
 
bool open (const char *path, uint8_t oflag=O_READ)
 
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
 
bool openRoot (SdVolume *vol)
 
int peek ()
 
bool printCreateDateTime (Print *pr)
 
int printField (float value, char term, uint8_t prec=2)
 
int printField (int16_t value, char term)
 
int printField (uint16_t value, char term)
 
int printField (int32_t value, char term)
 
int printField (uint32_t value, char term)
 
size_t printFileSize (Print *pr)
 
bool printModifyDateTime (Print *pr)
 
size_t printName ()
 
size_t printName (Print *pr)
 
int16_t read ()
 
int read (void *buf, size_t nbyte)
 
int8_t readDir (dir_t *dir)
 
bool remove ()
 
bool rename (SdBaseFile *dirFile, const char *newPath)
 
void rewind ()
 
bool rmdir ()
 
bool rmRfStar ()
 
 SdBaseFile ()
 
 SdBaseFile (const char *path, uint8_t oflag)
 
bool seekCur (int32_t offset)
 
bool seekEnd (int32_t offset=0)
 
bool seekSet (uint32_t pos)
 
void setpos (FatPos_t *pos)
 
bool sync ()
 
bool timestamp (SdBaseFile *file)
 
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
 
bool truncate (uint32_t size)
 
uint8_t type () const
 
SdVolumevolume () const
 
int write (const void *buf, size_t nbyte)
 
+ + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

static SdBaseFilecwd ()
 
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
 
static void dateTimeCallbackCancel ()
 
static void dirName (const dir_t &dir, char *name)
 
static void printFatDate (uint16_t fatDate)
 
static void printFatDate (Print *pr, uint16_t fatDate)
 
static void printFatTime (uint16_t fatTime)
 
static void printFatTime (Print *pr, uint16_t fatTime)
 
static bool remove (SdBaseFile *dirFile, const char *path)
 
+ + + +

+Public Attributes

bool writeError
 
+ + + +

+Friends

+class SdFat
 
+

Detailed Description

+

Base class for SdFile with Print and C++ streams.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
SdBaseFile::SdBaseFile ()
+
+inline
+
+

Create an instance.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
SdBaseFile::SdBaseFile (const char * path,
uint8_t oflag 
)
+
+

Create a file object and open it in the current working directory.

+
Parameters
+ + + +
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::available ()
+
+inline
+
+
Returns
number of bytes available from yhe current position to EOF
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SdBaseFile::clearWriteError ()
+
+inline
+
+

Set writeError to zero

+ +
+
+ +
+
+ + + + + + + +
bool SdBaseFile::close ()
+
+

Close a file and force cached data and directory information to be written to the storage device.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include no file is open or an I/O error.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::contiguousRange (uint32_t * bgnBlock,
uint32_t * endBlock 
)
+
+

Check for contiguous file and return its raw block range.

+
Parameters
+ + + +
[out]bgnBlockthe first block address for the file.
[out]endBlockthe last block address for the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is not contiguous, file has zero length or an I/O error occurred.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::createContiguous (SdBaseFiledirFile,
const char * path,
uint32_t size 
)
+
+

Create and open a new contiguous file of a specified size.

+
Note
This function only supports short DOS 8.3 names. See open() for more information.
+
Parameters
+ + + + +
[in]dirFileThe directory where the file will be created.
[in]pathA path with a valid DOS 8.3 file name.
[in]sizeThe desired file size.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include path contains an invalid DOS 8.3 file name, the FAT volume has not been initialized, a file is already open, the file already exists, the root directory is full or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::curCluster () const
+
+inline
+
+
Returns
The current cluster number for a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::curPosition () const
+
+inline
+
+
Returns
The current position for a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static SdBaseFile* SdBaseFile::cwd ()
+
+inlinestatic
+
+
Returns
Current working directory
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
static void SdBaseFile::dateTimeCallback (void(*)(uint16_t *date, uint16_t *time) dateTime)
+
+inlinestatic
+
+

Set the date/time callback function

+
Parameters
+ + +
[in]dateTimeThe user's call back function. The callback function is of the form:
+
+
+
void dateTime(uint16_t* date, uint16_t* time) {
+
uint16_t year;
+
uint8_t month, day, hour, minute, second;
+
+
// User gets date and time from GPS or real-time clock here
+
+
// return date using FAT_DATE macro to format fields
+
*date = FAT_DATE(year, month, day);
+
+
// return time using FAT_TIME macro to format fields
+
*time = FAT_TIME(hour, minute, second);
+
}
+

Sets the function that is called when a file is created or when a file's directory entry is modified by sync(). All timestamps, access, creation, and modify, are set when a file is created. sync() maintains the last access date and last modify date/time.

+

See the timestamp() function.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static void SdBaseFile::dateTimeCallbackCancel ()
+
+inlinestatic
+
+

Cancel the date/time callback function.

+ +
+
+ +
+
+ + + + + + + + +
bool SdBaseFile::dirEntry (dir_t * dir)
+
+

Return a file's directory entry.

+
Parameters
+ + +
[out]dirLocation for return of the file's directory entry.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::dirName (const dir_t & dir,
char * name 
)
+
+static
+
+

Format the name field of dir into the 13 byte array name in standard 8.3 short name format.

+
Parameters
+ + + +
[in]dirThe directory structure containing the name.
[out]nameA 13 byte char array for the formatted name.
+
+
+ +
+
+ +
+
+ + + + + + + + +
bool SdBaseFile::exists (const char * name)
+
+

Test for the existence of a file in a directory

+
Parameters
+ + +
[in]nameName of the file to be tested for.
+
+
+

The calling instance must be an open directory file.

+

dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory dirFile.

+
Returns
true if the file exists else false.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int16_t SdBaseFile::fgets (char * str,
int16_t num,
char * delim = 0 
)
+
+

Get a string from a file.

+

fgets() reads bytes from a file into the array pointed to by str, until num - 1 bytes are read, or a delimiter is read and transferred to str, or end-of-file is encountered. The string is then terminated with a null byte.

+

fgets() deletes CR, '\r', from the string. This insures only a '\n' terminates the string for Windows text files which use CRLF for newline.

+
Parameters
+ + + + +
[out]strPointer to the array where the string is stored.
[in]numMaximum number of characters to be read (including the final null byte). Usually the length of the array str is used.
[in]delimOptional set of delimiters. The default is "\n".
+
+
+
Returns
For success fgets() returns the length of the string in str. If no data is read, fgets() returns zero for EOF or -1 if an error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::fileSize () const
+
+inline
+
+
Returns
The total number of bytes in a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::firstCluster () const
+
+inline
+
+
Returns
The first cluster number for a file or directory.
+ +
+
+ +
+
+ + + + + + + + +
bool SdBaseFile::getFilename (char * name)
+
+

Get a file's name

+
Parameters
+ + +
[out]nameAn array of 13 characters for the file's name.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + +
void SdBaseFile::getpos (FatPos_tpos)
+
+

get position for streams

Parameters
+ + +
[out]posstruct to receive position
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::getWriteError ()
+
+inline
+
+
Returns
value of writeError
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isDir () const
+
+inline
+
+
Returns
True if this is a directory else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isFile () const
+
+inline
+
+
Returns
True if this is a normal file else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isOpen () const
+
+inline
+
+
Returns
True if this is an open file/directory else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isRoot () const
+
+inline
+
+
Returns
True if this is the root directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isSubDir () const
+
+inline
+
+
Returns
True if this is a subdirectory else false.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void SdBaseFile::ls (Print * pr,
uint8_t flags = 0,
uint8_t indent = 0 
)
+
+

List directory contents.

+
Parameters
+ + + +
[in]prPrint stream for list.
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+
Parameters
+ + +
[in]indentAmount of space before file name. Used for recursive list to indicate subdirectory level.
+
+
+ +
+
+ +
+
+ + + + + + + + +
void SdBaseFile::ls (uint8_t flags = 0)
+
+

List directory contents to stdOut.

+
Parameters
+ + +
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::mkdir (SdBaseFileparent,
const char * path,
bool pFlag = true 
)
+
+

Make a new directory.

+
Parameters
+ + + + +
[in]parentAn open SdFat instance for the directory that will contain the new directory.
[in]pathA path with a valid 8.3 DOS name for the new directory.
[in]pFlagCreate missing parent directories if true.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, parent is not a directory, path is invalid or already exists in parent.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (SdBaseFiledirFile,
uint16_t index,
uint8_t oflag 
)
+
+

Open a file by index.

+
Parameters
+ + + + +
[in]dirFileAn open SdFat instance for the directory.
[in]indexThe index of the directory entry for the file to be opened. The value for index is (directory file position)/32.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
+
+
+

See open() by path for definition of flags.

Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (SdBaseFiledirFile,
const char * path,
uint8_t oflag 
)
+
+

Open a file or directory by name.

+
Parameters
+ + + + +
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags from the following list
+
+
+

O_READ - Open for reading.

+

O_RDONLY - Same as O_READ.

+

O_WRITE - Open for writing.

+

O_WRONLY - Same as O_WRITE.

+

O_RDWR - Open for reading and writing.

+

O_APPEND - If set, the file offset shall be set to the end of the file prior to each write.

+

O_AT_END - Set the initial position at the end of the file.

+

O_CREAT - If the file exists, this flag has no effect except as noted under O_EXCL below. Otherwise, the file shall be created

+

O_EXCL - If O_CREAT and O_EXCL are set, open() shall fail if the file exists.

+

O_SYNC - Call sync() after each write. This flag should not be used with write(uint8_t), write_P(PGM_P), writeln_P(PGM_P), or the Arduino Print class. These functions do character at a time writes so sync() will be called after each byte.

+

O_TRUNC - If the file exists and is a regular file, and the file is successfully opened and is not read only, its length shall be truncated to 0.

+

WARNING: A given file must not be opened by more than one SdBaseFile object or file corruption may occur.

+
Note
Directory files must be opened read only. Write and truncation is not allowed for directory files.
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, dirFile is not a directory, path is invalid, the file does not exist or can't be opened in the access mode specified by oflag.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (const char * path,
uint8_t oflag = O_READ 
)
+
+

Open a file in the current working directory.

+
Parameters
+ + + +
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::openNext (SdBaseFiledirFile,
uint8_t oflag 
)
+
+

Open the next file or subdirectory in a directory.

+
Parameters
+ + + +
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
+
+
+

See open() by path for definition of flags.

Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + + + + +
bool SdBaseFile::openRoot (SdVolumevol)
+
+

Open a volume's root directory.

+
Parameters
+ + +
[in]volThe FAT volume containing the root directory to be opened.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is already open, the FAT volume has not been initialized or it a FAT12 volume.
+ +
+
+ +
+
+ + + + + + + +
int SdBaseFile::peek ()
+
+

Return the next available byte without consuming it.

+
Returns
The byte if no error and not at eof else -1;
+ +
+
+ +
+
+ + + + + + + + +
bool SdBaseFile::printCreateDateTime (Print * pr)
+
+

Print a file's creation date and time

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::printFatDate (uint16_t fatDate)
+
+static
+
+

Print a directory date field to stdOut.

+

Format is yyyy-mm-dd.

+
Parameters
+ + +
[in]fatDateThe date field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::printFatDate (Print * pr,
uint16_t fatDate 
)
+
+static
+
+

Print a directory date field.

+

Format is yyyy-mm-dd.

+
Parameters
+ + + +
[in]prPrint stream for output.
[in]fatDateThe date field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::printFatTime (uint16_t fatTime)
+
+static
+
+

Print a directory time field to stdOut.

+

Format is hh:mm:ss.

+
Parameters
+ + +
[in]fatTimeThe time field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::printFatTime (Print * pr,
uint16_t fatTime 
)
+
+static
+
+

Print a directory time field.

+

Format is hh:mm:ss.

+
Parameters
+ + + +
[in]prPrint stream for output.
[in]fatTimeThe time field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (float value,
char term,
uint8_t prec = 2 
)
+
+

Print a number followed by a field terminator.

Parameters
+ + + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
[in]precNumber of digits after decimal point.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (int16_t value,
char term 
)
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (uint16_t value,
char term 
)
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (int32_t value,
char term 
)
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (uint32_t value,
char term 
)
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + +
size_t SdBaseFile::printFileSize (Print * pr)
+
+

Print a file's size.

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + +
bool SdBaseFile::printModifyDateTime (Print * pr)
+
+

Print a file's modify date and time

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + +
size_t SdBaseFile::printName ()
+
+

Print a file's name to stdOut

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + +
size_t SdBaseFile::printName (Print * pr)
+
+

Print a file's name

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + +
int16_t SdBaseFile::read ()
+
+

Read the next byte from a file.

+
Returns
For success read returns the next byte in the file as an int. If an error occurs or end of file is reached -1 is returned.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::read (void * buf,
size_t nbyte 
)
+
+

Read data from a file starting at the current position.

+
Parameters
+ + + +
[out]bufPointer to the location that will receive the data.
[in]nbyteMaximum number of bytes to read.
+
+
+
Returns
For success read() returns the number of bytes read. A value less than nbyte, including zero, will be returned if end of file is reached. If an error occurs, read() returns -1. Possible errors include read() called before a file has been opened, corrupt file system or an I/O error occurred.
+ +
+
+ +
+
+ + + + + + + + +
int8_t SdBaseFile::readDir (dir_t * dir)
+
+

Read the next directory entry from a directory file.

+
Parameters
+ + +
[out]dirThe dir_t struct that will receive the data.
+
+
+
Returns
For success readDir() returns the number of bytes read. A value of zero will be returned if end of file is reached. If an error occurs, readDir() returns -1. Possible errors include readDir() called before a directory has been opened, this is not a directory file or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::remove (SdBaseFiledirFile,
const char * path 
)
+
+static
+
+

Remove a file.

+

The directory entry and all data for the file are deleted.

+
Parameters
+ + + +
[in]dirFileThe directory that contains the file.
[in]pathPath for the file to be removed.
+
+
+
Note
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is a directory, is read only, dirFile is not a directory, path is not found or an I/O error occurred.
+ +
+
+ +
+
+ + + + + + + +
bool SdBaseFile::remove ()
+
+

Remove a file.

+

The directory entry and all data for the file are deleted.

+
Note
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file read-only, is a directory, or an I/O error occurred.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::rename (SdBaseFiledirFile,
const char * newPath 
)
+
+

Rename a file or subdirectory.

+
Parameters
+ + + +
[in]dirFileDirectory for the new path.
[in]newPathNew path name for the file/directory.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include dirFile is not open or is not a directory file, newPath is invalid or already exists, or an I/O error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SdBaseFile::rewind ()
+
+inline
+
+

Set the file's current position to zero.

+ +
+
+ +
+
+ + + + + + + +
bool SdBaseFile::rmdir ()
+
+

Remove a directory file.

+

The directory file will be removed only if it is empty and is not the root directory. rmdir() follows DOS and Windows and ignores the read-only attribute for the directory.

+
Note
This function should not be used to delete the 8.3 version of a directory that has a long name. For example if a directory has the long name "New folder" you should not delete the 8.3 name "NEWFOL~1".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is not a directory, is the root directory, is not empty, or an I/O error occurred.
+ +
+
+ +
+
+ + + + + + + +
bool SdBaseFile::rmRfStar ()
+
+

Recursively delete a directory and all contained files.

+

This is like the Unix/Linux 'rm -rf *' if called with the root directory hence the name.

+

Warning - This will remove all contents of the directory including subdirectories. The directory will then be removed if it is not root. The read-only attribute for files will be ignored.

+
Note
This function should not be used to delete the 8.3 version of a directory that has a long name. See remove() and rmdir().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::seekCur (int32_t offset)
+
+inline
+
+

Set the files position to current position + pos. See seekSet().

Parameters
+ + +
[in]offsetThe new position in bytes from the current position.
+
+
+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::seekEnd (int32_t offset = 0)
+
+inline
+
+

Set the files position to end-of-file + offset. See seekSet().

Parameters
+ + +
[in]offsetThe new position in bytes from end-of-file.
+
+
+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + + + + +
bool SdBaseFile::seekSet (uint32_t pos)
+
+

Sets a file's position.

+
Parameters
+ + +
[in]posThe new position in bytes from the beginning of the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + +
void SdBaseFile::setpos (FatPos_tpos)
+
+

set position for streams

Parameters
+ + +
[out]posstruct with value for new position
+
+
+ +
+
+ +
+
+ + + + + + + +
bool SdBaseFile::sync ()
+
+

The sync() call causes all modified data and directory fields to be written to the storage device.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include a call to sync() before a file has been opened or an I/O error.
+ +
+
+ +
+
+ + + + + + + + +
bool SdBaseFile::timestamp (SdBaseFilefile)
+
+

Copy a file's timestamps

+
Parameters
+ + +
[in]fileFile to copy timestamps from.
+
+
+
Note
Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::timestamp (uint8_t flags,
uint16_t year,
uint8_t month,
uint8_t day,
uint8_t hour,
uint8_t minute,
uint8_t second 
)
+
+

Set a file's timestamps in its directory entry.

+
Parameters
+ + +
[in]flagsValues for flags are constructed by a bitwise-inclusive OR of flags from the following list
+
+
+

T_ACCESS - Set the file's last access date.

+

T_CREATE - Set the file's creation date and time.

+

T_WRITE - Set the file's last write/modification date and time.

+
Parameters
+ + + + + + + +
[in]yearValid range 1980 - 2107 inclusive.
[in]monthValid range 1 - 12 inclusive.
[in]dayValid range 1 - 31 inclusive.
[in]hourValid range 0 - 23 inclusive.
[in]minuteValid range 0 - 59 inclusive.
[in]secondValid range 0 - 59 inclusive
+
+
+
Note
It is possible to set an invalid date since there is no check for the number of days in a month.
+
+Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + +
bool SdBaseFile::truncate (uint32_t length)
+
+

Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to length otherwise it will be set to end of file.

+
Parameters
+ + +
[in]lengthThe desired length for the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is read only, file is a directory, length is greater than the current file size or an I/O error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t SdBaseFile::type () const
+
+inline
+
+

Type of file. You should use isFile() or isDir() instead of type() if possible.

+
Returns
The file or directory type.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
SdVolume* SdBaseFile::volume () const
+
+inline
+
+
Returns
SdVolume that contains this file.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::write (const void * buf,
size_t nbyte 
)
+
+

Write data to an open file.

+
Note
Data is moved to the cache but may not be written to the storage device until sync() is called.
+
Parameters
+ + + +
[in]bufPointer to the location of the data to be written.
[in]nbyteNumber of bytes to write.
+
+
+
Returns
For success write() returns the number of bytes written, always nbyte. If an error occurs, write() returns -1. Possible errors include write() is called before a file has been opened, write is called for a read-only file, device is full, a corrupt file system or an I/O error.
+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
bool SdBaseFile::writeError
+
+

writeError is set to true if an error occurs during a write(). Set writeError to false before calling print() and/or write() and check for true after calls to print() and/or write().

+ +
+
+
The documentation for this class was generated from the following files:
    +
  • Arduino/libraries/SdFat/SdBaseFile.h
  • +
  • Arduino/libraries/SdFat/SdBaseFile.cpp
  • +
  • Arduino/libraries/SdFat/SdBaseFilePrint.cpp
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/class_sd_base_file__inherit__graph.png b/libs/SdFat-master/html/class_sd_base_file__inherit__graph.png new file mode 100755 index 0000000..c0fca68 Binary files /dev/null and b/libs/SdFat-master/html/class_sd_base_file__inherit__graph.png differ diff --git a/libs/SdFat-master/html/class_sd_fat-members.html b/libs/SdFat-master/html/class_sd_fat-members.html new file mode 100755 index 0000000..763a2ae --- /dev/null +++ b/libs/SdFat-master/html/class_sd_fat-members.html @@ -0,0 +1,93 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
SdFat Member List
+
+
+ +

This is the complete list of members for SdFat, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
begin(uint8_t chipSelectPin=SD_CHIP_SELECT_PIN, uint8_t sckDivisor=SPI_FULL_SPEED)SdFat
card()SdFatinline
chdir(bool set_cwd=false)SdFat
chdir(const char *path, bool set_cwd=false)SdFat
chvol()SdFat
errorHalt()SdFat
errorHalt(char const *msg)SdFat
errorHalt_P(PGM_P msg)SdFat
errorPrint()SdFat
errorPrint(char const *msg)SdFat
errorPrint_P(PGM_P msg)SdFat
exists(const char *name)SdFat
initErrorHalt()SdFat
initErrorHalt(char const *msg)SdFat
initErrorHalt_P(PGM_P msg)SdFat
initErrorPrint()SdFat
initErrorPrint(char const *msg)SdFat
initErrorPrint_P(PGM_P msg)SdFat
ls(uint8_t flags=0)SdFat
ls(const char *path, uint8_t flags=0)SdFat
ls(Print *pr, uint8_t flags=0)SdFat
ls(Print *pr, const char *path, uint8_t flags=0)SdFat
mkdir(const char *path, bool pFlag=true)SdFat
open(const char *path, uint8_t mode=FILE_READ)SdFatinline
remove(const char *path)SdFat
rename(const char *oldPath, const char *newPath)SdFat
rmdir(const char *path)SdFat
SdFat() (defined in SdFat)SdFatinline
setStdOut(Print *stream)SdFatinlinestatic
stdOut()SdFatinlinestatic
truncate(const char *path, uint32_t length)SdFat
vol()SdFatinline
vwd()SdFatinline
+ + + + diff --git a/libs/SdFat-master/html/class_sd_fat.html b/libs/SdFat-master/html/class_sd_fat.html new file mode 100755 index 0000000..a9bb96e --- /dev/null +++ b/libs/SdFat-master/html/class_sd_fat.html @@ -0,0 +1,1005 @@ + + + + + + +SdFat: SdFat Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

Integration class for the SdFat library. + More...

+ +

#include <SdFat.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool begin (uint8_t chipSelectPin=SD_CHIP_SELECT_PIN, uint8_t sckDivisor=SPI_FULL_SPEED)
 
Sd2Cardcard ()
 
bool chdir (bool set_cwd=false)
 
bool chdir (const char *path, bool set_cwd=false)
 
void chvol ()
 
void errorHalt ()
 
void errorHalt (char const *msg)
 
void errorHalt_P (PGM_P msg)
 
void errorPrint ()
 
void errorPrint (char const *msg)
 
void errorPrint_P (PGM_P msg)
 
bool exists (const char *name)
 
void initErrorHalt ()
 
void initErrorHalt (char const *msg)
 
void initErrorHalt_P (PGM_P msg)
 
void initErrorPrint ()
 
void initErrorPrint (char const *msg)
 
void initErrorPrint_P (PGM_P msg)
 
void ls (uint8_t flags=0)
 
void ls (const char *path, uint8_t flags=0)
 
void ls (Print *pr, uint8_t flags=0)
 
void ls (Print *pr, const char *path, uint8_t flags=0)
 
bool mkdir (const char *path, bool pFlag=true)
 
File open (const char *path, uint8_t mode=FILE_READ)
 
bool remove (const char *path)
 
bool rename (const char *oldPath, const char *newPath)
 
bool rmdir (const char *path)
 
bool truncate (const char *path, uint32_t length)
 
SdVolumevol ()
 
SdBaseFilevwd ()
 
+ + + + + +

+Static Public Member Functions

static void setStdOut (Print *stream)
 
static Print * stdOut ()
 
+

Detailed Description

+

Integration class for the SdFat library.

+

error if old IDE

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SdFat::begin (uint8_t chipSelectPin = SD_CHIP_SELECT_PIN,
uint8_t sckDivisor = SPI_FULL_SPEED 
)
+
+

Initialize an SdFat object.

+

Initializes the SD card, SD volume, and root directory.

+
Parameters
+ + + +
[in]chipSelectPinSD chip select pin. See Sd2Card::init().
[in]sckDivisorvalue for SPI SCK divisor. See Sd2Card::init().
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
Sd2Card* SdFat::card ()
+
+inline
+
+
Returns
a pointer to the Sd2Card object.
+ +
+
+ +
+
+ + + + + + + + +
bool SdFat::chdir (bool set_cwd = false)
+
+

Change a volume's working directory to root

+

Changes the volume's working directory to the SD's root directory. Optionally set the current working directory to the volume's working directory.

+
Parameters
+ + +
[in]set_cwdSet the current working directory to this volume's working directory if true.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SdFat::chdir (const char * path,
bool set_cwd = false 
)
+
+

Change a volume's working directory

+

Changes the volume working directory to the path subdirectory. Optionally set the current working directory to the volume's working directory.

+

Example: If the volume's working directory is "/DIR", chdir("SUB") will change the volume's working directory from "/DIR" to "/DIR/SUB".

+

If path is "/", the volume's working directory will be changed to the root directory

+
Parameters
+ + + +
[in]pathThe name of the subdirectory.
[in]set_cwdSet the current working directory to this volume's working directory if true.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + +
void SdFat::chvol ()
+
+

Set the current working directory to a volume's working directory.

+

This is useful with multiple SD cards.

+

The current working directory is changed to this volume's working directory.

+

This is like the Windows/DOS <drive letter>: command.

+ +
+
+ +
+
+ + + + + + + +
void SdFat::errorHalt ()
+
+

Print any SD error code and halt.

+ +
+
+ +
+
+ + + + + + + + +
void SdFat::errorHalt (char const * msg)
+
+

Print msg, any SD error code, and halt.

+
Parameters
+ + +
[in]msgMessage to print.
+
+
+ +
+
+ +
+
+ + + + + + + + +
void SdFat::errorHalt_P (PGM_P msg)
+
+

Print msg, any SD error code, and halt.

+
Parameters
+ + +
[in]msgMessage in program space (flash memory) to print.
+
+
+ +
+
+ +
+
+ + + + + + + +
void SdFat::errorPrint ()
+
+

Print any SD error code.

+ +
+
+ +
+
+ + + + + + + + +
void SdFat::errorPrint (char const * msg)
+
+

Print msg, any SD error code.

+
Parameters
+ + +
[in]msgMessage to print.
+
+
+ +
+
+ +
+
+ + + + + + + + +
void SdFat::errorPrint_P (PGM_P msg)
+
+

Print msg, any SD error code.

+
Parameters
+ + +
[in]msgMessage in program space (flash memory) to print.
+
+
+ +
+
+ +
+
+ + + + + + + + +
bool SdFat::exists (const char * name)
+
+

Test for the existence of a file.

+
Parameters
+ + +
[in]nameName of the file to be tested for.
+
+
+
Returns
true if the file exists else false.
+ +
+
+ +
+
+ + + + + + + +
void SdFat::initErrorHalt ()
+
+

Print error details and halt after SdFat::init() fails.

+ +
+
+ +
+
+ + + + + + + + +
void SdFat::initErrorHalt (char const * msg)
+
+

Print message, error details, and halt after SdFat::init() fails.

+
Parameters
+ + +
[in]msgMessage to print.
+
+
+ +
+
+ +
+
+ + + + + + + + +
void SdFat::initErrorHalt_P (PGM_P msg)
+
+

Print message, error details, and halt after SdFat::init() fails.

+
Parameters
+ + +
[in]msgMessage in program space (flash memory) to print.
+
+
+ +
+
+ +
+
+ + + + + + + +
void SdFat::initErrorPrint ()
+
+

Print error details after SdFat::init() fails.

+ +
+
+ +
+
+ + + + + + + + +
void SdFat::initErrorPrint (char const * msg)
+
+

Print message and error details and halt after SdFat::init() fails.

+
Parameters
+ + +
[in]msgMessage to print.
+
+
+ +
+
+ +
+
+ + + + + + + + +
void SdFat::initErrorPrint_P (PGM_P msg)
+
+

Print message and error details after SdFat::init() fails.

+
Parameters
+ + +
[in]msgMessage in program space (flash memory) to print.
+
+
+ +
+
+ +
+
+ + + + + + + + +
void SdFat::ls (uint8_t flags = 0)
+
+

List the directory contents of the volume working directory to stdOut.

+
Parameters
+ + +
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void SdFat::ls (const char * path,
uint8_t flags = 0 
)
+
+

List the directory contents of the volume working directory to stdOut.

+
Parameters
+ + + +
[in]pathdirectory to list.
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void SdFat::ls (Print * pr,
uint8_t flags = 0 
)
+
+

List the directory contents of the volume working directory.

+
Parameters
+ + + +
[in]prPrint stream for the list.
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void SdFat::ls (Print * pr,
const char * path,
uint8_t flags = 0 
)
+
+

List the directory contents of the volume working directory to stdOut.

+
Parameters
+ + + + +
[in]prPrint stream for the list.
[in]pathdirectory to list.
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SdFat::mkdir (const char * path,
bool pFlag = true 
)
+
+

Make a subdirectory in the volume working directory.

+
Parameters
+ + + +
[in]pathA path with a valid 8.3 DOS name for the subdirectory.
[in]pFlagCreate missing parent directories if true.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
File SdFat::open (const char * path,
uint8_t mode = FILE_READ 
)
+
+inline
+
+

open a file

+
Parameters
+ + + +
[in]pathlocation of file to be opened.
[in]modeopen mode flags.
+
+
+
Returns
a File object.
+ +
+
+ +
+
+ + + + + + + + +
bool SdFat::remove (const char * path)
+
+

Remove a file from the volume working directory.

+
Parameters
+ + +
[in]pathA path with a valid 8.3 DOS name for the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SdFat::rename (const char * oldPath,
const char * newPath 
)
+
+

Rename a file or subdirectory.

+
Parameters
+ + + +
[in]oldPathPath name to the file or subdirectory to be renamed.
[in]newPathNew path name of the file or subdirectory.
+
+
+

The newPath object must not exist before the rename call.

+

The file to be renamed must not be open. The directory entry may be moved and file system corruption could occur if the file is accessed by a file object that was opened before the rename() call.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + + + + +
bool SdFat::rmdir (const char * path)
+
+

Remove a subdirectory from the volume's working directory.

+
Parameters
+ + +
[in]pathA path with a valid 8.3 DOS name for the subdirectory.
+
+
+

The subdirectory file will be removed only if it is empty.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
static void SdFat::setStdOut (Print * stream)
+
+inlinestatic
+
+

Set stdOut Print stream for messages.

Parameters
+ + +
[in]streamThe new Print stream.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static Print* SdFat::stdOut ()
+
+inlinestatic
+
+
Returns
Print stream for messages.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SdFat::truncate (const char * path,
uint32_t length 
)
+
+

Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to length otherwise it will be set to end of file.

+
Parameters
+ + + +
[in]pathA path with a valid 8.3 DOS name for the file.
[in]lengthThe desired length for the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is read only, file is a directory, length is greater than the current file size or an I/O error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
SdVolume* SdFat::vol ()
+
+inline
+
+
Returns
a pointer to the SdVolume object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
SdBaseFile* SdFat::vwd ()
+
+inline
+
+
Returns
a pointer to the volume working directory.
+ +
+
+
The documentation for this class was generated from the following files:
    +
  • Arduino/libraries/SdFat/SdFat.h
  • +
  • Arduino/libraries/SdFat/SdFat.cpp
  • +
  • Arduino/libraries/SdFat/SdFatErrorPrint.cpp
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/class_sd_file-members.html b/libs/SdFat-master/html/class_sd_file-members.html new file mode 100755 index 0000000..ed9e968 --- /dev/null +++ b/libs/SdFat-master/html/class_sd_file-members.html @@ -0,0 +1,138 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
SdFile Member List
+
+
+ +

This is the complete list of members for SdFile, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
available()SdFileinline
clearWriteError()SdFileinline
close()SdBaseFile
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFile
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFile
curCluster() const SdBaseFileinline
curPosition() const SdBaseFileinline
cwd()SdBaseFileinlinestatic
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFileinlinestatic
dateTimeCallbackCancel()SdBaseFileinlinestatic
dirEntry(dir_t *dir)SdBaseFile
dirName(const dir_t &dir, char *name)SdBaseFilestatic
exists(const char *name)SdBaseFile
fgets(char *str, int16_t num, char *delim=0)SdBaseFile
fileSize() const SdBaseFileinline
firstCluster() const SdBaseFileinline
flush()SdFileinline
getFilename(char *name)SdBaseFile
getpos(FatPos_t *pos)SdBaseFile
getWriteError()SdFileinline
isDir() const SdBaseFileinline
isFile() const SdBaseFileinline
isOpen() const SdBaseFileinline
isRoot() const SdBaseFileinline
isSubDir() const SdBaseFileinline
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFile
ls(uint8_t flags=0)SdBaseFile
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFile
open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFile
open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFile
open(const char *path, uint8_t oflag=O_READ)SdBaseFile
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFile
openRoot(SdVolume *vol)SdBaseFile
peek()SdFileinline
printCreateDateTime(Print *pr)SdBaseFile
printFatDate(uint16_t fatDate)SdBaseFilestatic
printFatDate(Print *pr, uint16_t fatDate)SdBaseFilestatic
printFatTime(uint16_t fatTime)SdBaseFilestatic
printFatTime(Print *pr, uint16_t fatTime)SdBaseFilestatic
printField(float value, char term, uint8_t prec=2)SdBaseFile
printField(int16_t value, char term)SdBaseFile
printField(uint16_t value, char term)SdBaseFile
printField(int32_t value, char term)SdBaseFile
printField(uint32_t value, char term)SdBaseFile
printFileSize(Print *pr)SdBaseFile
printModifyDateTime(Print *pr)SdBaseFile
printName()SdBaseFile
printName(Print *pr)SdBaseFile
read()SdFileinline
read(void *buf, size_t nbyte)SdFileinline
readDir(dir_t *dir)SdBaseFile
remove(SdBaseFile *dirFile, const char *path)SdBaseFilestatic
remove()SdBaseFile
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFile
rewind()SdBaseFileinline
rmdir()SdBaseFile
rmRfStar()SdBaseFile
SdBaseFile()SdBaseFileinline
SdBaseFile(const char *path, uint8_t oflag)SdBaseFile
SdFile() (defined in SdFile)SdFileinline
SdFile(const char *name, uint8_t oflag)SdFile
seekCur(int32_t offset)SdBaseFileinline
seekEnd(int32_t offset=0)SdBaseFileinline
seekSet(uint32_t pos)SdBaseFile
setpos(FatPos_t *pos)SdBaseFile
sync()SdBaseFile
timestamp(SdBaseFile *file)SdBaseFile
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFile
truncate(uint32_t size)SdBaseFile
type() const SdBaseFileinline
volume() const SdBaseFileinline
write(uint8_t b)SdFile
write(const char *str)SdFile
write(const void *buf, size_t nbyte)SdFile
write(const uint8_t *buf, size_t size)SdFileinline
write_P(PGM_P str)SdFile
writeErrorSdBaseFile
writeln_P(PGM_P str)SdFile
+ + + + diff --git a/libs/SdFat-master/html/class_sd_file.html b/libs/SdFat-master/html/class_sd_file.html new file mode 100755 index 0000000..32ba1ed --- /dev/null +++ b/libs/SdFat-master/html/class_sd_file.html @@ -0,0 +1,2784 @@ + + + + + + +SdFat: SdFile Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

SdBaseFile with Arduino Stream. + More...

+ +

#include <SdFile.h>

+
+Inheritance diagram for SdFile:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for SdFile:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

int available ()
 
void clearWriteError ()
 
bool close ()
 
bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
 
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
 
uint32_t curCluster () const
 
uint32_t curPosition () const
 
bool dirEntry (dir_t *dir)
 
bool exists (const char *name)
 
int16_t fgets (char *str, int16_t num, char *delim=0)
 
uint32_t fileSize () const
 
uint32_t firstCluster () const
 
void flush ()
 
bool getFilename (char *name)
 
void getpos (FatPos_t *pos)
 
bool getWriteError ()
 
bool isDir () const
 
bool isFile () const
 
bool isOpen () const
 
bool isRoot () const
 
bool isSubDir () const
 
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
 
void ls (uint8_t flags=0)
 
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
 
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
 
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
 
bool open (const char *path, uint8_t oflag=O_READ)
 
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
 
bool openRoot (SdVolume *vol)
 
int peek ()
 
bool printCreateDateTime (Print *pr)
 
int printField (float value, char term, uint8_t prec=2)
 
int printField (int16_t value, char term)
 
int printField (uint16_t value, char term)
 
int printField (int32_t value, char term)
 
int printField (uint32_t value, char term)
 
size_t printFileSize (Print *pr)
 
bool printModifyDateTime (Print *pr)
 
size_t printName ()
 
size_t printName (Print *pr)
 
int read ()
 
int read (void *buf, size_t nbyte)
 
int8_t readDir (dir_t *dir)
 
bool remove ()
 
bool rename (SdBaseFile *dirFile, const char *newPath)
 
void rewind ()
 
bool rmdir ()
 
bool rmRfStar ()
 
 SdFile (const char *name, uint8_t oflag)
 
bool seekCur (int32_t offset)
 
bool seekEnd (int32_t offset=0)
 
bool seekSet (uint32_t pos)
 
void setpos (FatPos_t *pos)
 
bool sync ()
 
bool timestamp (SdBaseFile *file)
 
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
 
bool truncate (uint32_t size)
 
uint8_t type () const
 
SdVolumevolume () const
 
size_t write (uint8_t b)
 
int write (const char *str)
 
int write (const void *buf, size_t nbyte)
 
size_t write (const uint8_t *buf, size_t size)
 
void write_P (PGM_P str)
 
void writeln_P (PGM_P str)
 
+ + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

static SdBaseFilecwd ()
 
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
 
static void dateTimeCallbackCancel ()
 
static void dirName (const dir_t &dir, char *name)
 
static void printFatDate (uint16_t fatDate)
 
static void printFatDate (Print *pr, uint16_t fatDate)
 
static void printFatTime (uint16_t fatTime)
 
static void printFatTime (Print *pr, uint16_t fatTime)
 
static bool remove (SdBaseFile *dirFile, const char *path)
 
+ + + +

+Public Attributes

bool writeError
 
+

Detailed Description

+

SdBaseFile with Arduino Stream.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
SdFile::SdFile (const char * path,
uint8_t oflag 
)
+
+

Create a file object and open it in the current working directory.

+
Parameters
+ + + +
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
int SdFile::available ()
+
+inline
+
+
Returns
number of bytes available from the current position to EOF or INT_MAX if more than INT_MAX bytes are available.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SdFile::clearWriteError ()
+
+inline
+
+

Set writeError to zero

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::close ()
+
+inherited
+
+

Close a file and force cached data and directory information to be written to the storage device.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include no file is open or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::contiguousRange (uint32_t * bgnBlock,
uint32_t * endBlock 
)
+
+inherited
+
+

Check for contiguous file and return its raw block range.

+
Parameters
+ + + +
[out]bgnBlockthe first block address for the file.
[out]endBlockthe last block address for the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is not contiguous, file has zero length or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::createContiguous (SdBaseFiledirFile,
const char * path,
uint32_t size 
)
+
+inherited
+
+

Create and open a new contiguous file of a specified size.

+
Note
This function only supports short DOS 8.3 names. See open() for more information.
+
Parameters
+ + + + +
[in]dirFileThe directory where the file will be created.
[in]pathA path with a valid DOS 8.3 file name.
[in]sizeThe desired file size.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include path contains an invalid DOS 8.3 file name, the FAT volume has not been initialized, a file is already open, the file already exists, the root directory is full or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::curCluster () const
+
+inlineinherited
+
+
Returns
The current cluster number for a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::curPosition () const
+
+inlineinherited
+
+
Returns
The current position for a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static SdBaseFile* SdBaseFile::cwd ()
+
+inlinestaticinherited
+
+
Returns
Current working directory
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
static void SdBaseFile::dateTimeCallback (void(*)(uint16_t *date, uint16_t *time) dateTime)
+
+inlinestaticinherited
+
+

Set the date/time callback function

+
Parameters
+ + +
[in]dateTimeThe user's call back function. The callback function is of the form:
+
+
+
void dateTime(uint16_t* date, uint16_t* time) {
+
uint16_t year;
+
uint8_t month, day, hour, minute, second;
+
+
// User gets date and time from GPS or real-time clock here
+
+
// return date using FAT_DATE macro to format fields
+
*date = FAT_DATE(year, month, day);
+
+
// return time using FAT_TIME macro to format fields
+
*time = FAT_TIME(hour, minute, second);
+
}
+

Sets the function that is called when a file is created or when a file's directory entry is modified by sync(). All timestamps, access, creation, and modify, are set when a file is created. sync() maintains the last access date and last modify date/time.

+

See the timestamp() function.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static void SdBaseFile::dateTimeCallbackCancel ()
+
+inlinestaticinherited
+
+

Cancel the date/time callback function.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::dirEntry (dir_t * dir)
+
+inherited
+
+

Return a file's directory entry.

+
Parameters
+ + +
[out]dirLocation for return of the file's directory entry.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::dirName (const dir_t & dir,
char * name 
)
+
+staticinherited
+
+

Format the name field of dir into the 13 byte array name in standard 8.3 short name format.

+
Parameters
+ + + +
[in]dirThe directory structure containing the name.
[out]nameA 13 byte char array for the formatted name.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::exists (const char * name)
+
+inherited
+
+

Test for the existence of a file in a directory

+
Parameters
+ + +
[in]nameName of the file to be tested for.
+
+
+

The calling instance must be an open directory file.

+

dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory dirFile.

+
Returns
true if the file exists else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int16_t SdBaseFile::fgets (char * str,
int16_t num,
char * delim = 0 
)
+
+inherited
+
+

Get a string from a file.

+

fgets() reads bytes from a file into the array pointed to by str, until num - 1 bytes are read, or a delimiter is read and transferred to str, or end-of-file is encountered. The string is then terminated with a null byte.

+

fgets() deletes CR, '\r', from the string. This insures only a '\n' terminates the string for Windows text files which use CRLF for newline.

+
Parameters
+ + + + +
[out]strPointer to the array where the string is stored.
[in]numMaximum number of characters to be read (including the final null byte). Usually the length of the array str is used.
[in]delimOptional set of delimiters. The default is "\n".
+
+
+
Returns
For success fgets() returns the length of the string in str. If no data is read, fgets() returns zero for EOF or -1 if an error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::fileSize () const
+
+inlineinherited
+
+
Returns
The total number of bytes in a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::firstCluster () const
+
+inlineinherited
+
+
Returns
The first cluster number for a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SdFile::flush ()
+
+inline
+
+

Ensure that any bytes written to the file are saved to the SD card.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::getFilename (char * name)
+
+inherited
+
+

Get a file's name

+
Parameters
+ + +
[out]nameAn array of 13 characters for the file's name.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::getpos (FatPos_tpos)
+
+inherited
+
+

get position for streams

Parameters
+ + +
[out]posstruct to receive position
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdFile::getWriteError ()
+
+inline
+
+
Returns
value of writeError
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isDir () const
+
+inlineinherited
+
+
Returns
True if this is a directory else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isFile () const
+
+inlineinherited
+
+
Returns
True if this is a normal file else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isOpen () const
+
+inlineinherited
+
+
Returns
True if this is an open file/directory else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isRoot () const
+
+inlineinherited
+
+
Returns
True if this is the root directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isSubDir () const
+
+inlineinherited
+
+
Returns
True if this is a subdirectory else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void SdBaseFile::ls (Print * pr,
uint8_t flags = 0,
uint8_t indent = 0 
)
+
+inherited
+
+

List directory contents.

+
Parameters
+ + + +
[in]prPrint stream for list.
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+
Parameters
+ + +
[in]indentAmount of space before file name. Used for recursive list to indicate subdirectory level.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::ls (uint8_t flags = 0)
+
+inherited
+
+

List directory contents to stdOut.

+
Parameters
+ + +
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::mkdir (SdBaseFileparent,
const char * path,
bool pFlag = true 
)
+
+inherited
+
+

Make a new directory.

+
Parameters
+ + + + +
[in]parentAn open SdFat instance for the directory that will contain the new directory.
[in]pathA path with a valid 8.3 DOS name for the new directory.
[in]pFlagCreate missing parent directories if true.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, parent is not a directory, path is invalid or already exists in parent.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (SdBaseFiledirFile,
uint16_t index,
uint8_t oflag 
)
+
+inherited
+
+

Open a file by index.

+
Parameters
+ + + + +
[in]dirFileAn open SdFat instance for the directory.
[in]indexThe index of the directory entry for the file to be opened. The value for index is (directory file position)/32.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
+
+
+

See open() by path for definition of flags.

Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (SdBaseFiledirFile,
const char * path,
uint8_t oflag 
)
+
+inherited
+
+

Open a file or directory by name.

+
Parameters
+ + + + +
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags from the following list
+
+
+

O_READ - Open for reading.

+

O_RDONLY - Same as O_READ.

+

O_WRITE - Open for writing.

+

O_WRONLY - Same as O_WRITE.

+

O_RDWR - Open for reading and writing.

+

O_APPEND - If set, the file offset shall be set to the end of the file prior to each write.

+

O_AT_END - Set the initial position at the end of the file.

+

O_CREAT - If the file exists, this flag has no effect except as noted under O_EXCL below. Otherwise, the file shall be created

+

O_EXCL - If O_CREAT and O_EXCL are set, open() shall fail if the file exists.

+

O_SYNC - Call sync() after each write. This flag should not be used with write(uint8_t), write_P(PGM_P), writeln_P(PGM_P), or the Arduino Print class. These functions do character at a time writes so sync() will be called after each byte.

+

O_TRUNC - If the file exists and is a regular file, and the file is successfully opened and is not read only, its length shall be truncated to 0.

+

WARNING: A given file must not be opened by more than one SdBaseFile object or file corruption may occur.

+
Note
Directory files must be opened read only. Write and truncation is not allowed for directory files.
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, dirFile is not a directory, path is invalid, the file does not exist or can't be opened in the access mode specified by oflag.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (const char * path,
uint8_t oflag = O_READ 
)
+
+inherited
+
+

Open a file in the current working directory.

+
Parameters
+ + + +
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::openNext (SdBaseFiledirFile,
uint8_t oflag 
)
+
+inherited
+
+

Open the next file or subdirectory in a directory.

+
Parameters
+ + + +
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
+
+
+

See open() by path for definition of flags.

Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::openRoot (SdVolumevol)
+
+inherited
+
+

Open a volume's root directory.

+
Parameters
+ + +
[in]volThe FAT volume containing the root directory to be opened.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is already open, the FAT volume has not been initialized or it a FAT12 volume.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int SdFile::peek ()
+
+inline
+
+

Return the next available byte without consuming it.

+
Returns
The byte if no error and not at eof else -1;
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::printCreateDateTime (Print * pr)
+
+inherited
+
+

Print a file's creation date and time

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::printFatDate (uint16_t fatDate)
+
+staticinherited
+
+

Print a directory date field to stdOut.

+

Format is yyyy-mm-dd.

+
Parameters
+ + +
[in]fatDateThe date field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::printFatDate (Print * pr,
uint16_t fatDate 
)
+
+staticinherited
+
+

Print a directory date field.

+

Format is yyyy-mm-dd.

+
Parameters
+ + + +
[in]prPrint stream for output.
[in]fatDateThe date field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::printFatTime (uint16_t fatTime)
+
+staticinherited
+
+

Print a directory time field to stdOut.

+

Format is hh:mm:ss.

+
Parameters
+ + +
[in]fatTimeThe time field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::printFatTime (Print * pr,
uint16_t fatTime 
)
+
+staticinherited
+
+

Print a directory time field.

+

Format is hh:mm:ss.

+
Parameters
+ + + +
[in]prPrint stream for output.
[in]fatTimeThe time field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (float value,
char term,
uint8_t prec = 2 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
[in]precNumber of digits after decimal point.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (int16_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (uint16_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (int32_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (uint32_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
size_t SdBaseFile::printFileSize (Print * pr)
+
+inherited
+
+

Print a file's size.

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::printModifyDateTime (Print * pr)
+
+inherited
+
+

Print a file's modify date and time

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t SdBaseFile::printName ()
+
+inherited
+
+

Print a file's name to stdOut

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
size_t SdBaseFile::printName (Print * pr)
+
+inherited
+
+

Print a file's name

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int SdFile::read ()
+
+inline
+
+

Read the next byte from a file.

+
Returns
For success return the next byte in the file as an int. If an error occurs or end of file is reached return -1.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdFile::read (void * buf,
size_t nbyte 
)
+
+inline
+
+

Read data from a file starting at the current position.

+
Parameters
+ + + +
[out]bufPointer to the location that will receive the data.
[in]nbyteMaximum number of bytes to read.
+
+
+
Returns
For success read() returns the number of bytes read. A value less than nbyte, including zero, will be returned if end of file is reached. If an error occurs, read() returns -1. Possible errors include read() called before a file has been opened, corrupt file system or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int8_t SdBaseFile::readDir (dir_t * dir)
+
+inherited
+
+

Read the next directory entry from a directory file.

+
Parameters
+ + +
[out]dirThe dir_t struct that will receive the data.
+
+
+
Returns
For success readDir() returns the number of bytes read. A value of zero will be returned if end of file is reached. If an error occurs, readDir() returns -1. Possible errors include readDir() called before a directory has been opened, this is not a directory file or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::remove (SdBaseFiledirFile,
const char * path 
)
+
+staticinherited
+
+

Remove a file.

+

The directory entry and all data for the file are deleted.

+
Parameters
+ + + +
[in]dirFileThe directory that contains the file.
[in]pathPath for the file to be removed.
+
+
+
Note
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is a directory, is read only, dirFile is not a directory, path is not found or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::remove ()
+
+inherited
+
+

Remove a file.

+

The directory entry and all data for the file are deleted.

+
Note
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file read-only, is a directory, or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::rename (SdBaseFiledirFile,
const char * newPath 
)
+
+inherited
+
+

Rename a file or subdirectory.

+
Parameters
+ + + +
[in]dirFileDirectory for the new path.
[in]newPathNew path name for the file/directory.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include dirFile is not open or is not a directory file, newPath is invalid or already exists, or an I/O error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SdBaseFile::rewind ()
+
+inlineinherited
+
+

Set the file's current position to zero.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::rmdir ()
+
+inherited
+
+

Remove a directory file.

+

The directory file will be removed only if it is empty and is not the root directory. rmdir() follows DOS and Windows and ignores the read-only attribute for the directory.

+
Note
This function should not be used to delete the 8.3 version of a directory that has a long name. For example if a directory has the long name "New folder" you should not delete the 8.3 name "NEWFOL~1".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is not a directory, is the root directory, is not empty, or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::rmRfStar ()
+
+inherited
+
+

Recursively delete a directory and all contained files.

+

This is like the Unix/Linux 'rm -rf *' if called with the root directory hence the name.

+

Warning - This will remove all contents of the directory including subdirectories. The directory will then be removed if it is not root. The read-only attribute for files will be ignored.

+
Note
This function should not be used to delete the 8.3 version of a directory that has a long name. See remove() and rmdir().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::seekCur (int32_t offset)
+
+inlineinherited
+
+

Set the files position to current position + pos. See seekSet().

Parameters
+ + +
[in]offsetThe new position in bytes from the current position.
+
+
+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::seekEnd (int32_t offset = 0)
+
+inlineinherited
+
+

Set the files position to end-of-file + offset. See seekSet().

Parameters
+ + +
[in]offsetThe new position in bytes from end-of-file.
+
+
+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::seekSet (uint32_t pos)
+
+inherited
+
+

Sets a file's position.

+
Parameters
+ + +
[in]posThe new position in bytes from the beginning of the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::setpos (FatPos_tpos)
+
+inherited
+
+

set position for streams

Parameters
+ + +
[out]posstruct with value for new position
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::sync ()
+
+inherited
+
+

The sync() call causes all modified data and directory fields to be written to the storage device.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include a call to sync() before a file has been opened or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::timestamp (SdBaseFilefile)
+
+inherited
+
+

Copy a file's timestamps

+
Parameters
+ + +
[in]fileFile to copy timestamps from.
+
+
+
Note
Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::timestamp (uint8_t flags,
uint16_t year,
uint8_t month,
uint8_t day,
uint8_t hour,
uint8_t minute,
uint8_t second 
)
+
+inherited
+
+

Set a file's timestamps in its directory entry.

+
Parameters
+ + +
[in]flagsValues for flags are constructed by a bitwise-inclusive OR of flags from the following list
+
+
+

T_ACCESS - Set the file's last access date.

+

T_CREATE - Set the file's creation date and time.

+

T_WRITE - Set the file's last write/modification date and time.

+
Parameters
+ + + + + + + +
[in]yearValid range 1980 - 2107 inclusive.
[in]monthValid range 1 - 12 inclusive.
[in]dayValid range 1 - 31 inclusive.
[in]hourValid range 0 - 23 inclusive.
[in]minuteValid range 0 - 59 inclusive.
[in]secondValid range 0 - 59 inclusive
+
+
+
Note
It is possible to set an invalid date since there is no check for the number of days in a month.
+
+Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::truncate (uint32_t length)
+
+inherited
+
+

Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to length otherwise it will be set to end of file.

+
Parameters
+ + +
[in]lengthThe desired length for the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is read only, file is a directory, length is greater than the current file size or an I/O error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t SdBaseFile::type () const
+
+inlineinherited
+
+

Type of file. You should use isFile() or isDir() instead of type() if possible.

+
Returns
The file or directory type.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
SdVolume* SdBaseFile::volume () const
+
+inlineinherited
+
+
Returns
SdVolume that contains this file.
+ +
+
+ +
+
+ + + + + + + + +
size_t SdFile::write (uint8_t b)
+
+

Write a byte to a file. Required by the Arduino Print class.

Parameters
+ + +
[in]bthe byte to be written. Use getWriteError to check for errors.
+
+
+
Returns
1 for success and 0 for failure.
+ +
+
+ +
+
+ + + + + + + + +
int SdFile::write (const char * str)
+
+

Write a string to a file. Used by the Arduino Print class.

Parameters
+ + +
[in]strPointer to the string. Use getWriteError to check for errors.
+
+
+
Returns
count of characters written for success or -1 for failure.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int SdFile::write (const void * buf,
size_t nbyte 
)
+
+

Write data to an open file.

+
Note
Data is moved to the cache but may not be written to the storage device until sync() is called.
+
Parameters
+ + + +
[in]bufPointer to the location of the data to be written.
[in]nbyteNumber of bytes to write.
+
+
+
Returns
For success write() returns the number of bytes written, always nbyte. If an error occurs, write() returns -1. Possible errors include write() is called before a file has been opened, write is called for a read-only file, device is full, a corrupt file system or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
size_t SdFile::write (const uint8_t * buf,
size_t size 
)
+
+inline
+
+

Write data to an open file. Form required by Print.

+
Note
Data is moved to the cache but may not be written to the storage device until sync() is called.
+
Parameters
+ + + +
[in]bufPointer to the location of the data to be written.
[in]sizeNumber of bytes to write.
+
+
+
Returns
For success write() returns the number of bytes written, always nbyte. If an error occurs, write() returns -1. Possible errors include write() is called before a file has been opened, write is called for a read-only file, device is full, a corrupt file system or an I/O error.
+ +
+
+ +
+
+ + + + + + + + +
void SdFile::write_P (PGM_P str)
+
+

Write a PROGMEM string to a file.

Parameters
+ + +
[in]strPointer to the PROGMEM string. Use getWriteError to check for errors.
+
+
+ +
+
+ +
+
+ + + + + + + + +
void SdFile::writeln_P (PGM_P str)
+
+

Write a PROGMEM string followed by CR/LF to a file.

Parameters
+ + +
[in]strPointer to the PROGMEM string. Use getWriteError to check for errors.
+
+
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
bool SdBaseFile::writeError
+
+inherited
+
+

writeError is set to true if an error occurs during a write(). Set writeError to false before calling print() and/or write() and check for true after calls to print() and/or write().

+ +
+
+
The documentation for this class was generated from the following files:
    +
  • Arduino/libraries/SdFat/SdFile.h
  • +
  • Arduino/libraries/SdFat/SdFile.cpp
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/class_sd_file__coll__graph.png b/libs/SdFat-master/html/class_sd_file__coll__graph.png new file mode 100755 index 0000000..ecb6352 Binary files /dev/null and b/libs/SdFat-master/html/class_sd_file__coll__graph.png differ diff --git a/libs/SdFat-master/html/class_sd_file__inherit__graph.png b/libs/SdFat-master/html/class_sd_file__inherit__graph.png new file mode 100755 index 0000000..ecb6352 Binary files /dev/null and b/libs/SdFat-master/html/class_sd_file__inherit__graph.png differ diff --git a/libs/SdFat-master/html/class_sd_spi-members.html b/libs/SdFat-master/html/class_sd_spi-members.html new file mode 100755 index 0000000..3e33878 --- /dev/null +++ b/libs/SdFat-master/html/class_sd_spi-members.html @@ -0,0 +1,66 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
SdSpi Member List
+
+
+ +

This is the complete list of members for SdSpi, including all inherited members.

+ + + + + + + +
begin()SdSpi
init(uint8_t spiDivisor)SdSpi
receive()SdSpi
receive(uint8_t *buf, size_t n)SdSpi
send(uint8_t data)SdSpi
send(const uint8_t *buf, size_t n)SdSpi
+ + + + diff --git a/libs/SdFat-master/html/class_sd_spi.html b/libs/SdFat-master/html/class_sd_spi.html new file mode 100755 index 0000000..02c9998 --- /dev/null +++ b/libs/SdFat-master/html/class_sd_spi.html @@ -0,0 +1,235 @@ + + + + + + +SdFat: SdSpi Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+ +
+
SdSpi Class Reference
+
+
+ +

SPI class for access to SD and SDHC flash memory cards. + More...

+ +

#include <SdSpi.h>

+ + + + + + + + + + + + + + +

+Public Member Functions

void begin ()
 
void init (uint8_t spiDivisor)
 
uint8_t receive ()
 
uint8_t receive (uint8_t *buf, size_t n)
 
void send (uint8_t data)
 
void send (const uint8_t *buf, size_t n)
 
+

Detailed Description

+

SPI class for access to SD and SDHC flash memory cards.

+

Member Function Documentation

+ +
+
+ + + + + + + +
void SdSpi::begin ()
+
+

Initialize the SPI bus

+ +
+
+ +
+
+ + + + + + + + +
void SdSpi::init (uint8_t spiDivisor)
+
+

Set SPI options for access to SD/SDHC cards.

+
Parameters
+ + +
[in]spiDivisorSCK clock divider relative to the system clock.
+
+
+ +
+
+ +
+
+ + + + + + + +
uint8_t SdSpi::receive ()
+
+

Receive a byte.

+
Returns
The byte.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
uint8_t SdSpi::receive (uint8_t * buf,
size_t n 
)
+
+

Receive multiple bytes.

+
Parameters
+ + + +
[out]bufBuffer to receive the data.
[in]nNumber of bytes to receive.
+
+
+
Returns
Zero for no error or nonzero error code.
+ +
+
+ +
+
+ + + + + + + + +
void SdSpi::send (uint8_t data)
+
+

Send a byte.

+
Parameters
+ + +
[in]dataByte to send
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void SdSpi::send (const uint8_t * buf,
size_t n 
)
+
+

Send multiple bytes.

+
Parameters
+ + + +
[in]bufBuffer for data to be sent.
[in]nNumber of bytes to send.
+
+
+ +
+
+
The documentation for this class was generated from the following file:
    +
  • Arduino/libraries/SdFat/SdSpi.h
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/class_sd_stream_base-members.html b/libs/SdFat-master/html/class_sd_stream_base-members.html new file mode 100755 index 0000000..95184c9 --- /dev/null +++ b/libs/SdFat-master/html/class_sd_stream_base-members.html @@ -0,0 +1,187 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
SdStreamBase Member List
+
+
+ +

This is the complete list of members for SdStreamBase, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ateios_basestatic
available()SdBaseFileinlineprotected
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
clear(iostate state=goodbit)iosinline
clearWriteError()SdBaseFileinlineprotected
close()SdBaseFileprotected
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFileprotected
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFileprotected
cur enum valueios_base
curCluster() const SdBaseFileinlineprotected
curPosition() const SdBaseFileinlineprotected
cwd()SdBaseFileinlineprotectedstatic
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFileinlineprotectedstatic
dateTimeCallbackCancel()SdBaseFileinlineprotectedstatic
decios_basestatic
dirEntry(dir_t *dir)SdBaseFileprotected
dirName(const dir_t &dir, char *name)SdBaseFileprotectedstatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
exists(const char *name)SdBaseFileprotected
fail() const iosinline
failbitios_basestatic
fgets(char *str, int16_t num, char *delim=0)SdBaseFileprotected
fileSize() const SdBaseFileinlineprotected
fill()ios_baseinline
fill(char c)ios_baseinline
firstCluster() const SdBaseFileinlineprotected
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
fmtflags typedefios_base
getFilename(char *name)SdBaseFileprotected
getpos(FatPos_t *pos)SdBaseFileprotected
getWriteError()SdBaseFileinlineprotected
good() const iosinline
goodbitios_basestatic
hexios_basestatic
inios_basestatic
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
isDir() const SdBaseFileinlineprotected
isFile() const SdBaseFileinlineprotected
isOpen() const SdBaseFileinlineprotected
isRoot() const SdBaseFileinlineprotected
isSubDir() const SdBaseFileinlineprotected
leftios_basestatic
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFileprotected
ls(uint8_t flags=0)SdBaseFileprotected
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFileprotected
octios_basestatic
off_type typedefios_base
open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFileprotected
open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFileprotected
open(const char *path, uint8_t oflag=O_READ)SdBaseFileprotected
openmode typedefios_base
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFileprotected
openRoot(SdVolume *vol)SdBaseFileprotected
operator const void *() const iosinline
operator!() const iosinline
outios_basestatic
peek()SdBaseFileprotected
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
printCreateDateTime(Print *pr)SdBaseFileprotected
printFatDate(uint16_t fatDate)SdBaseFileprotectedstatic
printFatDate(Print *pr, uint16_t fatDate)SdBaseFileprotectedstatic
printFatTime(uint16_t fatTime)SdBaseFileprotectedstatic
printFatTime(Print *pr, uint16_t fatTime)SdBaseFileprotectedstatic
printField(float value, char term, uint8_t prec=2)SdBaseFileprotected
printField(int16_t value, char term)SdBaseFileprotected
printField(uint16_t value, char term)SdBaseFileprotected
printField(int32_t value, char term)SdBaseFileprotected
printField(uint32_t value, char term)SdBaseFileprotected
printFileSize(Print *pr)SdBaseFileprotected
printModifyDateTime(Print *pr)SdBaseFileprotected
printName()SdBaseFileprotected
printName(Print *pr)SdBaseFileprotected
rdstate() const iosinline
read()SdBaseFileprotected
read(void *buf, size_t nbyte)SdBaseFileprotected
readDir(dir_t *dir)SdBaseFileprotected
remove(SdBaseFile *dirFile, const char *path)SdBaseFileprotectedstatic
remove()SdBaseFileprotected
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFileprotected
rewind()SdBaseFileinlineprotected
rightios_basestatic
rmdir()SdBaseFileprotected
rmRfStar()SdBaseFileprotected
SdBaseFile()SdBaseFileinlineprotected
SdBaseFile(const char *path, uint8_t oflag)SdBaseFileprotected
seekCur(int32_t offset)SdBaseFileinlineprotected
seekdir enum nameios_base
seekEnd(int32_t offset=0)SdBaseFileinlineprotected
seekSet(uint32_t pos)SdBaseFileprotected
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setpos(FatPos_t *pos)SdBaseFileprotected
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipwsios_basestatic
streamsize typedefios_base
sync()SdBaseFileprotected
timestamp(SdBaseFile *file)SdBaseFileprotected
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFileprotected
truncios_basestatic
truncate(uint32_t size)SdBaseFileprotected
type() const SdBaseFileinlineprotected
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
volume() const SdBaseFileinlineprotected
width()ios_baseinline
width(unsigned n)ios_baseinline
write(const void *buf, size_t nbyte)SdBaseFileprotected
writeErrorSdBaseFileprotected
+ + + + diff --git a/libs/SdFat-master/html/class_sd_stream_base.html b/libs/SdFat-master/html/class_sd_stream_base.html new file mode 100755 index 0000000..ccf9b23 --- /dev/null +++ b/libs/SdFat-master/html/class_sd_stream_base.html @@ -0,0 +1,3947 @@ + + + + + + +SdFat: SdStreamBase Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

Base class for SD streams. + More...

+ +

#include <SdStream.h>

+
+Inheritance diagram for SdStreamBase:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for SdStreamBase:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool bad () const
 
void clear (iostate state=goodbit)
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
bool good () const
 
 operator const void * () const
 
bool operator! () const
 
int precision () const
 
int precision (unsigned int n)
 
iostate rdstate () const
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Member Functions

uint32_t available ()
 
void clearWriteError ()
 
bool close ()
 
bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
 
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
 
uint32_t curCluster () const
 
uint32_t curPosition () const
 
bool dirEntry (dir_t *dir)
 
bool exists (const char *name)
 
int16_t fgets (char *str, int16_t num, char *delim=0)
 
uint32_t fileSize () const
 
uint32_t firstCluster () const
 
uint8_t flagsToBase ()
 
bool getFilename (char *name)
 
void getpos (FatPos_t *pos)
 
bool getWriteError ()
 
bool isDir () const
 
bool isFile () const
 
bool isOpen () const
 
bool isRoot () const
 
bool isSubDir () const
 
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
 
void ls (uint8_t flags=0)
 
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
 
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
 
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
 
bool open (const char *path, uint8_t oflag=O_READ)
 
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
 
bool openRoot (SdVolume *vol)
 
int peek ()
 
bool printCreateDateTime (Print *pr)
 
int printField (float value, char term, uint8_t prec=2)
 
int printField (int16_t value, char term)
 
int printField (uint16_t value, char term)
 
int printField (int32_t value, char term)
 
int printField (uint32_t value, char term)
 
size_t printFileSize (Print *pr)
 
bool printModifyDateTime (Print *pr)
 
size_t printName ()
 
size_t printName (Print *pr)
 
int16_t read ()
 
int read (void *buf, size_t nbyte)
 
int8_t readDir (dir_t *dir)
 
bool remove ()
 
bool rename (SdBaseFile *dirFile, const char *newPath)
 
void rewind ()
 
bool rmdir ()
 
bool rmRfStar ()
 
bool seekCur (int32_t offset)
 
bool seekEnd (int32_t offset=0)
 
bool seekSet (uint32_t pos)
 
void setpos (FatPos_t *pos)
 
bool sync ()
 
bool timestamp (SdBaseFile *file)
 
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
 
bool truncate (uint32_t size)
 
uint8_t type () const
 
SdVolumevolume () const
 
int write (const void *buf, size_t nbyte)
 
+ + + + + + + + + + + + + + + + + + + +

+Static Protected Member Functions

static SdBaseFilecwd ()
 
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
 
static void dateTimeCallbackCancel ()
 
static void dirName (const dir_t &dir, char *name)
 
static void printFatDate (uint16_t fatDate)
 
static void printFatDate (Print *pr, uint16_t fatDate)
 
static void printFatTime (uint16_t fatTime)
 
static void printFatTime (Print *pr, uint16_t fatTime)
 
static bool remove (SdBaseFile *dirFile, const char *path)
 
+ + + +

+Protected Attributes

bool writeError
 
+

Detailed Description

+

Base class for SD streams.

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::available ()
+
+inlineinherited
+
+
Returns
number of bytes available from yhe current position to EOF
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inlineinherited
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::clear (iostate state = goodbit)
+
+inlineinherited
+
+

Clear iostate bits.

+
Parameters
+ + +
[in]stateThe flags you want to set after clearing all flags.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SdBaseFile::clearWriteError ()
+
+inlineinherited
+
+

Set writeError to zero

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::close ()
+
+inherited
+
+

Close a file and force cached data and directory information to be written to the storage device.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include no file is open or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::contiguousRange (uint32_t * bgnBlock,
uint32_t * endBlock 
)
+
+inherited
+
+

Check for contiguous file and return its raw block range.

+
Parameters
+ + + +
[out]bgnBlockthe first block address for the file.
[out]endBlockthe last block address for the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is not contiguous, file has zero length or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::createContiguous (SdBaseFiledirFile,
const char * path,
uint32_t size 
)
+
+inherited
+
+

Create and open a new contiguous file of a specified size.

+
Note
This function only supports short DOS 8.3 names. See open() for more information.
+
Parameters
+ + + + +
[in]dirFileThe directory where the file will be created.
[in]pathA path with a valid DOS 8.3 file name.
[in]sizeThe desired file size.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include path contains an invalid DOS 8.3 file name, the FAT volume has not been initialized, a file is already open, the file already exists, the root directory is full or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::curCluster () const
+
+inlineinherited
+
+
Returns
The current cluster number for a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::curPosition () const
+
+inlineinherited
+
+
Returns
The current position for a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static SdBaseFile* SdBaseFile::cwd ()
+
+inlinestaticinherited
+
+
Returns
Current working directory
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
static void SdBaseFile::dateTimeCallback (void(*)(uint16_t *date, uint16_t *time) dateTime)
+
+inlinestaticinherited
+
+

Set the date/time callback function

+
Parameters
+ + +
[in]dateTimeThe user's call back function. The callback function is of the form:
+
+
+
void dateTime(uint16_t* date, uint16_t* time) {
+
uint16_t year;
+
uint8_t month, day, hour, minute, second;
+
+
// User gets date and time from GPS or real-time clock here
+
+
// return date using FAT_DATE macro to format fields
+
*date = FAT_DATE(year, month, day);
+
+
// return time using FAT_TIME macro to format fields
+
*time = FAT_TIME(hour, minute, second);
+
}
+

Sets the function that is called when a file is created or when a file's directory entry is modified by sync(). All timestamps, access, creation, and modify, are set when a file is created. sync() maintains the last access date and last modify date/time.

+

See the timestamp() function.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static void SdBaseFile::dateTimeCallbackCancel ()
+
+inlinestaticinherited
+
+

Cancel the date/time callback function.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::dirEntry (dir_t * dir)
+
+inherited
+
+

Return a file's directory entry.

+
Parameters
+ + +
[out]dirLocation for return of the file's directory entry.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::dirName (const dir_t & dir,
char * name 
)
+
+staticinherited
+
+

Format the name field of dir into the 13 byte array name in standard 8.3 short name format.

+
Parameters
+ + + +
[in]dirThe directory structure containing the name.
[out]nameA 13 byte char array for the formatted name.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inlineinherited
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::exists (const char * name)
+
+inherited
+
+

Test for the existence of a file in a directory

+
Parameters
+ + +
[in]nameName of the file to be tested for.
+
+
+

The calling instance must be an open directory file.

+

dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory dirFile.

+
Returns
true if the file exists else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inlineinherited
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int16_t SdBaseFile::fgets (char * str,
int16_t num,
char * delim = 0 
)
+
+inherited
+
+

Get a string from a file.

+

fgets() reads bytes from a file into the array pointed to by str, until num - 1 bytes are read, or a delimiter is read and transferred to str, or end-of-file is encountered. The string is then terminated with a null byte.

+

fgets() deletes CR, '\r', from the string. This insures only a '\n' terminates the string for Windows text files which use CRLF for newline.

+
Parameters
+ + + + +
[out]strPointer to the array where the string is stored.
[in]numMaximum number of characters to be read (including the final null byte). Usually the length of the array str is used.
[in]delimOptional set of delimiters. The default is "\n".
+
+
+
Returns
For success fgets() returns the length of the string in str. If no data is read, fgets() returns zero for EOF or -1 if an error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::fileSize () const
+
+inlineinherited
+
+
Returns
The total number of bytes in a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdBaseFile::firstCluster () const
+
+inlineinherited
+
+
Returns
The first cluster number for a file or directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::getFilename (char * name)
+
+inherited
+
+

Get a file's name

+
Parameters
+ + +
[out]nameAn array of 13 characters for the file's name.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::getpos (FatPos_tpos)
+
+inherited
+
+

get position for streams

Parameters
+ + +
[out]posstruct to receive position
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::getWriteError ()
+
+inlineinherited
+
+
Returns
value of writeError
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inlineinherited
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isDir () const
+
+inlineinherited
+
+
Returns
True if this is a directory else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isFile () const
+
+inlineinherited
+
+
Returns
True if this is a normal file else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isOpen () const
+
+inlineinherited
+
+
Returns
True if this is an open file/directory else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isRoot () const
+
+inlineinherited
+
+
Returns
True if this is the root directory.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::isSubDir () const
+
+inlineinherited
+
+
Returns
True if this is a subdirectory else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void SdBaseFile::ls (Print * pr,
uint8_t flags = 0,
uint8_t indent = 0 
)
+
+inherited
+
+

List directory contents.

+
Parameters
+ + + +
[in]prPrint stream for list.
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+
Parameters
+ + +
[in]indentAmount of space before file name. Used for recursive list to indicate subdirectory level.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::ls (uint8_t flags = 0)
+
+inherited
+
+

List directory contents to stdOut.

+
Parameters
+ + +
[in]flagsThe inclusive OR of
+
+
+

LS_DATE - Print file modification date

+

LS_SIZE - Print file size.

+

LS_R - Recursive list of subdirectories.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::mkdir (SdBaseFileparent,
const char * path,
bool pFlag = true 
)
+
+inherited
+
+

Make a new directory.

+
Parameters
+ + + + +
[in]parentAn open SdFat instance for the directory that will contain the new directory.
[in]pathA path with a valid 8.3 DOS name for the new directory.
[in]pFlagCreate missing parent directories if true.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, parent is not a directory, path is invalid or already exists in parent.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (SdBaseFiledirFile,
uint16_t index,
uint8_t oflag 
)
+
+inherited
+
+

Open a file by index.

+
Parameters
+ + + + +
[in]dirFileAn open SdFat instance for the directory.
[in]indexThe index of the directory entry for the file to be opened. The value for index is (directory file position)/32.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
+
+
+

See open() by path for definition of flags.

Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (SdBaseFiledirFile,
const char * path,
uint8_t oflag 
)
+
+inherited
+
+

Open a file or directory by name.

+
Parameters
+ + + + +
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags from the following list
+
+
+

O_READ - Open for reading.

+

O_RDONLY - Same as O_READ.

+

O_WRITE - Open for writing.

+

O_WRONLY - Same as O_WRITE.

+

O_RDWR - Open for reading and writing.

+

O_APPEND - If set, the file offset shall be set to the end of the file prior to each write.

+

O_AT_END - Set the initial position at the end of the file.

+

O_CREAT - If the file exists, this flag has no effect except as noted under O_EXCL below. Otherwise, the file shall be created

+

O_EXCL - If O_CREAT and O_EXCL are set, open() shall fail if the file exists.

+

O_SYNC - Call sync() after each write. This flag should not be used with write(uint8_t), write_P(PGM_P), writeln_P(PGM_P), or the Arduino Print class. These functions do character at a time writes so sync() will be called after each byte.

+

O_TRUNC - If the file exists and is a regular file, and the file is successfully opened and is not read only, its length shall be truncated to 0.

+

WARNING: A given file must not be opened by more than one SdBaseFile object or file corruption may occur.

+
Note
Directory files must be opened read only. Write and truncation is not allowed for directory files.
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, dirFile is not a directory, path is invalid, the file does not exist or can't be opened in the access mode specified by oflag.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::open (const char * path,
uint8_t oflag = O_READ 
)
+
+inherited
+
+

Open a file in the current working directory.

+
Parameters
+ + + +
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::openNext (SdBaseFiledirFile,
uint8_t oflag 
)
+
+inherited
+
+

Open the next file or subdirectory in a directory.

+
Parameters
+ + + +
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
+
+
+

See open() by path for definition of flags.

Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::openRoot (SdVolumevol)
+
+inherited
+
+

Open a volume's root directory.

+
Parameters
+ + +
[in]volThe FAT volume containing the root directory to be opened.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is already open, the FAT volume has not been initialized or it a FAT12 volume.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inlineinherited
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inlineinherited
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int SdBaseFile::peek ()
+
+inherited
+
+

Return the next available byte without consuming it.

+
Returns
The byte if no error and not at eof else -1;
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::printCreateDateTime (Print * pr)
+
+inherited
+
+

Print a file's creation date and time

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::printFatDate (uint16_t fatDate)
+
+staticinherited
+
+

Print a directory date field to stdOut.

+

Format is yyyy-mm-dd.

+
Parameters
+ + +
[in]fatDateThe date field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::printFatDate (Print * pr,
uint16_t fatDate 
)
+
+staticinherited
+
+

Print a directory date field.

+

Format is yyyy-mm-dd.

+
Parameters
+ + + +
[in]prPrint stream for output.
[in]fatDateThe date field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::printFatTime (uint16_t fatTime)
+
+staticinherited
+
+

Print a directory time field to stdOut.

+

Format is hh:mm:ss.

+
Parameters
+ + +
[in]fatTimeThe time field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SdBaseFile::printFatTime (Print * pr,
uint16_t fatTime 
)
+
+staticinherited
+
+

Print a directory time field.

+

Format is hh:mm:ss.

+
Parameters
+ + + +
[in]prPrint stream for output.
[in]fatTimeThe time field from a directory entry.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (float value,
char term,
uint8_t prec = 2 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
[in]precNumber of digits after decimal point.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (int16_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (uint16_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (int32_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::printField (uint32_t value,
char term 
)
+
+inherited
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator. Use '\n' for CR LF.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
size_t SdBaseFile::printFileSize (Print * pr)
+
+inherited
+
+

Print a file's size.

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::printModifyDateTime (Print * pr)
+
+inherited
+
+

Print a file's modify date and time

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t SdBaseFile::printName ()
+
+inherited
+
+

Print a file's name to stdOut

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
size_t SdBaseFile::printName (Print * pr)
+
+inherited
+
+

Print a file's name

+
Parameters
+ + +
[in]prPrint stream for output.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inlineinherited
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int16_t SdBaseFile::read ()
+
+inherited
+
+

Read the next byte from a file.

+
Returns
For success read returns the next byte in the file as an int. If an error occurs or end of file is reached -1 is returned.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::read (void * buf,
size_t nbyte 
)
+
+inherited
+
+

Read data from a file starting at the current position.

+
Parameters
+ + + +
[out]bufPointer to the location that will receive the data.
[in]nbyteMaximum number of bytes to read.
+
+
+
Returns
For success read() returns the number of bytes read. A value less than nbyte, including zero, will be returned if end of file is reached. If an error occurs, read() returns -1. Possible errors include read() called before a file has been opened, corrupt file system or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int8_t SdBaseFile::readDir (dir_t * dir)
+
+inherited
+
+

Read the next directory entry from a directory file.

+
Parameters
+ + +
[out]dirThe dir_t struct that will receive the data.
+
+
+
Returns
For success readDir() returns the number of bytes read. A value of zero will be returned if end of file is reached. If an error occurs, readDir() returns -1. Possible errors include readDir() called before a directory has been opened, this is not a directory file or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::remove (SdBaseFiledirFile,
const char * path 
)
+
+staticinherited
+
+

Remove a file.

+

The directory entry and all data for the file are deleted.

+
Parameters
+ + + +
[in]dirFileThe directory that contains the file.
[in]pathPath for the file to be removed.
+
+
+
Note
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is a directory, is read only, dirFile is not a directory, path is not found or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::remove ()
+
+inherited
+
+

Remove a file.

+

The directory entry and all data for the file are deleted.

+
Note
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file read-only, is a directory, or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdBaseFile::rename (SdBaseFiledirFile,
const char * newPath 
)
+
+inherited
+
+

Rename a file or subdirectory.

+
Parameters
+ + + +
[in]dirFileDirectory for the new path.
[in]newPathNew path name for the file/directory.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include dirFile is not open or is not a directory file, newPath is invalid or already exists, or an I/O error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SdBaseFile::rewind ()
+
+inlineinherited
+
+

Set the file's current position to zero.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::rmdir ()
+
+inherited
+
+

Remove a directory file.

+

The directory file will be removed only if it is empty and is not the root directory. rmdir() follows DOS and Windows and ignores the read-only attribute for the directory.

+
Note
This function should not be used to delete the 8.3 version of a directory that has a long name. For example if a directory has the long name "New folder" you should not delete the 8.3 name "NEWFOL~1".
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is not a directory, is the root directory, is not empty, or an I/O error occurred.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::rmRfStar ()
+
+inherited
+
+

Recursively delete a directory and all contained files.

+

This is like the Unix/Linux 'rm -rf *' if called with the root directory hence the name.

+

Warning - This will remove all contents of the directory including subdirectories. The directory will then be removed if it is not root. The read-only attribute for files will be ignored.

+
Note
This function should not be used to delete the 8.3 version of a directory that has a long name. See remove() and rmdir().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::seekCur (int32_t offset)
+
+inlineinherited
+
+

Set the files position to current position + pos. See seekSet().

Parameters
+ + +
[in]offsetThe new position in bytes from the current position.
+
+
+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::seekEnd (int32_t offset = 0)
+
+inlineinherited
+
+

Set the files position to end-of-file + offset. See seekSet().

Parameters
+ + +
[in]offsetThe new position in bytes from end-of-file.
+
+
+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::seekSet (uint32_t pos)
+
+inherited
+
+

Sets a file's position.

+
Parameters
+ + +
[in]posThe new position in bytes from the beginning of the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void SdBaseFile::setpos (FatPos_tpos)
+
+inherited
+
+

set position for streams

Parameters
+ + +
[out]posstruct with value for new position
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inlineinherited
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool SdBaseFile::sync ()
+
+inherited
+
+

The sync() call causes all modified data and directory fields to be written to the storage device.

+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include a call to sync() before a file has been opened or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::timestamp (SdBaseFilefile)
+
+inherited
+
+

Copy a file's timestamps

+
Parameters
+ + +
[in]fileFile to copy timestamps from.
+
+
+
Note
Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool SdBaseFile::timestamp (uint8_t flags,
uint16_t year,
uint8_t month,
uint8_t day,
uint8_t hour,
uint8_t minute,
uint8_t second 
)
+
+inherited
+
+

Set a file's timestamps in its directory entry.

+
Parameters
+ + +
[in]flagsValues for flags are constructed by a bitwise-inclusive OR of flags from the following list
+
+
+

T_ACCESS - Set the file's last access date.

+

T_CREATE - Set the file's creation date and time.

+

T_WRITE - Set the file's last write/modification date and time.

+
Parameters
+ + + + + + + +
[in]yearValid range 1980 - 2107 inclusive.
[in]monthValid range 1 - 12 inclusive.
[in]dayValid range 1 - 31 inclusive.
[in]hourValid range 0 - 23 inclusive.
[in]minuteValid range 0 - 59 inclusive.
[in]secondValid range 0 - 59 inclusive
+
+
+
Note
It is possible to set an invalid date since there is no check for the number of days in a month.
+
+Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdBaseFile::truncate (uint32_t length)
+
+inherited
+
+

Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to length otherwise it will be set to end of file.

+
Parameters
+ + +
[in]lengthThe desired length for the file.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is read only, file is a directory, length is greater than the current file size or an I/O error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t SdBaseFile::type () const
+
+inlineinherited
+
+

Type of file. You should use isFile() or isDir() instead of type() if possible.

+
Returns
The file or directory type.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
SdVolume* SdBaseFile::volume () const
+
+inlineinherited
+
+
Returns
SdVolume that contains this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int SdBaseFile::write (const void * buf,
size_t nbyte 
)
+
+inherited
+
+

Write data to an open file.

+
Note
Data is moved to the cache but may not be written to the storage device until sync() is called.
+
Parameters
+ + + +
[in]bufPointer to the location of the data to be written.
[in]nbyteNumber of bytes to write.
+
+
+
Returns
For success write() returns the number of bytes written, always nbyte. If an error occurs, write() returns -1. Possible errors include write() is called before a file has been opened, write is called for a read-only file, device is full, a corrupt file system or an I/O error.
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+ +
+
+ + + + + +
+ + + + +
bool SdBaseFile::writeError
+
+inherited
+
+

writeError is set to true if an error occurs during a write(). Set writeError to false before calling print() and/or write() and check for true after calls to print() and/or write().

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/class_sd_stream_base__coll__graph.png b/libs/SdFat-master/html/class_sd_stream_base__coll__graph.png new file mode 100755 index 0000000..916d5ab Binary files /dev/null and b/libs/SdFat-master/html/class_sd_stream_base__coll__graph.png differ diff --git a/libs/SdFat-master/html/class_sd_stream_base__inherit__graph.png b/libs/SdFat-master/html/class_sd_stream_base__inherit__graph.png new file mode 100755 index 0000000..b4c8948 Binary files /dev/null and b/libs/SdFat-master/html/class_sd_stream_base__inherit__graph.png differ diff --git a/libs/SdFat-master/html/class_sd_volume-members.html b/libs/SdFat-master/html/class_sd_volume-members.html new file mode 100755 index 0000000..381df60 --- /dev/null +++ b/libs/SdFat-master/html/class_sd_volume-members.html @@ -0,0 +1,78 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
SdVolume Member List
+
+
+ +

This is the complete list of members for SdVolume, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
blocksPerCluster() const SdVolumeinline
blocksPerFat() const SdVolumeinline
cacheClear()SdVolumeinline
clusterCount() const SdVolumeinline
clusterSizeShift() const SdVolumeinline
dataStartBlock() const SdVolumeinline
dbgFat(uint32_t n, uint32_t *v)SdVolumeinline
fatCount() const SdVolumeinline
fatStartBlock() const SdVolumeinline
fatType() const SdVolumeinline
freeClusterCount()SdVolume
init(Sd2Card *dev)SdVolumeinline
init(Sd2Card *dev, uint8_t part)SdVolume
rootDirEntryCount() const SdVolumeinline
rootDirStart() const SdVolumeinline
SdBaseFile (defined in SdVolume)SdVolumefriend
sdCard()SdVolumeinline
SdVolume()SdVolumeinline
+ + + + diff --git a/libs/SdFat-master/html/class_sd_volume.html b/libs/SdFat-master/html/class_sd_volume.html new file mode 100755 index 0000000..3dbc690 --- /dev/null +++ b/libs/SdFat-master/html/class_sd_volume.html @@ -0,0 +1,557 @@ + + + + + + +SdFat: SdVolume Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+ +
+
SdVolume Class Reference
+
+
+ +

Access FAT16 and FAT32 volumes on SD and SDHC cards. + More...

+ +

#include <SdVolume.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

uint8_t blocksPerCluster () const
 
uint32_t blocksPerFat () const
 
cache_tcacheClear ()
 
uint32_t clusterCount () const
 
uint8_t clusterSizeShift () const
 
uint32_t dataStartBlock () const
 
bool dbgFat (uint32_t n, uint32_t *v)
 
uint8_t fatCount () const
 
uint32_t fatStartBlock () const
 
uint8_t fatType () const
 
int32_t freeClusterCount ()
 
bool init (Sd2Card *dev)
 
bool init (Sd2Card *dev, uint8_t part)
 
uint32_t rootDirEntryCount () const
 
uint32_t rootDirStart () const
 
Sd2CardsdCard ()
 
 SdVolume ()
 
+ + + +

+Friends

+class SdBaseFile
 
+

Detailed Description

+

Access FAT16 and FAT32 volumes on SD and SDHC cards.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
SdVolume::SdVolume ()
+
+inline
+
+

Create an instance of SdVolume

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
uint8_t SdVolume::blocksPerCluster () const
+
+inline
+
+
Returns
The volume's cluster size in blocks.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdVolume::blocksPerFat () const
+
+inline
+
+
Returns
The number of blocks in one FAT.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
cache_t* SdVolume::cacheClear ()
+
+inline
+
+

Clear the cache and returns a pointer to the cache. Used by the WaveRP recorder to do raw write to the SD card. Not for normal apps.

Returns
A pointer to the cache buffer or zero if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdVolume::clusterCount () const
+
+inline
+
+
Returns
The total number of clusters in the volume.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t SdVolume::clusterSizeShift () const
+
+inline
+
+
Returns
The shift count required to multiply by blocksPerCluster.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdVolume::dataStartBlock () const
+
+inline
+
+
Returns
The logical block number for the start of file data.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool SdVolume::dbgFat (uint32_t n,
uint32_t * v 
)
+
+inline
+
+

Debug access to FAT table

+
Parameters
+ + + +
[in]ncluster number.
[out]vvalue of entry
+
+
+
Returns
true for success or false for failure
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t SdVolume::fatCount () const
+
+inline
+
+
Returns
The number of FAT structures on the volume.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdVolume::fatStartBlock () const
+
+inline
+
+
Returns
The logical block number for the start of the first FAT.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t SdVolume::fatType () const
+
+inline
+
+
Returns
The FAT type of the volume. Values are 12, 16 or 32.
+ +
+
+ +
+
+ + + + + + + +
int32_t SdVolume::freeClusterCount ()
+
+

Volume free space in clusters.

+
Returns
Count of free clusters for success or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
bool SdVolume::init (Sd2Carddev)
+
+inline
+
+

Initialize a FAT volume. Try partition one first then try super floppy format.

+
Parameters
+ + +
[in]devThe Sd2Card where the volume is located.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include not finding a valid partition, not finding a valid FAT file system or an I/O error.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SdVolume::init (Sd2Carddev,
uint8_t part 
)
+
+

Initialize a FAT volume.

+
Parameters
+ + + +
[in]devThe SD card where the volume is located.
[in]partThe partition to be used. Legal values for part are 1-4 to use the corresponding partition on a device formatted with a MBR, Master Boot Record, or zero if the device is formatted as a super floppy with the FAT boot sector in block zero.
+
+
+
Returns
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include not finding a valid partition, not finding a valid FAT file system in the specified partition or an I/O error.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdVolume::rootDirEntryCount () const
+
+inline
+
+
Returns
The number of entries in the root directory for FAT16 volumes.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint32_t SdVolume::rootDirStart () const
+
+inline
+
+
Returns
The logical block number for the start of the root directory on FAT16 volumes or the first cluster number on FAT32 volumes.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
Sd2Card* SdVolume::sdCard ()
+
+inline
+
+

Sd2Card object for this volume

Returns
pointer to Sd2Card object.
+ +
+
+
The documentation for this class was generated from the following files:
    +
  • Arduino/libraries/SdFat/SdVolume.h
  • +
  • Arduino/libraries/SdFat/SdVolume.cpp
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/class_stdio_stream-members.html b/libs/SdFat-master/html/class_stdio_stream-members.html new file mode 100755 index 0000000..0b61c70 --- /dev/null +++ b/libs/SdFat-master/html/class_stdio_stream-members.html @@ -0,0 +1,172 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
StdioStream Member List
+
+
+ +

This is the complete list of members for StdioStream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
available()SdBaseFileinlineprivate
clearerr()StdioStreaminline
clearWriteError()SdBaseFileinlineprivate
close()SdBaseFileprivate
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFileprivate
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFileprivate
curCluster() const SdBaseFileinlineprivate
curPosition() const SdBaseFileinlineprivate
cwd()SdBaseFileinlineprivatestatic
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFileinlineprivatestatic
dateTimeCallbackCancel()SdBaseFileinlineprivatestatic
dirEntry(dir_t *dir)SdBaseFileprivate
dirName(const dir_t &dir, char *name)SdBaseFileprivatestatic
exists(const char *name)SdBaseFileprivate
fclose()StdioStream
feof()StdioStreaminline
ferror()StdioStreaminline
fflush()StdioStream
fgetc()StdioStreaminline
fgets(char *str, int num, size_t *len=0)StdioStream
SdBaseFile::fgets(char *str, int16_t num, char *delim=0)SdBaseFileprivate
fileSize() const SdBaseFileinlineprivate
firstCluster() const SdBaseFileinlineprivate
fopen(const char *filename, const char *mode)StdioStream
fputc(int c)StdioStreaminline
fputs(const char *str)StdioStream
fputs_P(PGM_P str)StdioStream
fread(void *ptr, size_t size, size_t count)StdioStream
fseek(int32_t offset, int origin)StdioStream
ftell()StdioStream
fwrite(const void *ptr, size_t size, size_t count)StdioStream
getc()StdioStreaminline
getFilename(char *name)SdBaseFileprivate
getpos(FatPos_t *pos)SdBaseFileprivate
getWriteError()SdBaseFileinlineprivate
isDir() const SdBaseFileinlineprivate
isFile() const SdBaseFileinlineprivate
isOpen() const SdBaseFileinlineprivate
isRoot() const SdBaseFileinlineprivate
isSubDir() const SdBaseFileinlineprivate
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFileprivate
ls(uint8_t flags=0)SdBaseFileprivate
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFileprivate
open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFileprivate
open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFileprivate
open(const char *path, uint8_t oflag=O_READ)SdBaseFileprivate
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFileprivate
openRoot(SdVolume *vol)SdBaseFileprivate
peek()SdBaseFileprivate
print(char c)StdioStreaminline
print(const char *str)StdioStreaminline
print(const __FlashStringHelper *str)StdioStream
print(double val, uint8_t prec=2)StdioStreaminline
print(float val, uint8_t prec=2)StdioStreaminline
print(T val)StdioStreaminline
printCreateDateTime(Print *pr)SdBaseFileprivate
printDec(char n)StdioStreaminline
printDec(signed char n)StdioStream
printDec(unsigned char n)StdioStreaminline
printDec(int16_t n)StdioStream
printDec(uint16_t n)StdioStream
printDec(int32_t n)StdioStream
printDec(uint32_t n)StdioStream
printDec(double value, uint8_t prec)StdioStreaminline
printDec(float value, uint8_t prec)StdioStream
printFatDate(uint16_t fatDate)SdBaseFileprivatestatic
printFatDate(Print *pr, uint16_t fatDate)SdBaseFileprivatestatic
printFatTime(uint16_t fatTime)SdBaseFileprivatestatic
printFatTime(Print *pr, uint16_t fatTime)SdBaseFileprivatestatic
printField(double value, char term, uint8_t prec=2)StdioStreaminline
printField(float value, char term, uint8_t prec=2)StdioStreaminline
printField(T value, char term)StdioStreaminline
SdBaseFile::printField(int16_t value, char term)SdBaseFileprivate
SdBaseFile::printField(uint16_t value, char term)SdBaseFileprivate
SdBaseFile::printField(int32_t value, char term)SdBaseFileprivate
SdBaseFile::printField(uint32_t value, char term)SdBaseFileprivate
printFileSize(Print *pr)SdBaseFileprivate
printHex(uint32_t n)StdioStream
printHexln(uint32_t n)StdioStreaminline
println()StdioStreaminline
println(double val, uint8_t prec=2)StdioStreaminline
println(float val, uint8_t prec=2)StdioStreaminline
println(T val)StdioStreaminline
printModifyDateTime(Print *pr)SdBaseFileprivate
printName()SdBaseFileprivate
printName(Print *pr)SdBaseFileprivate
putc(int c)StdioStreaminline
putCRLF()StdioStreaminline
read()SdBaseFileprivate
read(void *buf, size_t nbyte)SdBaseFileprivate
readDir(dir_t *dir)SdBaseFileprivate
remove(SdBaseFile *dirFile, const char *path)SdBaseFileprivatestatic
remove()SdBaseFileprivate
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFileprivate
rewind()StdioStream
rmdir()SdBaseFileprivate
rmRfStar()SdBaseFileprivate
SdBaseFile()SdBaseFileinlineprivate
SdBaseFile(const char *path, uint8_t oflag)SdBaseFileprivate
seekCur(int32_t offset)SdBaseFileinlineprivate
seekEnd(int32_t offset=0)SdBaseFileinlineprivate
seekSet(uint32_t pos)SdBaseFileprivate
setpos(FatPos_t *pos)SdBaseFileprivate
StdioStream()StdioStreaminline
sync()SdBaseFileprivate
timestamp(SdBaseFile *file)SdBaseFileprivate
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFileprivate
truncate(uint32_t size)SdBaseFileprivate
type() const SdBaseFileinlineprivate
ungetc(int c)StdioStream
volume() const SdBaseFileinlineprivate
writeErrorSdBaseFileprivate
+ + + + diff --git a/libs/SdFat-master/html/class_stdio_stream.html b/libs/SdFat-master/html/class_stdio_stream.html new file mode 100755 index 0000000..8858389 --- /dev/null +++ b/libs/SdFat-master/html/class_stdio_stream.html @@ -0,0 +1,1732 @@ + + + + + + +SdFat: StdioStream Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

StdioStream implements a minimal stdio stream. + More...

+ +

#include <StdioStream.h>

+
+Inheritance diagram for StdioStream:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for StdioStream:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

void clearerr ()
 
int fclose ()
 
int feof ()
 
int ferror ()
 
int fflush ()
 
int fgetc ()
 
char * fgets (char *str, int num, size_t *len=0)
 
bool fopen (const char *filename, const char *mode)
 
int fputc (int c)
 
int fputs (const char *str)
 
int fputs_P (PGM_P str)
 
size_t fread (void *ptr, size_t size, size_t count)
 
int fseek (int32_t offset, int origin)
 
int32_t ftell ()
 
size_t fwrite (const void *ptr, size_t size, size_t count)
 
int getc ()
 
size_t print (char c)
 
size_t print (const char *str)
 
size_t print (const __FlashStringHelper *str)
 
size_t print (double val, uint8_t prec=2)
 
size_t print (float val, uint8_t prec=2)
 
template<typename T >
size_t print (T val)
 
int printDec (char n)
 
int printDec (signed char n)
 
int printDec (unsigned char n)
 
int printDec (int16_t n)
 
int printDec (uint16_t n)
 
int printDec (int32_t n)
 
int printDec (uint32_t n)
 
int printDec (double value, uint8_t prec)
 
int printDec (float value, uint8_t prec)
 
int printField (double value, char term, uint8_t prec=2)
 
int printField (float value, char term, uint8_t prec=2)
 
template<typename T >
int printField (T value, char term)
 
int printHex (uint32_t n)
 
int printHexln (uint32_t n)
 
size_t println ()
 
size_t println (double val, uint8_t prec=2)
 
size_t println (float val, uint8_t prec=2)
 
template<typename T >
size_t println (T val)
 
int putc (int c)
 
int putCRLF ()
 
bool rewind ()
 
 StdioStream ()
 
int ungetc (int c)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Private Member Functions

uint32_t available ()
 
void clearWriteError ()
 
bool close ()
 
bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
 
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
 
uint32_t curCluster () const
 
uint32_t curPosition () const
 
bool dirEntry (dir_t *dir)
 
bool exists (const char *name)
 
int16_t fgets (char *str, int16_t num, char *delim=0)
 
uint32_t fileSize () const
 
uint32_t firstCluster () const
 
bool getFilename (char *name)
 
void getpos (FatPos_t *pos)
 
bool getWriteError ()
 
bool isDir () const
 
bool isFile () const
 
bool isOpen () const
 
bool isRoot () const
 
bool isSubDir () const
 
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
 
void ls (uint8_t flags=0)
 
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
 
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
 
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
 
bool open (const char *path, uint8_t oflag=O_READ)
 
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
 
bool openRoot (SdVolume *vol)
 
int peek ()
 
bool printCreateDateTime (Print *pr)
 
int printField (int16_t value, char term)
 
int printField (uint16_t value, char term)
 
int printField (int32_t value, char term)
 
int printField (uint32_t value, char term)
 
size_t printFileSize (Print *pr)
 
bool printModifyDateTime (Print *pr)
 
size_t printName ()
 
size_t printName (Print *pr)
 
int16_t read ()
 
int read (void *buf, size_t nbyte)
 
int8_t readDir (dir_t *dir)
 
bool remove ()
 
bool rename (SdBaseFile *dirFile, const char *newPath)
 
bool rmdir ()
 
bool rmRfStar ()
 
bool seekCur (int32_t offset)
 
bool seekEnd (int32_t offset=0)
 
bool seekSet (uint32_t pos)
 
void setpos (FatPos_t *pos)
 
bool sync ()
 
bool timestamp (SdBaseFile *file)
 
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
 
bool truncate (uint32_t size)
 
uint8_t type () const
 
SdVolumevolume () const
 
+ + + + + + + + + + + + + + + + + + + +

+Static Private Member Functions

static SdBaseFilecwd ()
 
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
 
static void dateTimeCallbackCancel ()
 
static void dirName (const dir_t &dir, char *name)
 
static void printFatDate (uint16_t fatDate)
 
static void printFatDate (Print *pr, uint16_t fatDate)
 
static void printFatTime (uint16_t fatTime)
 
static void printFatTime (Print *pr, uint16_t fatTime)
 
static bool remove (SdBaseFile *dirFile, const char *path)
 
+ + + +

+Private Attributes

bool writeError
 
+

Detailed Description

+

StdioStream implements a minimal stdio stream.

+

StdioStream does not support subdirectories or long file names.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
StdioStream::StdioStream ()
+
+inline
+
+

Constructor

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void StdioStream::clearerr ()
+
+inline
+
+

Clear the stream's end-of-file and error indicators.

+ +
+
+ +
+
+ + + + + + + +
int StdioStream::fclose ()
+
+

Close a stream.

+

A successful call to the fclose function causes the stream to be flushed and the associated file to be closed. Any unwritten buffered data is written to the file; any unread buffered data is discarded. Whether or not the call succeeds, the stream is disassociated from the file.

+
Returns
zero if the stream was successfully closed, or EOF if any any errors are detected.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int StdioStream::feof ()
+
+inline
+
+

Test the stream's end-of-file indicator.

Returns
non-zero if and only if the end-of-file indicator is set.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int StdioStream::ferror ()
+
+inline
+
+

Test the stream's error indicator.

Returns
return non-zero if and only if the error indicator is set.
+ +
+
+ +
+
+ + + + + + + +
int StdioStream::fflush ()
+
+

Flush the stream.

+

If stream is an output stream or an update stream in which the most recent operation was not input, any unwritten data is written to the file; otherwise the call is an error since any buffered input data would be lost.

+
Returns
sets the error indicator for the stream and returns EOF if an error occurs, otherwise it returns zero.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int StdioStream::fgetc ()
+
+inline
+
+

Get a byte from the stream.

+
Returns
If the end-of-file indicator for the stream is set, or if the stream is at end-of-file, the end-of-file indicator for the stream is set and the fgetc function returns EOF. Otherwise, the fgetc function returns the next character from the input stream.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
char * StdioStream::fgets (char * str,
int num,
size_t * len = 0 
)
+
+

Get a string from a stream.

+

The fgets function reads at most one less than the number of characters specified by num from the stream into the array pointed to by str. No additional characters are read after a new-line character (which is retained) or after end-of-file. A null character is written immediately after the last character read into the array.

+
Parameters
+ + + + +
[out]strPointer to an array of where the string is copied.
[in]numMaximum number of characters including the null character.
[out]lenIf len is not null and fgets is successful, the length of the string is returned.
+
+
+
Returns
str if successful. If end-of-file is encountered and no characters have been read into the array, the contents of the array remain unchanged and a null pointer is returned. If a read error occurs during the operation, the array contents are indeterminate and a null pointer is returned.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool StdioStream::fopen (const char * filename,
const char * mode 
)
+
+

Open a stream.

+

Open a file and associates the stream with it.

+
Parameters
+ + + +
[in]filenamename of the file to be opened.
[in]modea string that indicates the open mode.
+
+
+ + + + + + + + + + + + + + + + + +
"r" or "rb" Open a file for reading. The file must exist.
"w" or "wb" Truncate an existing to zero length or create an empty file for writing.
"wx" or "wbx" Create a file for writing. Fails if the file already exists.
"a" or "ab" Append; open or create file for writing at end-of-file.
"r+" or "rb+" or "r+b" Open a file for update (reading and writing).
"w+" or "w+b" or "wb+" Truncate an existing to zero length or create a file for update.
"w+x" or "w+bx" or "wb+x" Create a file for update. Fails if the file already exists.
"a+" or "a+b" or "ab+" Append; open or create a file for update, writing at end-of-file.
+

The character 'b' shall have no effect, but is allowed for ISO C standard conformance.

+

Opening a file with append mode causes all subsequent writes to the file to be forced to the then current end-of-file, regardless of intervening calls to the fseek function.

+

When a file is opened with update mode, both input and output may be performed on the associated stream. However, output shall not be directly followed by input without an intervening call to the fflush function or to a file positioning function (fseek, or rewind), and input shall not be directly followed by output without an intervening call to a file positioning function, unless the input operation encounters endof-file.

+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int StdioStream::fputc (int c)
+
+inline
+
+

Write a byte to a stream.

+
Parameters
+ + +
[in]cthe byte to be written (converted to an unsigned char).
+
+
+
Returns
Upon successful completion, fputc() returns the value it has written. Otherwise, it returns EOF and sets the error indicator for the stream.
+ +
+
+ +
+
+ + + + + + + + +
int StdioStream::fputs (const char * str)
+
+

Write a string to a stream.

+
Parameters
+ + +
[in]stra pointer to the string to be written.
+
+
+
Returns
for success, fputs() returns a non-negative number. Otherwise, it returns EOF and sets the error indicator for the stream.
+ +
+
+ +
+
+ + + + + + + + +
int StdioStream::fputs_P (PGM_P str)
+
+

Write a string stored in flash.

+
Parameters
+ + +
[in]strstring to be written.
+
+
+
Returns
for success, fputs() returns a non-negative number. Otherwise, it returns EOF and sets the error indicator for the stream.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t StdioStream::fread (void * ptr,
size_t size,
size_t count 
)
+
+

Binary input.

+

Reads an array of up to count elements, each one with a size of size bytes.

Parameters
+ + + + +
[out]ptrpointer to area of at least (size*count) bytes where the data will be stored.
[in]sizethe size, in bytes, of each element to be read.
[in]countthe number of elements to be read.
+
+
+
Returns
number of elements successfully read, which may be less than count if a read error or end-of-file is encountered. If size or count is zero, fread returns zero and the contents of the array and the state of the stream remain unchanged.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int StdioStream::fseek (int32_t offset,
int origin 
)
+
+

Set the file position for the stream.

+
Parameters
+ + + +
[in]offsetnumber of offset from the origin.
[in]originposition used as reference for the offset. It is specified by one of the following constants.
+
+
+

SEEK_SET - Beginning of file.

+

SEEK_CUR - Current position of the file pointer.

+

SEEK_END - End of file.

+
Returns
zero for success. Otherwise, it returns non-zero and sets the error indicator for the stream.
+ +
+
+ +
+
+ + + + + + + +
int32_t StdioStream::ftell ()
+
+

Get the current position in a stream.

+
Returns
If successful, ftell return the current value of the position indicator. On failure, ftell returns −1L.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t StdioStream::fwrite (const void * ptr,
size_t size,
size_t count 
)
+
+

Binary output.

+

Writes an array of up to count elements, each one with a size of size bytes.

Parameters
+ + + + +
[in]ptrpointer to (size*count) bytes of data to be written.
[in]sizethe size, in bytes, of each element to be written.
[in]countthe number of elements to be written.
+
+
+
Returns
number of elements successfully written. if this number is less than count, an error has occured. If size or count is zero, fwrite returns zero.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int StdioStream::getc ()
+
+inline
+
+

Get a byte from the stream.

+

getc and fgetc are equivalent but getc is inline so it is faster but require more flash memory.

+
Returns
If the end-of-file indicator for the stream is set, or if the stream is at end-of-file, the end-of-file indicator for the stream is set and the fgetc function returns EOF. Otherwise, the fgetc function returns the next character from the input stream.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
size_t StdioStream::print (char c)
+
+inline
+
+

Write a character.

Parameters
+ + +
[in]cthe character to write.
+
+
+
Returns
the number of bytes written.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
size_t StdioStream::print (const char * str)
+
+inline
+
+

Write a string.

+
Parameters
+ + +
[in]strthe string to be written.
+
+
+
Returns
the number of bytes written.
+ +
+
+ +
+
+ + + + + + + + +
size_t StdioStream::print (const __FlashStringHelper * str)
+
+

Print a string stored in flash memory.

+
Parameters
+ + +
[in]strthe string to print.
+
+
+
Returns
the number of bytes written.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
size_t StdioStream::print (double val,
uint8_t prec = 2 
)
+
+inline
+
+

Print a floating point number.

+
Parameters
+ + + +
[in]precNumber of digits after decimal point.
[in]valthe number to be printed.
+
+
+
Returns
the number of bytes written.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
size_t StdioStream::print (float val,
uint8_t prec = 2 
)
+
+inline
+
+

Print a floating point number.

+
Parameters
+ + + +
[in]precNumber of digits after decimal point.
[in]valthe number to be printed.
+
+
+
Returns
the number of bytes written.
+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
size_t StdioStream::print (val)
+
+inline
+
+

Print a number.

+
Parameters
+ + +
[in]valthe number to be printed.
+
+
+
Returns
the number of bytes written.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int StdioStream::printDec (char n)
+
+inline
+
+

Print a char as a number.

Parameters
+ + +
[in]nnumber to be printed.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + +
int StdioStream::printDec (signed char n)
+
+

print a signed 8-bit integer

Parameters
+ + +
[in]nnumber to be printed.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int StdioStream::printDec (unsigned char n)
+
+inline
+
+

Print an unsigned 8-bit number.

Parameters
+ + +
[in]nnumber to be print.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + +
int StdioStream::printDec (int16_t n)
+
+

Print a int16_t

Parameters
+ + +
[in]nnumber to be printed.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + +
int StdioStream::printDec (uint16_t n)
+
+

print a uint16_t.

Parameters
+ + +
[in]nnumber to be printed.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + +
int StdioStream::printDec (int32_t n)
+
+

Print a signed 32-bit integer.

Parameters
+ + +
[in]nnumber to be printed.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + +
int StdioStream::printDec (uint32_t n)
+
+

Write an unsigned 32-bit number.

Parameters
+ + +
[in]nnumber to be printed.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int StdioStream::printDec (double value,
uint8_t prec 
)
+
+inline
+
+

Print a double.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]precNumber of digits after decimal point.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int StdioStream::printDec (float value,
uint8_t prec 
)
+
+

Print a float.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]precNumber of digits after decimal point.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int StdioStream::printField (double value,
char term,
uint8_t prec = 2 
)
+
+inline
+
+

Print a number followed by a field terminator.

Parameters
+ + + + +
[in]valueThe number to be printed.
[in]termThe field terminator.
[in]precNumber of digits after decimal point.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int StdioStream::printField (float value,
char term,
uint8_t prec = 2 
)
+
+inline
+
+

Print a number followed by a field terminator.

Parameters
+ + + + +
[in]valueThe number to be printed.
[in]termThe field terminator.
[in]precNumber of digits after decimal point.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
int StdioStream::printField (value,
char term 
)
+
+inline
+
+

Print a number followed by a field terminator.

Parameters
+ + + +
[in]valueThe number to be printed.
[in]termThe field terminator.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + + + + +
int StdioStream::printHex (uint32_t n)
+
+

Print HEX

Parameters
+ + +
[in]nnumber to be printed as HEX.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int StdioStream::printHexln (uint32_t n)
+
+inline
+
+

Print HEX with CRLF

Parameters
+ + +
[in]nnumber to be printed as HEX.
+
+
+
Returns
The number of bytes written or -1 if an error occurs.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t StdioStream::println ()
+
+inline
+
+

Write a CR/LF.

+
Returns
two, the number of bytes written, for success or zero for failure.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
size_t StdioStream::println (double val,
uint8_t prec = 2 
)
+
+inline
+
+

Print a floating point number followed by CR/LF.

+
Parameters
+ + + +
[in]valthe number to be printed.
[in]precNumber of digits after decimal point.
+
+
+
Returns
the number of bytes written.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
size_t StdioStream::println (float val,
uint8_t prec = 2 
)
+
+inline
+
+

Print a floating point number followed by CR/LF.

+
Parameters
+ + + +
[in]valthe number to be printed.
[in]precNumber of digits after decimal point.
+
+
+
Returns
the number of bytes written.
+ +
+
+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
size_t StdioStream::println (val)
+
+inline
+
+

Print an item followed by CR/LF

+
Parameters
+ + +
[in]valthe item to be printed.
+
+
+
Returns
the number of bytes written.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int StdioStream::putc (int c)
+
+inline
+
+

Write a byte to a stream.

+

putc and fputc are equivalent but putc is inline so it is faster but require more flash memory.

+
Parameters
+ + +
[in]cthe byte to be written (converted to an unsigned char).
+
+
+
Returns
Upon successful completion, fputc() returns the value it has written. Otherwise, it returns EOF and sets the error indicator for the stream.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int StdioStream::putCRLF ()
+
+inline
+
+

Write a CR/LF.

+
Returns
two, the number of bytes written, for success or -1 for failure.
+ +
+
+ +
+
+ + + + + + + +
bool StdioStream::rewind ()
+
+

Set position of a stream to the beginning.

+

The rewind function sets the file position to the beginning of the file. It is equivalent to fseek(0L, SEEK_SET) except that the error indicator for the stream is also cleared.

+
Returns
true for success or false for failure.
+ +
+
+ +
+
+ + + + + + + + +
int StdioStream::ungetc (int c)
+
+

Push a byte back into an input stream.

+
Parameters
+ + +
[in]cthe byte (converted to an unsigned char) to be pushed back.
+
+
+

One character of pushback is guaranteed. If the ungetc function is called too many times without an intervening read or file positioning operation on that stream, the operation may fail.

+

A successful intervening call to a file positioning function (fseek, fsetpos, or rewind) discards any pushed-back characters for the stream.

+
Returns
Upon successful completion, ungetc() returns the byte pushed back after conversion. Otherwise it returns EOF.
+ +
+
+
The documentation for this class was generated from the following files:
    +
  • Arduino/libraries/SdFat/StdioStream.h
  • +
  • Arduino/libraries/SdFat/StdioStream.cpp
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/class_stdio_stream__coll__graph.png b/libs/SdFat-master/html/class_stdio_stream__coll__graph.png new file mode 100755 index 0000000..f993a00 Binary files /dev/null and b/libs/SdFat-master/html/class_stdio_stream__coll__graph.png differ diff --git a/libs/SdFat-master/html/class_stdio_stream__inherit__graph.png b/libs/SdFat-master/html/class_stdio_stream__inherit__graph.png new file mode 100755 index 0000000..f993a00 Binary files /dev/null and b/libs/SdFat-master/html/class_stdio_stream__inherit__graph.png differ diff --git a/libs/SdFat-master/html/classes.html b/libs/SdFat-master/html/classes.html new file mode 100755 index 0000000..262d804 --- /dev/null +++ b/libs/SdFat-master/html/classes.html @@ -0,0 +1,83 @@ + + + + + + +SdFat: Class Index + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
Class Index
+
+
+
A | C | F | I | M | O | P | S
+ + + + + + + + + + + + + +
  A  
+
  S  
+
StdioStream   ifstream   ostream   
  c  
+
ios   
  p  
+
ArduinoInStream   Sd2Card   ios_base   
ArduinoOutStream   SdBaseFile   cache_t   iostream   pgm   
  F  
+
SdFat   
  f  
+
istream   
  s  
+
SdFile   
  o  
+
FatPos_t   SdSpi   fstream   setfill   
File   SdStreamBase   
  i  
+
obufstream   setprecision   
  M  
+
SdVolume   ofstream   setw   
ibufstream   
MinimumSerial   
+
A | C | F | I | M | O | P | S
+
+ + + + diff --git a/libs/SdFat-master/html/classfstream-members.html b/libs/SdFat-master/html/classfstream-members.html new file mode 100755 index 0000000..f43269e --- /dev/null +++ b/libs/SdFat-master/html/classfstream-members.html @@ -0,0 +1,247 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
fstream Member List
+
+
+ +

This is the complete list of members for fstream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ateios_basestatic
available()SdBaseFileinlineprivate
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
clear(iostate state=goodbit)fstreaminline
clearWriteError()SdBaseFileinlineprivate
close()fstreaminline
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFileprivate
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFileprivate
cur enum valueios_base
curCluster() const SdBaseFileinlineprivate
curPosition() const SdBaseFileinlineprivate
cwd()SdBaseFileinlineprivatestatic
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFileinlineprivatestatic
dateTimeCallbackCancel()SdBaseFileinlineprivatestatic
decios_basestatic
dirEntry(dir_t *dir)SdBaseFileprivate
dirName(const dir_t &dir, char *name)SdBaseFileprivatestatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
exists(const char *name)SdBaseFileprivate
fail() const iosinline
failbitios_basestatic
fgets(char *str, int16_t num, char *delim=0)SdBaseFileprivate
fileSize() const SdBaseFileinlineprivate
fill()ios_baseinline
fill(char c)ios_baseinline
firstCluster() const SdBaseFileinlineprivate
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
flush()ostreaminline
fmtflags typedefios_base
fstream() (defined in fstream)fstreaminline
fstream(const char *path, openmode mode=in|out)fstreaminlineexplicit
gcount() const istreaminline
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getFilename(char *name)SdBaseFileprivate
getline(char *str, streamsize count, char delim= '\n')istream
getpos(FatPos_t *pos)SdBaseFileprivate
getWriteError()SdBaseFileinlineprivate
good() const iosinline
goodbitios_basestatic
hexios_basestatic
ignore(streamsize n=1, int delim=-1)istream
inios_basestatic
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
is_open()fstreaminline
isDir() const SdBaseFileinlineprivate
isFile() const SdBaseFileinlineprivate
isOpen() const SdBaseFileinlineprivate
isRoot() const SdBaseFileinlineprivate
isSubDir() const SdBaseFileinlineprivate
istream() (defined in istream)istreaminline
leftios_basestatic
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFileprivate
ls(uint8_t flags=0)SdBaseFileprivate
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFileprivate
octios_basestatic
off_type typedefios_base
open(const char *path, openmode mode=in|out)fstreaminline
SdStreamBase::open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFileprivate
SdStreamBase::open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFileprivate
openmode typedefios_base
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFileprivate
openRoot(SdVolume *vol)SdBaseFileprivate
operator const void *() const iosinline
operator!() const iosinline
operator<<(ostream &(*pf)(ostream &str))ostreaminline
operator<<(ios_base &(*pf)(ios_base &str))ostreaminline
operator<<(bool arg)ostreaminline
operator<<(const char *arg)ostreaminline
operator<<(const signed char *arg)ostreaminline
operator<<(const unsigned char *arg)ostreaminline
operator<<(char arg)ostreaminline
operator<<(signed char arg)ostreaminline
operator<<(unsigned char arg)ostreaminline
operator<<(double arg)ostreaminline
operator<<(float arg)ostreaminline
operator<<(short arg)ostreaminline
operator<<(unsigned short arg)ostreaminline
operator<<(int arg)ostreaminline
operator<<(unsigned int arg)ostreaminline
operator<<(long arg)ostreaminline
operator<<(unsigned long arg)ostreaminline
operator<<(const void *arg)ostreaminline
operator<<(pgm arg)ostreaminline
operator<<(const __FlashStringHelper *arg)ostreaminline
operator>>(istream &(*pf)(istream &str))istreaminline
operator>>(ios_base &(*pf)(ios_base &str))istreaminline
operator>>(ios &(*pf)(ios &str))istreaminline
operator>>(char *str)istreaminline
operator>>(char &ch)istreaminline
operator>>(signed char *str)istreaminline
operator>>(signed char &ch)istreaminline
operator>>(unsigned char *str)istreaminline
operator>>(unsigned char &ch)istreaminline
operator>>(bool &arg)istreaminline
operator>>(short &arg)istreaminline
operator>>(unsigned short &arg)istreaminline
operator>>(int &arg)istreaminline
operator>>(unsigned int &arg)istreaminline
operator>>(long &arg)istreaminline
operator>>(unsigned long &arg)istreaminline
operator>>(double &arg)istreaminline
operator>>(float &arg)istreaminline
operator>>(void *&arg)istreaminline
ostream() (defined in ostream)ostreaminline
outios_basestatic
iostream::peek()istream
SdStreamBase::peek()SdBaseFileprivate
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
printCreateDateTime(Print *pr)SdBaseFileprivate
printFatDate(uint16_t fatDate)SdBaseFileprivatestatic
printFatDate(Print *pr, uint16_t fatDate)SdBaseFileprivatestatic
printFatTime(uint16_t fatTime)SdBaseFileprivatestatic
printFatTime(Print *pr, uint16_t fatTime)SdBaseFileprivatestatic
printField(float value, char term, uint8_t prec=2)SdBaseFileprivate
printField(int16_t value, char term)SdBaseFileprivate
printField(uint16_t value, char term)SdBaseFileprivate
printField(int32_t value, char term)SdBaseFileprivate
printField(uint32_t value, char term)SdBaseFileprivate
printFileSize(Print *pr)SdBaseFileprivate
printModifyDateTime(Print *pr)SdBaseFileprivate
printName()SdBaseFileprivate
printName(Print *pr)SdBaseFileprivate
put(char ch)ostreaminline
rdstate() const iosinline
read()SdBaseFileprivate
read(void *buf, size_t nbyte)SdBaseFileprivate
readDir(dir_t *dir)SdBaseFileprivate
remove(SdBaseFile *dirFile, const char *path)SdBaseFileprivatestatic
remove()SdBaseFileprivate
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFileprivate
rewind()SdBaseFileinlineprivate
rightios_basestatic
rmdir()SdBaseFileprivate
rmRfStar()SdBaseFileprivate
SdBaseFile()SdBaseFileinlineprivate
SdBaseFile(const char *path, uint8_t oflag)SdBaseFileprivate
seekCur(int32_t offset)SdBaseFileinlineprivate
seekdir enum nameios_base
seekEnd(int32_t offset=0)SdBaseFileinlineprivate
seekg(pos_type pos)istreaminline
seekg(off_type off, seekdir way)istreaminline
seekp(pos_type pos)ostreaminline
seekp(off_type off, seekdir way)ostreaminline
seekSet(uint32_t pos)SdBaseFileprivate
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setpos(FatPos_t *pos)SdBaseFileprivate
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipWhite()istream
skipwsios_basestatic
streamsize typedefios_base
sync()SdBaseFileprivate
tellg()istreaminline
tellp()ostreaminline
timestamp(SdBaseFile *file)SdBaseFileprivate
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFileprivate
truncios_basestatic
truncate(uint32_t size)SdBaseFileprivate
type() const SdBaseFileinlineprivate
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
volume() const SdBaseFileinlineprivate
width()ios_baseinline
width(unsigned n)ios_baseinline
write(const void *buf, size_t nbyte)SdBaseFileprivate
writeErrorSdBaseFileprivate
+ + + + diff --git a/libs/SdFat-master/html/classfstream.html b/libs/SdFat-master/html/classfstream.html new file mode 100755 index 0000000..e6b1de9 --- /dev/null +++ b/libs/SdFat-master/html/classfstream.html @@ -0,0 +1,3593 @@ + + + + + + +SdFat: fstream Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

SD file input/output stream. + More...

+ +

#include <SdStream.h>

+
+Inheritance diagram for fstream:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for fstream:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool bad () const
 
void clear (iostate state=goodbit)
 
void close ()
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
ostreamflush ()
 
 fstream (const char *path, openmode mode=in|out)
 
streamsize gcount () const
 
int get ()
 
istreamget (char &ch)
 
istreamget (char *str, streamsize n, char delim= '\n')
 
istreamgetline (char *str, streamsize count, char delim= '\n')
 
bool good () const
 
istreamignore (streamsize n=1, int delim=-1)
 
bool is_open ()
 
void open (const char *path, openmode mode=in|out)
 
 operator const void * () const
 
bool operator! () const
 
ostreamoperator<< (ostream &(*pf)(ostream &str))
 
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
 
ostreamoperator<< (bool arg)
 
ostreamoperator<< (const char *arg)
 
ostreamoperator<< (const signed char *arg)
 
ostreamoperator<< (const unsigned char *arg)
 
ostreamoperator<< (char arg)
 
ostreamoperator<< (signed char arg)
 
ostreamoperator<< (unsigned char arg)
 
ostreamoperator<< (double arg)
 
ostreamoperator<< (float arg)
 
ostreamoperator<< (short arg)
 
ostreamoperator<< (unsigned short arg)
 
ostreamoperator<< (int arg)
 
ostreamoperator<< (unsigned int arg)
 
ostreamoperator<< (long arg)
 
ostreamoperator<< (unsigned long arg)
 
ostreamoperator<< (const void *arg)
 
ostreamoperator<< (pgm arg)
 
ostreamoperator<< (const __FlashStringHelper *arg)
 
istreamoperator>> (istream &(*pf)(istream &str))
 
istreamoperator>> (ios_base &(*pf)(ios_base &str))
 
istreamoperator>> (ios &(*pf)(ios &str))
 
istreamoperator>> (char *str)
 
istreamoperator>> (char &ch)
 
istreamoperator>> (signed char *str)
 
istreamoperator>> (signed char &ch)
 
istreamoperator>> (unsigned char *str)
 
istreamoperator>> (unsigned char &ch)
 
istreamoperator>> (bool &arg)
 
istreamoperator>> (short &arg)
 
istreamoperator>> (unsigned short &arg)
 
istreamoperator>> (int &arg)
 
istreamoperator>> (unsigned int &arg)
 
istreamoperator>> (long &arg)
 
istreamoperator>> (unsigned long &arg)
 
istreamoperator>> (double &arg)
 
istreamoperator>> (float &arg)
 
istreamoperator>> (void *&arg)
 
int peek ()
 
int precision () const
 
int precision (unsigned int n)
 
ostreamput (char ch)
 
iostate rdstate () const
 
istreamseekg (pos_type pos)
 
istreamseekg (off_type off, seekdir way)
 
ostreamseekp (pos_type pos)
 
ostreamseekp (off_type off, seekdir way)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
void skipWhite ()
 
pos_type tellg ()
 
pos_type tellp ()
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Private Member Functions

uint32_t available ()
 
void clearWriteError ()
 
bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
 
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
 
uint32_t curCluster () const
 
uint32_t curPosition () const
 
bool dirEntry (dir_t *dir)
 
bool exists (const char *name)
 
int16_t fgets (char *str, int16_t num, char *delim=0)
 
uint32_t fileSize () const
 
uint32_t firstCluster () const
 
bool getFilename (char *name)
 
void getpos (FatPos_t *pos)
 
bool getWriteError ()
 
bool isDir () const
 
bool isFile () const
 
bool isOpen () const
 
bool isRoot () const
 
bool isSubDir () const
 
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
 
void ls (uint8_t flags=0)
 
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
 
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
 
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
 
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
 
bool openRoot (SdVolume *vol)
 
int peek ()
 
bool printCreateDateTime (Print *pr)
 
int printField (float value, char term, uint8_t prec=2)
 
int printField (int16_t value, char term)
 
int printField (uint16_t value, char term)
 
int printField (int32_t value, char term)
 
int printField (uint32_t value, char term)
 
size_t printFileSize (Print *pr)
 
bool printModifyDateTime (Print *pr)
 
size_t printName ()
 
size_t printName (Print *pr)
 
int16_t read ()
 
int read (void *buf, size_t nbyte)
 
int8_t readDir (dir_t *dir)
 
bool remove ()
 
bool rename (SdBaseFile *dirFile, const char *newPath)
 
void rewind ()
 
bool rmdir ()
 
bool rmRfStar ()
 
bool seekCur (int32_t offset)
 
bool seekEnd (int32_t offset=0)
 
bool seekSet (uint32_t pos)
 
void setpos (FatPos_t *pos)
 
bool sync ()
 
bool timestamp (SdBaseFile *file)
 
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
 
bool truncate (uint32_t size)
 
uint8_t type () const
 
SdVolumevolume () const
 
int write (const void *buf, size_t nbyte)
 
+ + + + + + + + + + + + + + + + + + + +

+Static Private Member Functions

static SdBaseFilecwd ()
 
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
 
static void dateTimeCallbackCancel ()
 
static void dirName (const dir_t &dir, char *name)
 
static void printFatDate (uint16_t fatDate)
 
static void printFatDate (Print *pr, uint16_t fatDate)
 
static void printFatTime (uint16_t fatTime)
 
static void printFatTime (Print *pr, uint16_t fatTime)
 
static bool remove (SdBaseFile *dirFile, const char *path)
 
+ + + +

+Private Attributes

bool writeError
 
+

Detailed Description

+

SD file input/output stream.

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fstream::fstream (const char * path,
openmode mode = in | out 
)
+
+inlineexplicit
+
+

Constructor with open

+
Parameters
+ + + +
[in]pathpath to open
[in]modeopen mode
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inlineinherited
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void fstream::clear (iostate state = goodbit)
+
+inline
+
+

Clear state and writeError

Parameters
+ + +
[in]statenew state for stream
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void fstream::close ()
+
+inline
+
+

Close a file and force cached data and directory information to be written to the storage device.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inlineinherited
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inlineinherited
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ostream& ostream::flush ()
+
+inlineinherited
+
+

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
streamsize istream::gcount () const
+
+inlineinherited
+
+
Returns
The number of characters extracted by the last unformatted input function.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int istream::get ()
+
+inherited
+
+

Extract a character if one is available.

+
Returns
The character or -1 if a failure occurs. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream & istream::get (char & c)
+
+inherited
+
+

Extract a character if one is available.

+
Parameters
+ + +
[out]clocation to receive the extracted character.
+
+
+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
)
+
+inherited
+
+

Extract characters.

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
)
+
+inherited
+
+

Extract characters

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

+

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inlineinherited
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream & istream::ignore (streamsize n = 1,
int delim = -1 
)
+
+inherited
+
+

Extract characters and discard them.

+
Parameters
+ + + +
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
+
+
+

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

+

Failures are indicated by the state of the stream.

+
Returns
*this
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool fstream::is_open ()
+
+inline
+
+
Returns
True if stream is open else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void fstream::open (const char * path,
openmode mode = in | out 
)
+
+inline
+
+

Open a fstream

Parameters
+ + + +
[in]pathfile to open
[in]modeopen mode
+
+
+

Valid open modes are (at end, ios::ate, and/or ios::binary may be added):

+

ios::in - Open file for reading.

+

ios::out or ios::out | ios::trunc - Truncate to 0 length, if existent, or create a file for writing only.

+

ios::app or ios::out | ios::app - Append; open or create file for writing at end-of-file.

+

ios::in | ios::out - Open file for update (reading and writing).

+

ios::in | ios::out | ios::trunc - Truncate to zero length, if existent, or create file for update.

+

ios::in | ios::app or ios::in | ios::out | ios::app - Append; open or create text file for update, writing at end of file.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inlineinherited
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inlineinherited
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (bool arg)
+
+inlineinherited
+
+

Output bool

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const signed char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const unsigned char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (signed char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (double arg)
+
+inlineinherited
+
+

Output double

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (float arg)
+
+inlineinherited
+
+

Output float

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (short arg)
+
+inlineinherited
+
+

Output signed short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned short arg)
+
+inlineinherited
+
+

Output unsigned short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (int arg)
+
+inlineinherited
+
+

Output signed int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned int arg)
+
+inlineinherited
+
+

Output unsigned int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (long arg)
+
+inlineinherited
+
+

Output signed long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned long arg)
+
+inlineinherited
+
+

Output unsigned long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const void * arg)
+
+inlineinherited
+
+

Output pointer

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (pgm arg)
+
+inlineinherited
+
+

Output a string from flash using the pstr() macro

Parameters
+ + +
[in]argpgm struct pointing to string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const __FlashStringHelper * arg)
+
+inlineinherited
+
+

Output a string from flash using the Arduino F() macro.

Parameters
+ + +
[in]argpointing to flash string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (istream &(*)(istream &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios &(*)(ios &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (bool & arg)
+
+inlineinherited
+
+

Extract a value of type bool.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (short & arg)
+
+inlineinherited
+
+

Extract a value of type short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned short & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (int & arg)
+
+inlineinherited
+
+

Extract a value of type int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned int & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (long & arg)
+
+inlineinherited
+
+

Extract a value of type long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned long & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (double & arg)
+
+inlineinherited
+
+

Extract a value of type double.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (float & arg)
+
+inlineinherited
+
+

Extract a value of type float.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (void *& arg)
+
+inlineinherited
+
+

Extract a value of type void*.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int istream::peek ()
+
+inherited
+
+

Return the next available character without consuming it.

+
Returns
The character if the stream state is good else -1;
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::put (char ch)
+
+inlineinherited
+
+

Puts a character in a stream.

+

The unformatted output function inserts the element ch. It returns *this.

+
Parameters
+ + +
[in]chThe character
+
+
+
Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inlineinherited
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::seekg (pos_type pos)
+
+inlineinherited
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the read pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream& istream::seekg (off_type off,
seekdir way 
)
+
+inlineinherited
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::seekp (pos_type pos)
+
+inlineinherited
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the write pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ostream& ostream::seekp (off_type off,
seekdir way 
)
+
+inlineinherited
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inlineinherited
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void istream::skipWhite ()
+
+inherited
+
+

used to implement ws()

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type istream::tellg ()
+
+inlineinherited
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type ostream::tellp ()
+
+inlineinherited
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/classfstream__coll__graph.png b/libs/SdFat-master/html/classfstream__coll__graph.png new file mode 100755 index 0000000..4ae8422 Binary files /dev/null and b/libs/SdFat-master/html/classfstream__coll__graph.png differ diff --git a/libs/SdFat-master/html/classfstream__inherit__graph.png b/libs/SdFat-master/html/classfstream__inherit__graph.png new file mode 100755 index 0000000..4ae8422 Binary files /dev/null and b/libs/SdFat-master/html/classfstream__inherit__graph.png differ diff --git a/libs/SdFat-master/html/classibufstream-members.html b/libs/SdFat-master/html/classibufstream-members.html new file mode 100755 index 0000000..251e7e1 --- /dev/null +++ b/libs/SdFat-master/html/classibufstream-members.html @@ -0,0 +1,151 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
ibufstream Member List
+
+
+ +

This is the complete list of members for ibufstream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ateios_basestatic
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
clear(iostate state=goodbit)iosinline
cur enum valueios_base
decios_basestatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
fail() const iosinline
failbitios_basestatic
fill()ios_baseinline
fill(char c)ios_baseinline
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
fmtflags typedefios_base
gcount() const istreaminline
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getline(char *str, streamsize count, char delim= '\n')istream
good() const iosinline
goodbitios_basestatic
hexios_basestatic
ibufstream()ibufstreaminline
ibufstream(const char *str)ibufstreaminlineexplicit
ignore(streamsize n=1, int delim=-1)istream
inios_basestatic
init(const char *str)ibufstreaminline
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
istream() (defined in istream)istreaminline
leftios_basestatic
octios_basestatic
off_type typedefios_base
openmode typedefios_base
operator const void *() const iosinline
operator!() const iosinline
operator>>(istream &(*pf)(istream &str))istreaminline
operator>>(ios_base &(*pf)(ios_base &str))istreaminline
operator>>(ios &(*pf)(ios &str))istreaminline
operator>>(char *str)istreaminline
operator>>(char &ch)istreaminline
operator>>(signed char *str)istreaminline
operator>>(signed char &ch)istreaminline
operator>>(unsigned char *str)istreaminline
operator>>(unsigned char &ch)istreaminline
operator>>(bool &arg)istreaminline
operator>>(short &arg)istreaminline
operator>>(unsigned short &arg)istreaminline
operator>>(int &arg)istreaminline
operator>>(unsigned int &arg)istreaminline
operator>>(long &arg)istreaminline
operator>>(unsigned long &arg)istreaminline
operator>>(double &arg)istreaminline
operator>>(float &arg)istreaminline
operator>>(void *&arg)istreaminline
outios_basestatic
peek()istream
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
rdstate() const iosinline
rightios_basestatic
seekdir enum nameios_base
seekg(pos_type pos)istreaminline
seekg(off_type off, seekdir way)istreaminline
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipWhite()istream
skipwsios_basestatic
streamsize typedefios_base
tellg()istreaminline
truncios_basestatic
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
width()ios_baseinline
width(unsigned n)ios_baseinline
+ + + + diff --git a/libs/SdFat-master/html/classibufstream.html b/libs/SdFat-master/html/classibufstream.html new file mode 100755 index 0000000..8a58ebe --- /dev/null +++ b/libs/SdFat-master/html/classibufstream.html @@ -0,0 +1,2569 @@ + + + + + + +SdFat: ibufstream Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

parse a char string + More...

+ +

#include <bufstream.h>

+
+Inheritance diagram for ibufstream:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for ibufstream:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool bad () const
 
void clear (iostate state=goodbit)
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
streamsize gcount () const
 
int get ()
 
istreamget (char &ch)
 
istreamget (char *str, streamsize n, char delim= '\n')
 
istreamgetline (char *str, streamsize count, char delim= '\n')
 
bool good () const
 
 ibufstream ()
 
 ibufstream (const char *str)
 
istreamignore (streamsize n=1, int delim=-1)
 
void init (const char *str)
 
 operator const void * () const
 
bool operator! () const
 
istreamoperator>> (istream &(*pf)(istream &str))
 
istreamoperator>> (ios_base &(*pf)(ios_base &str))
 
istreamoperator>> (ios &(*pf)(ios &str))
 
istreamoperator>> (char *str)
 
istreamoperator>> (char &ch)
 
istreamoperator>> (signed char *str)
 
istreamoperator>> (signed char &ch)
 
istreamoperator>> (unsigned char *str)
 
istreamoperator>> (unsigned char &ch)
 
istreamoperator>> (bool &arg)
 
istreamoperator>> (short &arg)
 
istreamoperator>> (unsigned short &arg)
 
istreamoperator>> (int &arg)
 
istreamoperator>> (unsigned int &arg)
 
istreamoperator>> (long &arg)
 
istreamoperator>> (unsigned long &arg)
 
istreamoperator>> (double &arg)
 
istreamoperator>> (float &arg)
 
istreamoperator>> (void *&arg)
 
int peek ()
 
int precision () const
 
int precision (unsigned int n)
 
iostate rdstate () const
 
istreamseekg (pos_type pos)
 
istreamseekg (off_type off, seekdir way)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
void skipWhite ()
 
pos_type tellg ()
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
+

Detailed Description

+

parse a char string

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
ibufstream::ibufstream ()
+
+inline
+
+

Constructor

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ibufstream::ibufstream (const char * str)
+
+inlineexplicit
+
+

Constructor

Parameters
+ + +
[in]strpointer to string to be parsed Warning: The string will not be copied so must stay in scope.
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inlineinherited
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::clear (iostate state = goodbit)
+
+inlineinherited
+
+

Clear iostate bits.

+
Parameters
+ + +
[in]stateThe flags you want to set after clearing all flags.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inlineinherited
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inlineinherited
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
streamsize istream::gcount () const
+
+inlineinherited
+
+
Returns
The number of characters extracted by the last unformatted input function.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int istream::get ()
+
+inherited
+
+

Extract a character if one is available.

+
Returns
The character or -1 if a failure occurs. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream & istream::get (char & c)
+
+inherited
+
+

Extract a character if one is available.

+
Parameters
+ + +
[out]clocation to receive the extracted character.
+
+
+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
)
+
+inherited
+
+

Extract characters.

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
)
+
+inherited
+
+

Extract characters

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

+

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inlineinherited
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream & istream::ignore (streamsize n = 1,
int delim = -1 
)
+
+inherited
+
+

Extract characters and discard them.

+
Parameters
+ + + +
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
+
+
+

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

+

Failures are indicated by the state of the stream.

+
Returns
*this
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ibufstream::init (const char * str)
+
+inline
+
+

Initialize an ibufstream

Parameters
+ + +
[in]strpointer to string to be parsed Warning: The string will not be copied so must stay in scope.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inlineinherited
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inlineinherited
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (istream &(*)(istream &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios &(*)(ios &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (bool & arg)
+
+inlineinherited
+
+

Extract a value of type bool.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (short & arg)
+
+inlineinherited
+
+

Extract a value of type short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned short & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (int & arg)
+
+inlineinherited
+
+

Extract a value of type int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned int & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (long & arg)
+
+inlineinherited
+
+

Extract a value of type long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned long & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (double & arg)
+
+inlineinherited
+
+

Extract a value of type double.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (float & arg)
+
+inlineinherited
+
+

Extract a value of type float.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (void *& arg)
+
+inlineinherited
+
+

Extract a value of type void*.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int istream::peek ()
+
+inherited
+
+

Return the next available character without consuming it.

+
Returns
The character if the stream state is good else -1;
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inlineinherited
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::seekg (pos_type pos)
+
+inlineinherited
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the read pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream& istream::seekg (off_type off,
seekdir way 
)
+
+inlineinherited
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inlineinherited
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void istream::skipWhite ()
+
+inherited
+
+

used to implement ws()

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type istream::tellg ()
+
+inlineinherited
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/classibufstream__coll__graph.png b/libs/SdFat-master/html/classibufstream__coll__graph.png new file mode 100755 index 0000000..8678cc9 Binary files /dev/null and b/libs/SdFat-master/html/classibufstream__coll__graph.png differ diff --git a/libs/SdFat-master/html/classibufstream__inherit__graph.png b/libs/SdFat-master/html/classibufstream__inherit__graph.png new file mode 100755 index 0000000..5b2c2ed Binary files /dev/null and b/libs/SdFat-master/html/classibufstream__inherit__graph.png differ diff --git a/libs/SdFat-master/html/classifstream-members.html b/libs/SdFat-master/html/classifstream-members.html new file mode 100755 index 0000000..72c7405 --- /dev/null +++ b/libs/SdFat-master/html/classifstream-members.html @@ -0,0 +1,221 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
ifstream Member List
+
+
+ +

This is the complete list of members for ifstream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ateios_basestatic
available()SdBaseFileinlineprivate
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
clear(iostate state=goodbit)iosinline
clearWriteError()SdBaseFileinlineprivate
close()ifstreaminline
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFileprivate
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFileprivate
cur enum valueios_base
curCluster() const SdBaseFileinlineprivate
curPosition() const SdBaseFileinlineprivate
cwd()SdBaseFileinlineprivatestatic
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFileinlineprivatestatic
dateTimeCallbackCancel()SdBaseFileinlineprivatestatic
decios_basestatic
dirEntry(dir_t *dir)SdBaseFileprivate
dirName(const dir_t &dir, char *name)SdBaseFileprivatestatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
exists(const char *name)SdBaseFileprivate
fail() const iosinline
failbitios_basestatic
fgets(char *str, int16_t num, char *delim=0)SdBaseFileprivate
fileSize() const SdBaseFileinlineprivate
fill()ios_baseinline
fill(char c)ios_baseinline
firstCluster() const SdBaseFileinlineprivate
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
fmtflags typedefios_base
gcount() const istreaminline
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getFilename(char *name)SdBaseFileprivate
getline(char *str, streamsize count, char delim= '\n')istream
getpos(FatPos_t *pos)SdBaseFileprivate
getWriteError()SdBaseFileinlineprivate
good() const iosinline
goodbitios_basestatic
hexios_basestatic
ifstream() (defined in ifstream)ifstreaminline
ifstream(const char *path, openmode mode=in)ifstreaminlineexplicit
ignore(streamsize n=1, int delim=-1)istream
inios_basestatic
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
is_open()ifstreaminline
isDir() const SdBaseFileinlineprivate
isFile() const SdBaseFileinlineprivate
isOpen() const SdBaseFileinlineprivate
isRoot() const SdBaseFileinlineprivate
isSubDir() const SdBaseFileinlineprivate
istream() (defined in istream)istreaminline
leftios_basestatic
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFileprivate
ls(uint8_t flags=0)SdBaseFileprivate
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFileprivate
octios_basestatic
off_type typedefios_base
open(const char *path, openmode mode=in)ifstreaminline
SdStreamBase::open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFileprivate
SdStreamBase::open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFileprivate
openmode typedefios_base
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFileprivate
openRoot(SdVolume *vol)SdBaseFileprivate
operator const void *() const iosinline
operator!() const iosinline
operator>>(istream &(*pf)(istream &str))istreaminline
operator>>(ios_base &(*pf)(ios_base &str))istreaminline
operator>>(ios &(*pf)(ios &str))istreaminline
operator>>(char *str)istreaminline
operator>>(char &ch)istreaminline
operator>>(signed char *str)istreaminline
operator>>(signed char &ch)istreaminline
operator>>(unsigned char *str)istreaminline
operator>>(unsigned char &ch)istreaminline
operator>>(bool &arg)istreaminline
operator>>(short &arg)istreaminline
operator>>(unsigned short &arg)istreaminline
operator>>(int &arg)istreaminline
operator>>(unsigned int &arg)istreaminline
operator>>(long &arg)istreaminline
operator>>(unsigned long &arg)istreaminline
operator>>(double &arg)istreaminline
operator>>(float &arg)istreaminline
operator>>(void *&arg)istreaminline
outios_basestatic
istream::peek()istream
SdStreamBase::peek()SdBaseFileprivate
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
printCreateDateTime(Print *pr)SdBaseFileprivate
printFatDate(uint16_t fatDate)SdBaseFileprivatestatic
printFatDate(Print *pr, uint16_t fatDate)SdBaseFileprivatestatic
printFatTime(uint16_t fatTime)SdBaseFileprivatestatic
printFatTime(Print *pr, uint16_t fatTime)SdBaseFileprivatestatic
printField(float value, char term, uint8_t prec=2)SdBaseFileprivate
printField(int16_t value, char term)SdBaseFileprivate
printField(uint16_t value, char term)SdBaseFileprivate
printField(int32_t value, char term)SdBaseFileprivate
printField(uint32_t value, char term)SdBaseFileprivate
printFileSize(Print *pr)SdBaseFileprivate
printModifyDateTime(Print *pr)SdBaseFileprivate
printName()SdBaseFileprivate
printName(Print *pr)SdBaseFileprivate
rdstate() const iosinline
read()SdBaseFileprivate
read(void *buf, size_t nbyte)SdBaseFileprivate
readDir(dir_t *dir)SdBaseFileprivate
remove(SdBaseFile *dirFile, const char *path)SdBaseFileprivatestatic
remove()SdBaseFileprivate
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFileprivate
rewind()SdBaseFileinlineprivate
rightios_basestatic
rmdir()SdBaseFileprivate
rmRfStar()SdBaseFileprivate
SdBaseFile()SdBaseFileinlineprivate
SdBaseFile(const char *path, uint8_t oflag)SdBaseFileprivate
seekCur(int32_t offset)SdBaseFileinlineprivate
seekdir enum nameios_base
seekEnd(int32_t offset=0)SdBaseFileinlineprivate
seekg(pos_type pos)istreaminline
seekg(off_type off, seekdir way)istreaminline
seekSet(uint32_t pos)SdBaseFileprivate
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setpos(FatPos_t *pos)SdBaseFileprivate
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipWhite()istream
skipwsios_basestatic
streamsize typedefios_base
sync()SdBaseFileprivate
tellg()istreaminline
timestamp(SdBaseFile *file)SdBaseFileprivate
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFileprivate
truncios_basestatic
truncate(uint32_t size)SdBaseFileprivate
type() const SdBaseFileinlineprivate
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
volume() const SdBaseFileinlineprivate
width()ios_baseinline
width(unsigned n)ios_baseinline
write(const void *buf, size_t nbyte)SdBaseFileprivate
writeErrorSdBaseFileprivate
+ + + + diff --git a/libs/SdFat-master/html/classifstream.html b/libs/SdFat-master/html/classifstream.html new file mode 100755 index 0000000..537698f --- /dev/null +++ b/libs/SdFat-master/html/classifstream.html @@ -0,0 +1,2762 @@ + + + + + + +SdFat: ifstream Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

SD file input stream. + More...

+ +

#include <SdStream.h>

+
+Inheritance diagram for ifstream:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for ifstream:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool bad () const
 
void clear (iostate state=goodbit)
 
void close ()
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
streamsize gcount () const
 
int get ()
 
istreamget (char &ch)
 
istreamget (char *str, streamsize n, char delim= '\n')
 
istreamgetline (char *str, streamsize count, char delim= '\n')
 
bool good () const
 
 ifstream (const char *path, openmode mode=in)
 
istreamignore (streamsize n=1, int delim=-1)
 
bool is_open ()
 
void open (const char *path, openmode mode=in)
 
 operator const void * () const
 
bool operator! () const
 
istreamoperator>> (istream &(*pf)(istream &str))
 
istreamoperator>> (ios_base &(*pf)(ios_base &str))
 
istreamoperator>> (ios &(*pf)(ios &str))
 
istreamoperator>> (char *str)
 
istreamoperator>> (char &ch)
 
istreamoperator>> (signed char *str)
 
istreamoperator>> (signed char &ch)
 
istreamoperator>> (unsigned char *str)
 
istreamoperator>> (unsigned char &ch)
 
istreamoperator>> (bool &arg)
 
istreamoperator>> (short &arg)
 
istreamoperator>> (unsigned short &arg)
 
istreamoperator>> (int &arg)
 
istreamoperator>> (unsigned int &arg)
 
istreamoperator>> (long &arg)
 
istreamoperator>> (unsigned long &arg)
 
istreamoperator>> (double &arg)
 
istreamoperator>> (float &arg)
 
istreamoperator>> (void *&arg)
 
int peek ()
 
int precision () const
 
int precision (unsigned int n)
 
iostate rdstate () const
 
istreamseekg (pos_type pos)
 
istreamseekg (off_type off, seekdir way)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
void skipWhite ()
 
pos_type tellg ()
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Private Member Functions

uint32_t available ()
 
void clearWriteError ()
 
bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
 
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
 
uint32_t curCluster () const
 
uint32_t curPosition () const
 
bool dirEntry (dir_t *dir)
 
bool exists (const char *name)
 
int16_t fgets (char *str, int16_t num, char *delim=0)
 
uint32_t fileSize () const
 
uint32_t firstCluster () const
 
bool getFilename (char *name)
 
void getpos (FatPos_t *pos)
 
bool getWriteError ()
 
bool isDir () const
 
bool isFile () const
 
bool isOpen () const
 
bool isRoot () const
 
bool isSubDir () const
 
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
 
void ls (uint8_t flags=0)
 
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
 
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
 
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
 
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
 
bool openRoot (SdVolume *vol)
 
int peek ()
 
bool printCreateDateTime (Print *pr)
 
int printField (float value, char term, uint8_t prec=2)
 
int printField (int16_t value, char term)
 
int printField (uint16_t value, char term)
 
int printField (int32_t value, char term)
 
int printField (uint32_t value, char term)
 
size_t printFileSize (Print *pr)
 
bool printModifyDateTime (Print *pr)
 
size_t printName ()
 
size_t printName (Print *pr)
 
int16_t read ()
 
int read (void *buf, size_t nbyte)
 
int8_t readDir (dir_t *dir)
 
bool remove ()
 
bool rename (SdBaseFile *dirFile, const char *newPath)
 
void rewind ()
 
bool rmdir ()
 
bool rmRfStar ()
 
bool seekCur (int32_t offset)
 
bool seekEnd (int32_t offset=0)
 
bool seekSet (uint32_t pos)
 
void setpos (FatPos_t *pos)
 
bool sync ()
 
bool timestamp (SdBaseFile *file)
 
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
 
bool truncate (uint32_t size)
 
uint8_t type () const
 
SdVolumevolume () const
 
int write (const void *buf, size_t nbyte)
 
+ + + + + + + + + + + + + + + + + + + +

+Static Private Member Functions

static SdBaseFilecwd ()
 
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
 
static void dateTimeCallbackCancel ()
 
static void dirName (const dir_t &dir, char *name)
 
static void printFatDate (uint16_t fatDate)
 
static void printFatDate (Print *pr, uint16_t fatDate)
 
static void printFatTime (uint16_t fatTime)
 
static void printFatTime (Print *pr, uint16_t fatTime)
 
static bool remove (SdBaseFile *dirFile, const char *path)
 
+ + + +

+Private Attributes

bool writeError
 
+

Detailed Description

+

SD file input stream.

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ifstream::ifstream (const char * path,
openmode mode = in 
)
+
+inlineexplicit
+
+

Constructor with open

Parameters
+ + + +
[in]pathfile to open
[in]modeopen mode
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inlineinherited
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::clear (iostate state = goodbit)
+
+inlineinherited
+
+

Clear iostate bits.

+
Parameters
+ + +
[in]stateThe flags you want to set after clearing all flags.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void ifstream::close ()
+
+inline
+
+

Close a file and force cached data and directory information to be written to the storage device.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inlineinherited
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inlineinherited
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
streamsize istream::gcount () const
+
+inlineinherited
+
+
Returns
The number of characters extracted by the last unformatted input function.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int istream::get ()
+
+inherited
+
+

Extract a character if one is available.

+
Returns
The character or -1 if a failure occurs. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream & istream::get (char & c)
+
+inherited
+
+

Extract a character if one is available.

+
Parameters
+ + +
[out]clocation to receive the extracted character.
+
+
+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
)
+
+inherited
+
+

Extract characters.

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
)
+
+inherited
+
+

Extract characters

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

+

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inlineinherited
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream & istream::ignore (streamsize n = 1,
int delim = -1 
)
+
+inherited
+
+

Extract characters and discard them.

+
Parameters
+ + + +
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
+
+
+

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

+

Failures are indicated by the state of the stream.

+
Returns
*this
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ifstream::is_open ()
+
+inline
+
+
Returns
True if stream is open else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void ifstream::open (const char * path,
openmode mode = in 
)
+
+inline
+
+

Open an ifstream

Parameters
+ + + +
[in]pathfile to open
[in]modeopen mode
+
+
+

mode See fstream::open() for valid modes.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inlineinherited
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inlineinherited
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (istream &(*)(istream &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios &(*)(ios &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (bool & arg)
+
+inlineinherited
+
+

Extract a value of type bool.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (short & arg)
+
+inlineinherited
+
+

Extract a value of type short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned short & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (int & arg)
+
+inlineinherited
+
+

Extract a value of type int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned int & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (long & arg)
+
+inlineinherited
+
+

Extract a value of type long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned long & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (double & arg)
+
+inlineinherited
+
+

Extract a value of type double.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (float & arg)
+
+inlineinherited
+
+

Extract a value of type float.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (void *& arg)
+
+inlineinherited
+
+

Extract a value of type void*.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int istream::peek ()
+
+inherited
+
+

Return the next available character without consuming it.

+
Returns
The character if the stream state is good else -1;
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inlineinherited
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::seekg (pos_type pos)
+
+inlineinherited
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the read pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream& istream::seekg (off_type off,
seekdir way 
)
+
+inlineinherited
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inlineinherited
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void istream::skipWhite ()
+
+inherited
+
+

used to implement ws()

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type istream::tellg ()
+
+inlineinherited
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/classifstream__coll__graph.png b/libs/SdFat-master/html/classifstream__coll__graph.png new file mode 100755 index 0000000..686ee5d Binary files /dev/null and b/libs/SdFat-master/html/classifstream__coll__graph.png differ diff --git a/libs/SdFat-master/html/classifstream__inherit__graph.png b/libs/SdFat-master/html/classifstream__inherit__graph.png new file mode 100755 index 0000000..686ee5d Binary files /dev/null and b/libs/SdFat-master/html/classifstream__inherit__graph.png differ diff --git a/libs/SdFat-master/html/classios-members.html b/libs/SdFat-master/html/classios-members.html new file mode 100755 index 0000000..67a9612 --- /dev/null +++ b/libs/SdFat-master/html/classios-members.html @@ -0,0 +1,117 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
ios Member List
+
+
+ +

This is the complete list of members for ios, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ateios_basestatic
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
clear(iostate state=goodbit)iosinline
cur enum valueios_base
decios_basestatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
fail() const iosinline
failbitios_basestatic
fill()ios_baseinline
fill(char c)ios_baseinline
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
fmtflags typedefios_base
good() const iosinline
goodbitios_basestatic
hexios_basestatic
inios_basestatic
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
leftios_basestatic
octios_basestatic
off_type typedefios_base
openmode typedefios_base
operator const void *() const iosinline
operator!() const iosinline
outios_basestatic
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
rdstate() const iosinline
rightios_basestatic
seekdir enum nameios_base
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipwsios_basestatic
streamsize typedefios_base
truncios_basestatic
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
width()ios_baseinline
width(unsigned n)ios_baseinline
+ + + + diff --git a/libs/SdFat-master/html/classios.html b/libs/SdFat-master/html/classios.html new file mode 100755 index 0000000..89517dc --- /dev/null +++ b/libs/SdFat-master/html/classios.html @@ -0,0 +1,1480 @@ + + + + + + +SdFat: ios Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

Error and state information for all streams. + More...

+ +

#include <ios.h>

+
+Inheritance diagram for ios:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for ios:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool bad () const
 
void clear (iostate state=goodbit)
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
bool good () const
 
 ios ()
 
 operator const void * () const
 
bool operator! () const
 
int precision () const
 
int precision (unsigned int n)
 
iostate rdstate () const
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
+

Detailed Description

+

Error and state information for all streams.

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
ios::ios ()
+
+inline
+
+

Create ios with no error flags set

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inline
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::clear (iostate state = goodbit)
+
+inline
+
+

Clear iostate bits.

+
Parameters
+ + +
[in]stateThe flags you want to set after clearing all flags.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inline
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inline
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inline
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inline
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inline
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inline
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inline
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • Arduino/libraries/SdFat/ios.h
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/classios__base-members.html b/libs/SdFat-master/html/classios__base-members.html new file mode 100755 index 0000000..66e7b71 --- /dev/null +++ b/libs/SdFat-master/html/classios__base-members.html @@ -0,0 +1,107 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
ios_base Member List
+
+
+ +

This is the complete list of members for ios_base, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ateios_basestatic
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
cur enum valueios_base
decios_basestatic
end enum valueios_base
eofbitios_basestatic
failbitios_basestatic
fill()ios_baseinline
fill(char c)ios_baseinline
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
fmtflags typedefios_base
goodbitios_basestatic
hexios_basestatic
inios_basestatic
internalios_basestatic
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
leftios_basestatic
octios_basestatic
off_type typedefios_base
openmode typedefios_base
outios_basestatic
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
rightios_basestatic
seekdir enum nameios_base
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipwsios_basestatic
streamsize typedefios_base
truncios_basestatic
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
width()ios_baseinline
width(unsigned n)ios_baseinline
+ + + + diff --git a/libs/SdFat-master/html/classios__base.html b/libs/SdFat-master/html/classios__base.html new file mode 100755 index 0000000..87e913a --- /dev/null +++ b/libs/SdFat-master/html/classios__base.html @@ -0,0 +1,1140 @@ + + + + + + +SdFat: ios_base Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

Base class for all streams. + More...

+ +

#include <ios.h>

+
+Inheritance diagram for ios_base:
+
+
Inheritance graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
int precision () const
 
int precision (unsigned int n)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
+

Detailed Description

+

Base class for all streams.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+

type for format flags

+ +
+
+ +
+
+ + + + +
typedef unsigned char ios_base::iostate
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + +
typedef int32_t ios_base::off_type
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + +
typedef uint8_t ios_base::openmode
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + +
typedef uint32_t ios_base::pos_type
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + +
typedef uint32_t ios_base::streamsize
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum ios_base::seekdir
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inline
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inline
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inline
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inline
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotected
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inline
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inline
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inline
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inline
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inline
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inline
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inline
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+static
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+static
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+static
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+static
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+static
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+static
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+static
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+static
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+static
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+static
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+static
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+static
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+static
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+static
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+static
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+static
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+static
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+static
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+static
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+static
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+static
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+static
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+static
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+static
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • Arduino/libraries/SdFat/ios.h
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/classios__base__inherit__graph.png b/libs/SdFat-master/html/classios__base__inherit__graph.png new file mode 100755 index 0000000..0bc3859 Binary files /dev/null and b/libs/SdFat-master/html/classios__base__inherit__graph.png differ diff --git a/libs/SdFat-master/html/classios__coll__graph.png b/libs/SdFat-master/html/classios__coll__graph.png new file mode 100755 index 0000000..003fc52 Binary files /dev/null and b/libs/SdFat-master/html/classios__coll__graph.png differ diff --git a/libs/SdFat-master/html/classios__inherit__graph.png b/libs/SdFat-master/html/classios__inherit__graph.png new file mode 100755 index 0000000..16af89d Binary files /dev/null and b/libs/SdFat-master/html/classios__inherit__graph.png differ diff --git a/libs/SdFat-master/html/classiostream-members.html b/libs/SdFat-master/html/classiostream-members.html new file mode 100755 index 0000000..63b4648 --- /dev/null +++ b/libs/SdFat-master/html/classiostream-members.html @@ -0,0 +1,174 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
iostream Member List
+
+
+ +

This is the complete list of members for iostream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ateios_basestatic
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
clear(iostate state=goodbit)iosinline
cur enum valueios_base
decios_basestatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
fail() const iosinline
failbitios_basestatic
fill()ios_baseinline
fill(char c)ios_baseinline
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
flush()ostreaminline
fmtflags typedefios_base
gcount() const istreaminline
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getline(char *str, streamsize count, char delim= '\n')istream
good() const iosinline
goodbitios_basestatic
hexios_basestatic
ignore(streamsize n=1, int delim=-1)istream
inios_basestatic
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
istream() (defined in istream)istreaminline
leftios_basestatic
octios_basestatic
off_type typedefios_base
openmode typedefios_base
operator const void *() const iosinline
operator!() const iosinline
operator<<(ostream &(*pf)(ostream &str))ostreaminline
operator<<(ios_base &(*pf)(ios_base &str))ostreaminline
operator<<(bool arg)ostreaminline
operator<<(const char *arg)ostreaminline
operator<<(const signed char *arg)ostreaminline
operator<<(const unsigned char *arg)ostreaminline
operator<<(char arg)ostreaminline
operator<<(signed char arg)ostreaminline
operator<<(unsigned char arg)ostreaminline
operator<<(double arg)ostreaminline
operator<<(float arg)ostreaminline
operator<<(short arg)ostreaminline
operator<<(unsigned short arg)ostreaminline
operator<<(int arg)ostreaminline
operator<<(unsigned int arg)ostreaminline
operator<<(long arg)ostreaminline
operator<<(unsigned long arg)ostreaminline
operator<<(const void *arg)ostreaminline
operator<<(pgm arg)ostreaminline
operator<<(const __FlashStringHelper *arg)ostreaminline
operator>>(istream &(*pf)(istream &str))istreaminline
operator>>(ios_base &(*pf)(ios_base &str))istreaminline
operator>>(ios &(*pf)(ios &str))istreaminline
operator>>(char *str)istreaminline
operator>>(char &ch)istreaminline
operator>>(signed char *str)istreaminline
operator>>(signed char &ch)istreaminline
operator>>(unsigned char *str)istreaminline
operator>>(unsigned char &ch)istreaminline
operator>>(bool &arg)istreaminline
operator>>(short &arg)istreaminline
operator>>(unsigned short &arg)istreaminline
operator>>(int &arg)istreaminline
operator>>(unsigned int &arg)istreaminline
operator>>(long &arg)istreaminline
operator>>(unsigned long &arg)istreaminline
operator>>(double &arg)istreaminline
operator>>(float &arg)istreaminline
operator>>(void *&arg)istreaminline
ostream() (defined in ostream)ostreaminline
outios_basestatic
peek()istream
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
put(char ch)ostreaminline
rdstate() const iosinline
rightios_basestatic
seekdir enum nameios_base
seekg(pos_type pos)istreaminline
seekg(off_type off, seekdir way)istreaminline
seekp(pos_type pos)ostreaminline
seekp(off_type off, seekdir way)ostreaminline
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipWhite()istream
skipwsios_basestatic
streamsize typedefios_base
tellg()istreaminline
tellp()ostreaminline
truncios_basestatic
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
width()ios_baseinline
width(unsigned n)ios_baseinline
+ + + + diff --git a/libs/SdFat-master/html/classiostream.html b/libs/SdFat-master/html/classiostream.html new file mode 100755 index 0000000..14f4fda --- /dev/null +++ b/libs/SdFat-master/html/classiostream.html @@ -0,0 +1,3303 @@ + + + + + + +SdFat: iostream Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

Input/Output stream. + More...

+ +

#include <iostream.h>

+
+Inheritance diagram for iostream:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for iostream:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool bad () const
 
void clear (iostate state=goodbit)
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
ostreamflush ()
 
streamsize gcount () const
 
int get ()
 
istreamget (char &ch)
 
istreamget (char *str, streamsize n, char delim= '\n')
 
istreamgetline (char *str, streamsize count, char delim= '\n')
 
bool good () const
 
istreamignore (streamsize n=1, int delim=-1)
 
 operator const void * () const
 
bool operator! () const
 
ostreamoperator<< (ostream &(*pf)(ostream &str))
 
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
 
ostreamoperator<< (bool arg)
 
ostreamoperator<< (const char *arg)
 
ostreamoperator<< (const signed char *arg)
 
ostreamoperator<< (const unsigned char *arg)
 
ostreamoperator<< (char arg)
 
ostreamoperator<< (signed char arg)
 
ostreamoperator<< (unsigned char arg)
 
ostreamoperator<< (double arg)
 
ostreamoperator<< (float arg)
 
ostreamoperator<< (short arg)
 
ostreamoperator<< (unsigned short arg)
 
ostreamoperator<< (int arg)
 
ostreamoperator<< (unsigned int arg)
 
ostreamoperator<< (long arg)
 
ostreamoperator<< (unsigned long arg)
 
ostreamoperator<< (const void *arg)
 
ostreamoperator<< (pgm arg)
 
ostreamoperator<< (const __FlashStringHelper *arg)
 
istreamoperator>> (istream &(*pf)(istream &str))
 
istreamoperator>> (ios_base &(*pf)(ios_base &str))
 
istreamoperator>> (ios &(*pf)(ios &str))
 
istreamoperator>> (char *str)
 
istreamoperator>> (char &ch)
 
istreamoperator>> (signed char *str)
 
istreamoperator>> (signed char &ch)
 
istreamoperator>> (unsigned char *str)
 
istreamoperator>> (unsigned char &ch)
 
istreamoperator>> (bool &arg)
 
istreamoperator>> (short &arg)
 
istreamoperator>> (unsigned short &arg)
 
istreamoperator>> (int &arg)
 
istreamoperator>> (unsigned int &arg)
 
istreamoperator>> (long &arg)
 
istreamoperator>> (unsigned long &arg)
 
istreamoperator>> (double &arg)
 
istreamoperator>> (float &arg)
 
istreamoperator>> (void *&arg)
 
int peek ()
 
int precision () const
 
int precision (unsigned int n)
 
ostreamput (char ch)
 
iostate rdstate () const
 
istreamseekg (pos_type pos)
 
istreamseekg (off_type off, seekdir way)
 
ostreamseekp (pos_type pos)
 
ostreamseekp (off_type off, seekdir way)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
void skipWhite ()
 
pos_type tellg ()
 
pos_type tellp ()
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
+

Detailed Description

+

Input/Output stream.

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inlineinherited
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::clear (iostate state = goodbit)
+
+inlineinherited
+
+

Clear iostate bits.

+
Parameters
+ + +
[in]stateThe flags you want to set after clearing all flags.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inlineinherited
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inlineinherited
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ostream& ostream::flush ()
+
+inlineinherited
+
+

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
streamsize istream::gcount () const
+
+inlineinherited
+
+
Returns
The number of characters extracted by the last unformatted input function.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int istream::get ()
+
+inherited
+
+

Extract a character if one is available.

+
Returns
The character or -1 if a failure occurs. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream & istream::get (char & c)
+
+inherited
+
+

Extract a character if one is available.

+
Parameters
+ + +
[out]clocation to receive the extracted character.
+
+
+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
)
+
+inherited
+
+

Extract characters.

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
)
+
+inherited
+
+

Extract characters

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

+

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inlineinherited
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream & istream::ignore (streamsize n = 1,
int delim = -1 
)
+
+inherited
+
+

Extract characters and discard them.

+
Parameters
+ + + +
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
+
+
+

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

+

Failures are indicated by the state of the stream.

+
Returns
*this
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inlineinherited
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inlineinherited
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (bool arg)
+
+inlineinherited
+
+

Output bool

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const signed char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const unsigned char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (signed char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (double arg)
+
+inlineinherited
+
+

Output double

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (float arg)
+
+inlineinherited
+
+

Output float

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (short arg)
+
+inlineinherited
+
+

Output signed short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned short arg)
+
+inlineinherited
+
+

Output unsigned short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (int arg)
+
+inlineinherited
+
+

Output signed int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned int arg)
+
+inlineinherited
+
+

Output unsigned int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (long arg)
+
+inlineinherited
+
+

Output signed long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned long arg)
+
+inlineinherited
+
+

Output unsigned long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const void * arg)
+
+inlineinherited
+
+

Output pointer

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (pgm arg)
+
+inlineinherited
+
+

Output a string from flash using the pstr() macro

Parameters
+ + +
[in]argpgm struct pointing to string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const __FlashStringHelper * arg)
+
+inlineinherited
+
+

Output a string from flash using the Arduino F() macro.

Parameters
+ + +
[in]argpointing to flash string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (istream &(*)(istream &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios &(*)(ios &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char * str)
+
+inlineinherited
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char & ch)
+
+inlineinherited
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (bool & arg)
+
+inlineinherited
+
+

Extract a value of type bool.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (short & arg)
+
+inlineinherited
+
+

Extract a value of type short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned short & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (int & arg)
+
+inlineinherited
+
+

Extract a value of type int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned int & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (long & arg)
+
+inlineinherited
+
+

Extract a value of type long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned long & arg)
+
+inlineinherited
+
+

Extract a value of type unsigned long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (double & arg)
+
+inlineinherited
+
+

Extract a value of type double.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (float & arg)
+
+inlineinherited
+
+

Extract a value of type float.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (void *& arg)
+
+inlineinherited
+
+

Extract a value of type void*.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int istream::peek ()
+
+inherited
+
+

Return the next available character without consuming it.

+
Returns
The character if the stream state is good else -1;
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::put (char ch)
+
+inlineinherited
+
+

Puts a character in a stream.

+

The unformatted output function inserts the element ch. It returns *this.

+
Parameters
+ + +
[in]chThe character
+
+
+
Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inlineinherited
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::seekg (pos_type pos)
+
+inlineinherited
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the read pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream& istream::seekg (off_type off,
seekdir way 
)
+
+inlineinherited
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::seekp (pos_type pos)
+
+inlineinherited
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the write pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ostream& ostream::seekp (off_type off,
seekdir way 
)
+
+inlineinherited
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inlineinherited
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void istream::skipWhite ()
+
+inherited
+
+

used to implement ws()

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type istream::tellg ()
+
+inlineinherited
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type ostream::tellp ()
+
+inlineinherited
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/classiostream__coll__graph.png b/libs/SdFat-master/html/classiostream__coll__graph.png new file mode 100755 index 0000000..0b89531 Binary files /dev/null and b/libs/SdFat-master/html/classiostream__coll__graph.png differ diff --git a/libs/SdFat-master/html/classiostream__inherit__graph.png b/libs/SdFat-master/html/classiostream__inherit__graph.png new file mode 100755 index 0000000..2986dd9 Binary files /dev/null and b/libs/SdFat-master/html/classiostream__inherit__graph.png differ diff --git a/libs/SdFat-master/html/classistream-members.html b/libs/SdFat-master/html/classistream-members.html new file mode 100755 index 0000000..a78482c --- /dev/null +++ b/libs/SdFat-master/html/classistream-members.html @@ -0,0 +1,148 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
istream Member List
+
+
+ +

This is the complete list of members for istream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ateios_basestatic
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
clear(iostate state=goodbit)iosinline
cur enum valueios_base
decios_basestatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
fail() const iosinline
failbitios_basestatic
fill()ios_baseinline
fill(char c)ios_baseinline
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
fmtflags typedefios_base
gcount() const istreaminline
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getline(char *str, streamsize count, char delim= '\n')istream
good() const iosinline
goodbitios_basestatic
hexios_basestatic
ignore(streamsize n=1, int delim=-1)istream
inios_basestatic
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
istream() (defined in istream)istreaminline
leftios_basestatic
octios_basestatic
off_type typedefios_base
openmode typedefios_base
operator const void *() const iosinline
operator!() const iosinline
operator>>(istream &(*pf)(istream &str))istreaminline
operator>>(ios_base &(*pf)(ios_base &str))istreaminline
operator>>(ios &(*pf)(ios &str))istreaminline
operator>>(char *str)istreaminline
operator>>(char &ch)istreaminline
operator>>(signed char *str)istreaminline
operator>>(signed char &ch)istreaminline
operator>>(unsigned char *str)istreaminline
operator>>(unsigned char &ch)istreaminline
operator>>(bool &arg)istreaminline
operator>>(short &arg)istreaminline
operator>>(unsigned short &arg)istreaminline
operator>>(int &arg)istreaminline
operator>>(unsigned int &arg)istreaminline
operator>>(long &arg)istreaminline
operator>>(unsigned long &arg)istreaminline
operator>>(double &arg)istreaminline
operator>>(float &arg)istreaminline
operator>>(void *&arg)istreaminline
outios_basestatic
peek()istream
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
rdstate() const iosinline
rightios_basestatic
seekdir enum nameios_base
seekg(pos_type pos)istreaminline
seekg(off_type off, seekdir way)istreaminline
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipWhite()istream
skipwsios_basestatic
streamsize typedefios_base
tellg()istreaminline
truncios_basestatic
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
width()ios_baseinline
width(unsigned n)ios_baseinline
+ + + + diff --git a/libs/SdFat-master/html/classistream.html b/libs/SdFat-master/html/classistream.html new file mode 100755 index 0000000..6048cc0 --- /dev/null +++ b/libs/SdFat-master/html/classistream.html @@ -0,0 +1,2423 @@ + + + + + + +SdFat: istream Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

Input Stream. + More...

+ +

#include <istream.h>

+
+Inheritance diagram for istream:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for istream:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool bad () const
 
void clear (iostate state=goodbit)
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
streamsize gcount () const
 
int get ()
 
istreamget (char &ch)
 
istreamget (char *str, streamsize n, char delim= '\n')
 
istreamgetline (char *str, streamsize count, char delim= '\n')
 
bool good () const
 
istreamignore (streamsize n=1, int delim=-1)
 
 operator const void * () const
 
bool operator! () const
 
istreamoperator>> (istream &(*pf)(istream &str))
 
istreamoperator>> (ios_base &(*pf)(ios_base &str))
 
istreamoperator>> (ios &(*pf)(ios &str))
 
istreamoperator>> (char *str)
 
istreamoperator>> (char &ch)
 
istreamoperator>> (signed char *str)
 
istreamoperator>> (signed char &ch)
 
istreamoperator>> (unsigned char *str)
 
istreamoperator>> (unsigned char &ch)
 
istreamoperator>> (bool &arg)
 
istreamoperator>> (short &arg)
 
istreamoperator>> (unsigned short &arg)
 
istreamoperator>> (int &arg)
 
istreamoperator>> (unsigned int &arg)
 
istreamoperator>> (long &arg)
 
istreamoperator>> (unsigned long &arg)
 
istreamoperator>> (double &arg)
 
istreamoperator>> (float &arg)
 
istreamoperator>> (void *&arg)
 
int peek ()
 
int precision () const
 
int precision (unsigned int n)
 
iostate rdstate () const
 
istreamseekg (pos_type pos)
 
istreamseekg (off_type off, seekdir way)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
void skipWhite ()
 
pos_type tellg ()
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
+

Detailed Description

+

Input Stream.

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inlineinherited
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::clear (iostate state = goodbit)
+
+inlineinherited
+
+

Clear iostate bits.

+
Parameters
+ + +
[in]stateThe flags you want to set after clearing all flags.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inlineinherited
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inlineinherited
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
streamsize istream::gcount () const
+
+inline
+
+
Returns
The number of characters extracted by the last unformatted input function.
+ +
+
+ +
+
+ + + + + + + +
int istream::get ()
+
+

Extract a character if one is available.

+
Returns
The character or -1 if a failure occurs. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + + + + +
istream & istream::get (char & c)
+
+

Extract a character if one is available.

+
Parameters
+ + +
[out]clocation to receive the extracted character.
+
+
+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
)
+
+

Extract characters.

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
)
+
+

Extract characters

+
Parameters
+ + + + +
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
+
+
+

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

+

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

+
Returns
always returns *this. A failure is indicated by the stream state.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inlineinherited
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
istream & istream::ignore (streamsize n = 1,
int delim = -1 
)
+
+

Extract characters and discard them.

+
Parameters
+ + + +
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
+
+
+

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

+

Failures are indicated by the state of the stream.

+
Returns
*this
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inlineinherited
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inlineinherited
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (istream &(*)(istream &str) pf)
+
+inline
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf)
+
+inline
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (ios &(*)(ios &str) pf)
+
+inline
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char * str)
+
+inline
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (char & ch)
+
+inline
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char * str)
+
+inline
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (signed char & ch)
+
+inline
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char * str)
+
+inline
+
+

Extract a character string

Parameters
+ + +
[out]strlocation to store the string.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned char & ch)
+
+inline
+
+

Extract a character

Parameters
+ + +
[out]chlocation to store the character.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (bool & arg)
+
+inline
+
+

Extract a value of type bool.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (short & arg)
+
+inline
+
+

Extract a value of type short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned short & arg)
+
+inline
+
+

Extract a value of type unsigned short.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (int & arg)
+
+inline
+
+

Extract a value of type int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned int & arg)
+
+inline
+
+

Extract a value of type unsigned int.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (long & arg)
+
+inline
+
+

Extract a value of type long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (unsigned long & arg)
+
+inline
+
+

Extract a value of type unsigned long.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (double & arg)
+
+inline
+
+

Extract a value of type double.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (float & arg)
+
+inline
+
+

Extract a value of type float.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::operator>> (void *& arg)
+
+inline
+
+

Extract a value of type void*.

Parameters
+ + +
[out]arglocation to store the value.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + + + +
int istream::peek ()
+
+

Return the next available character without consuming it.

+
Returns
The character if the stream state is good else -1;
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inlineinherited
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& istream::seekg (pos_type pos)
+
+inline
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the read pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream& istream::seekg (off_type off,
seekdir way 
)
+
+inline
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inlineinherited
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + + + +
void istream::skipWhite ()
+
+

used to implement ws()

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type istream::tellg ()
+
+inline
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following files:
    +
  • Arduino/libraries/SdFat/istream.h
  • +
  • Arduino/libraries/SdFat/istream.cpp
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/classistream__coll__graph.png b/libs/SdFat-master/html/classistream__coll__graph.png new file mode 100755 index 0000000..b332637 Binary files /dev/null and b/libs/SdFat-master/html/classistream__coll__graph.png differ diff --git a/libs/SdFat-master/html/classistream__inherit__graph.png b/libs/SdFat-master/html/classistream__inherit__graph.png new file mode 100755 index 0000000..56f088c Binary files /dev/null and b/libs/SdFat-master/html/classistream__inherit__graph.png differ diff --git a/libs/SdFat-master/html/classobufstream-members.html b/libs/SdFat-master/html/classobufstream-members.html new file mode 100755 index 0000000..6462445 --- /dev/null +++ b/libs/SdFat-master/html/classobufstream-members.html @@ -0,0 +1,148 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
obufstream Member List
+
+
+ +

This is the complete list of members for obufstream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ateios_basestatic
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
buf()obufstreaminline
clear(iostate state=goodbit)iosinline
cur enum valueios_base
decios_basestatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
fail() const iosinline
failbitios_basestatic
fill()ios_baseinline
fill(char c)ios_baseinline
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
flush()ostreaminline
fmtflags typedefios_base
good() const iosinline
goodbitios_basestatic
hexios_basestatic
inios_basestatic
init(char *buf, size_t size)obufstreaminline
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
leftios_basestatic
length()obufstreaminline
obufstream()obufstreaminline
obufstream(char *buf, size_t size)obufstreaminline
octios_basestatic
off_type typedefios_base
openmode typedefios_base
operator const void *() const iosinline
operator!() const iosinline
operator<<(ostream &(*pf)(ostream &str))ostreaminline
operator<<(ios_base &(*pf)(ios_base &str))ostreaminline
operator<<(bool arg)ostreaminline
operator<<(const char *arg)ostreaminline
operator<<(const signed char *arg)ostreaminline
operator<<(const unsigned char *arg)ostreaminline
operator<<(char arg)ostreaminline
operator<<(signed char arg)ostreaminline
operator<<(unsigned char arg)ostreaminline
operator<<(double arg)ostreaminline
operator<<(float arg)ostreaminline
operator<<(short arg)ostreaminline
operator<<(unsigned short arg)ostreaminline
operator<<(int arg)ostreaminline
operator<<(unsigned int arg)ostreaminline
operator<<(long arg)ostreaminline
operator<<(unsigned long arg)ostreaminline
operator<<(const void *arg)ostreaminline
operator<<(pgm arg)ostreaminline
operator<<(const __FlashStringHelper *arg)ostreaminline
ostream() (defined in ostream)ostreaminline
outios_basestatic
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
put(char ch)ostreaminline
rdstate() const iosinline
rightios_basestatic
seekdir enum nameios_base
seekp(pos_type pos)ostreaminline
seekp(off_type off, seekdir way)ostreaminline
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipwsios_basestatic
streamsize typedefios_base
tellp()ostreaminline
truncios_basestatic
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
width()ios_baseinline
width(unsigned n)ios_baseinline
+ + + + diff --git a/libs/SdFat-master/html/classobufstream.html b/libs/SdFat-master/html/classobufstream.html new file mode 100755 index 0000000..62edbbd --- /dev/null +++ b/libs/SdFat-master/html/classobufstream.html @@ -0,0 +1,2443 @@ + + + + + + +SdFat: obufstream Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

format a char string + More...

+ +

#include <bufstream.h>

+
+Inheritance diagram for obufstream:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for obufstream:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool bad () const
 
char * buf ()
 
void clear (iostate state=goodbit)
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
ostreamflush ()
 
bool good () const
 
void init (char *buf, size_t size)
 
size_t length ()
 
 obufstream ()
 
 obufstream (char *buf, size_t size)
 
 operator const void * () const
 
bool operator! () const
 
ostreamoperator<< (ostream &(*pf)(ostream &str))
 
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
 
ostreamoperator<< (bool arg)
 
ostreamoperator<< (const char *arg)
 
ostreamoperator<< (const signed char *arg)
 
ostreamoperator<< (const unsigned char *arg)
 
ostreamoperator<< (char arg)
 
ostreamoperator<< (signed char arg)
 
ostreamoperator<< (unsigned char arg)
 
ostreamoperator<< (double arg)
 
ostreamoperator<< (float arg)
 
ostreamoperator<< (short arg)
 
ostreamoperator<< (unsigned short arg)
 
ostreamoperator<< (int arg)
 
ostreamoperator<< (unsigned int arg)
 
ostreamoperator<< (long arg)
 
ostreamoperator<< (unsigned long arg)
 
ostreamoperator<< (const void *arg)
 
ostreamoperator<< (pgm arg)
 
ostreamoperator<< (const __FlashStringHelper *arg)
 
int precision () const
 
int precision (unsigned int n)
 
ostreamput (char ch)
 
iostate rdstate () const
 
ostreamseekp (pos_type pos)
 
ostreamseekp (off_type off, seekdir way)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
pos_type tellp ()
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
+

Detailed Description

+

format a char string

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
obufstream::obufstream ()
+
+inline
+
+

constructor

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
obufstream::obufstream (char * buf,
size_t size 
)
+
+inline
+
+

Constructor

Parameters
+ + + +
[in]bufbuffer for formatted string
[in]sizebuffer size
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inlineinherited
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char* obufstream::buf ()
+
+inline
+
+
Returns
a pointer to the buffer
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::clear (iostate state = goodbit)
+
+inlineinherited
+
+

Clear iostate bits.

+
Parameters
+ + +
[in]stateThe flags you want to set after clearing all flags.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inlineinherited
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inlineinherited
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ostream& ostream::flush ()
+
+inlineinherited
+
+

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inlineinherited
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void obufstream::init (char * buf,
size_t size 
)
+
+inline
+
+

Initialize an obufstream

Parameters
+ + + +
[in]bufbuffer for formatted string
[in]sizebuffer size
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
size_t obufstream::length ()
+
+inline
+
+
Returns
the length of the formatted string
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inlineinherited
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inlineinherited
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (bool arg)
+
+inlineinherited
+
+

Output bool

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const signed char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const unsigned char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (signed char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (double arg)
+
+inlineinherited
+
+

Output double

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (float arg)
+
+inlineinherited
+
+

Output float

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (short arg)
+
+inlineinherited
+
+

Output signed short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned short arg)
+
+inlineinherited
+
+

Output unsigned short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (int arg)
+
+inlineinherited
+
+

Output signed int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned int arg)
+
+inlineinherited
+
+

Output unsigned int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (long arg)
+
+inlineinherited
+
+

Output signed long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned long arg)
+
+inlineinherited
+
+

Output unsigned long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const void * arg)
+
+inlineinherited
+
+

Output pointer

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (pgm arg)
+
+inlineinherited
+
+

Output a string from flash using the pstr() macro

Parameters
+ + +
[in]argpgm struct pointing to string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const __FlashStringHelper * arg)
+
+inlineinherited
+
+

Output a string from flash using the Arduino F() macro.

Parameters
+ + +
[in]argpointing to flash string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::put (char ch)
+
+inlineinherited
+
+

Puts a character in a stream.

+

The unformatted output function inserts the element ch. It returns *this.

+
Parameters
+ + +
[in]chThe character
+
+
+
Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inlineinherited
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::seekp (pos_type pos)
+
+inlineinherited
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the write pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ostream& ostream::seekp (off_type off,
seekdir way 
)
+
+inlineinherited
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inlineinherited
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type ostream::tellp ()
+
+inlineinherited
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/classobufstream__coll__graph.png b/libs/SdFat-master/html/classobufstream__coll__graph.png new file mode 100755 index 0000000..65fb372 Binary files /dev/null and b/libs/SdFat-master/html/classobufstream__coll__graph.png differ diff --git a/libs/SdFat-master/html/classobufstream__inherit__graph.png b/libs/SdFat-master/html/classobufstream__inherit__graph.png new file mode 100755 index 0000000..65fb372 Binary files /dev/null and b/libs/SdFat-master/html/classobufstream__inherit__graph.png differ diff --git a/libs/SdFat-master/html/classofstream-members.html b/libs/SdFat-master/html/classofstream-members.html new file mode 100755 index 0000000..8d46832 --- /dev/null +++ b/libs/SdFat-master/html/classofstream-members.html @@ -0,0 +1,216 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
ofstream Member List
+
+
+ +

This is the complete list of members for ofstream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ateios_basestatic
available()SdBaseFileinlineprivate
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
clear(iostate state=goodbit)ofstreaminline
clearWriteError()SdBaseFileinlineprivate
close()ofstreaminline
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFileprivate
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFileprivate
cur enum valueios_base
curCluster() const SdBaseFileinlineprivate
curPosition() const SdBaseFileinlineprivate
cwd()SdBaseFileinlineprivatestatic
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFileinlineprivatestatic
dateTimeCallbackCancel()SdBaseFileinlineprivatestatic
decios_basestatic
dirEntry(dir_t *dir)SdBaseFileprivate
dirName(const dir_t &dir, char *name)SdBaseFileprivatestatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
exists(const char *name)SdBaseFileprivate
fail() const iosinline
failbitios_basestatic
fgets(char *str, int16_t num, char *delim=0)SdBaseFileprivate
fileSize() const SdBaseFileinlineprivate
fill()ios_baseinline
fill(char c)ios_baseinline
firstCluster() const SdBaseFileinlineprivate
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
flush()ostreaminline
fmtflags typedefios_base
getFilename(char *name)SdBaseFileprivate
getpos(FatPos_t *pos)SdBaseFileprivate
getWriteError()SdBaseFileinlineprivate
good() const iosinline
goodbitios_basestatic
hexios_basestatic
inios_basestatic
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
is_open()ofstreaminline
isDir() const SdBaseFileinlineprivate
isFile() const SdBaseFileinlineprivate
isOpen() const SdBaseFileinlineprivate
isRoot() const SdBaseFileinlineprivate
isSubDir() const SdBaseFileinlineprivate
leftios_basestatic
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFileprivate
ls(uint8_t flags=0)SdBaseFileprivate
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFileprivate
octios_basestatic
off_type typedefios_base
ofstream() (defined in ofstream)ofstreaminline
ofstream(const char *path, ios::openmode mode=out)ofstreaminlineexplicit
open(const char *path, openmode mode=out)ofstreaminline
SdStreamBase::open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFileprivate
SdStreamBase::open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFileprivate
openmode typedefios_base
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFileprivate
openRoot(SdVolume *vol)SdBaseFileprivate
operator const void *() const iosinline
operator!() const iosinline
operator<<(ostream &(*pf)(ostream &str))ostreaminline
operator<<(ios_base &(*pf)(ios_base &str))ostreaminline
operator<<(bool arg)ostreaminline
operator<<(const char *arg)ostreaminline
operator<<(const signed char *arg)ostreaminline
operator<<(const unsigned char *arg)ostreaminline
operator<<(char arg)ostreaminline
operator<<(signed char arg)ostreaminline
operator<<(unsigned char arg)ostreaminline
operator<<(double arg)ostreaminline
operator<<(float arg)ostreaminline
operator<<(short arg)ostreaminline
operator<<(unsigned short arg)ostreaminline
operator<<(int arg)ostreaminline
operator<<(unsigned int arg)ostreaminline
operator<<(long arg)ostreaminline
operator<<(unsigned long arg)ostreaminline
operator<<(const void *arg)ostreaminline
operator<<(pgm arg)ostreaminline
operator<<(const __FlashStringHelper *arg)ostreaminline
ostream() (defined in ostream)ostreaminline
outios_basestatic
peek()SdBaseFileprivate
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
printCreateDateTime(Print *pr)SdBaseFileprivate
printFatDate(uint16_t fatDate)SdBaseFileprivatestatic
printFatDate(Print *pr, uint16_t fatDate)SdBaseFileprivatestatic
printFatTime(uint16_t fatTime)SdBaseFileprivatestatic
printFatTime(Print *pr, uint16_t fatTime)SdBaseFileprivatestatic
printField(float value, char term, uint8_t prec=2)SdBaseFileprivate
printField(int16_t value, char term)SdBaseFileprivate
printField(uint16_t value, char term)SdBaseFileprivate
printField(int32_t value, char term)SdBaseFileprivate
printField(uint32_t value, char term)SdBaseFileprivate
printFileSize(Print *pr)SdBaseFileprivate
printModifyDateTime(Print *pr)SdBaseFileprivate
printName()SdBaseFileprivate
printName(Print *pr)SdBaseFileprivate
put(char ch)ostreaminline
rdstate() const iosinline
read()SdBaseFileprivate
read(void *buf, size_t nbyte)SdBaseFileprivate
readDir(dir_t *dir)SdBaseFileprivate
remove(SdBaseFile *dirFile, const char *path)SdBaseFileprivatestatic
remove()SdBaseFileprivate
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFileprivate
rewind()SdBaseFileinlineprivate
rightios_basestatic
rmdir()SdBaseFileprivate
rmRfStar()SdBaseFileprivate
SdBaseFile()SdBaseFileinlineprivate
SdBaseFile(const char *path, uint8_t oflag)SdBaseFileprivate
seekCur(int32_t offset)SdBaseFileinlineprivate
seekdir enum nameios_base
seekEnd(int32_t offset=0)SdBaseFileinlineprivate
seekp(pos_type pos)ostreaminline
seekp(off_type off, seekdir way)ostreaminline
seekSet(uint32_t pos)SdBaseFileprivate
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setpos(FatPos_t *pos)SdBaseFileprivate
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipwsios_basestatic
streamsize typedefios_base
sync()SdBaseFileprivate
tellp()ostreaminline
timestamp(SdBaseFile *file)SdBaseFileprivate
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFileprivate
truncios_basestatic
truncate(uint32_t size)SdBaseFileprivate
type() const SdBaseFileinlineprivate
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
volume() const SdBaseFileinlineprivate
width()ios_baseinline
width(unsigned n)ios_baseinline
write(const void *buf, size_t nbyte)SdBaseFileprivate
writeErrorSdBaseFileprivate
+ + + + diff --git a/libs/SdFat-master/html/classofstream.html b/libs/SdFat-master/html/classofstream.html new file mode 100755 index 0000000..bf53583 --- /dev/null +++ b/libs/SdFat-master/html/classofstream.html @@ -0,0 +1,2561 @@ + + + + + + +SdFat: ofstream Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

SD card output stream. + More...

+ +

#include <SdStream.h>

+
+Inheritance diagram for ofstream:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for ofstream:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool bad () const
 
void clear (iostate state=goodbit)
 
void close ()
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
ostreamflush ()
 
bool good () const
 
bool is_open ()
 
 ofstream (const char *path, ios::openmode mode=out)
 
void open (const char *path, openmode mode=out)
 
 operator const void * () const
 
bool operator! () const
 
ostreamoperator<< (ostream &(*pf)(ostream &str))
 
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
 
ostreamoperator<< (bool arg)
 
ostreamoperator<< (const char *arg)
 
ostreamoperator<< (const signed char *arg)
 
ostreamoperator<< (const unsigned char *arg)
 
ostreamoperator<< (char arg)
 
ostreamoperator<< (signed char arg)
 
ostreamoperator<< (unsigned char arg)
 
ostreamoperator<< (double arg)
 
ostreamoperator<< (float arg)
 
ostreamoperator<< (short arg)
 
ostreamoperator<< (unsigned short arg)
 
ostreamoperator<< (int arg)
 
ostreamoperator<< (unsigned int arg)
 
ostreamoperator<< (long arg)
 
ostreamoperator<< (unsigned long arg)
 
ostreamoperator<< (const void *arg)
 
ostreamoperator<< (pgm arg)
 
ostreamoperator<< (const __FlashStringHelper *arg)
 
int precision () const
 
int precision (unsigned int n)
 
ostreamput (char ch)
 
iostate rdstate () const
 
ostreamseekp (pos_type pos)
 
ostreamseekp (off_type off, seekdir way)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
pos_type tellp ()
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Private Member Functions

uint32_t available ()
 
void clearWriteError ()
 
bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
 
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
 
uint32_t curCluster () const
 
uint32_t curPosition () const
 
bool dirEntry (dir_t *dir)
 
bool exists (const char *name)
 
int16_t fgets (char *str, int16_t num, char *delim=0)
 
uint32_t fileSize () const
 
uint32_t firstCluster () const
 
bool getFilename (char *name)
 
void getpos (FatPos_t *pos)
 
bool getWriteError ()
 
bool isDir () const
 
bool isFile () const
 
bool isOpen () const
 
bool isRoot () const
 
bool isSubDir () const
 
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
 
void ls (uint8_t flags=0)
 
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
 
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
 
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
 
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
 
bool openRoot (SdVolume *vol)
 
int peek ()
 
bool printCreateDateTime (Print *pr)
 
int printField (float value, char term, uint8_t prec=2)
 
int printField (int16_t value, char term)
 
int printField (uint16_t value, char term)
 
int printField (int32_t value, char term)
 
int printField (uint32_t value, char term)
 
size_t printFileSize (Print *pr)
 
bool printModifyDateTime (Print *pr)
 
size_t printName ()
 
size_t printName (Print *pr)
 
int16_t read ()
 
int read (void *buf, size_t nbyte)
 
int8_t readDir (dir_t *dir)
 
bool remove ()
 
bool rename (SdBaseFile *dirFile, const char *newPath)
 
void rewind ()
 
bool rmdir ()
 
bool rmRfStar ()
 
bool seekCur (int32_t offset)
 
bool seekEnd (int32_t offset=0)
 
bool seekSet (uint32_t pos)
 
void setpos (FatPos_t *pos)
 
bool sync ()
 
bool timestamp (SdBaseFile *file)
 
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
 
bool truncate (uint32_t size)
 
uint8_t type () const
 
SdVolumevolume () const
 
int write (const void *buf, size_t nbyte)
 
+ + + + + + + + + + + + + + + + + + + +

+Static Private Member Functions

static SdBaseFilecwd ()
 
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
 
static void dateTimeCallbackCancel ()
 
static void dirName (const dir_t &dir, char *name)
 
static void printFatDate (uint16_t fatDate)
 
static void printFatDate (Print *pr, uint16_t fatDate)
 
static void printFatTime (uint16_t fatTime)
 
static void printFatTime (Print *pr, uint16_t fatTime)
 
static bool remove (SdBaseFile *dirFile, const char *path)
 
+ + + +

+Private Attributes

bool writeError
 
+

Detailed Description

+

SD card output stream.

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ofstream::ofstream (const char * path,
ios::openmode mode = out 
)
+
+inlineexplicit
+
+

Constructor with open

Parameters
+ + + +
[in]pathfile to open
[in]modeopen mode
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inlineinherited
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ofstream::clear (iostate state = goodbit)
+
+inline
+
+

Clear state and writeError

Parameters
+ + +
[in]statenew state for stream
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void ofstream::close ()
+
+inline
+
+

Close a file and force cached data and directory information to be written to the storage device.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inlineinherited
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inlineinherited
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ostream& ostream::flush ()
+
+inlineinherited
+
+

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inlineinherited
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ofstream::is_open ()
+
+inline
+
+
Returns
True if stream is open else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void ofstream::open (const char * path,
openmode mode = out 
)
+
+inline
+
+

Open an ofstream

Parameters
+ + + +
[in]pathfile to open
[in]modeopen mode
+
+
+

mode See fstream::open() for valid modes.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inlineinherited
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inlineinherited
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf)
+
+inlineinherited
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (bool arg)
+
+inlineinherited
+
+

Output bool

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const signed char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const unsigned char * arg)
+
+inlineinherited
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (signed char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned char arg)
+
+inlineinherited
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (double arg)
+
+inlineinherited
+
+

Output double

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (float arg)
+
+inlineinherited
+
+

Output float

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (short arg)
+
+inlineinherited
+
+

Output signed short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned short arg)
+
+inlineinherited
+
+

Output unsigned short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (int arg)
+
+inlineinherited
+
+

Output signed int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned int arg)
+
+inlineinherited
+
+

Output unsigned int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (long arg)
+
+inlineinherited
+
+

Output signed long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned long arg)
+
+inlineinherited
+
+

Output unsigned long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const void * arg)
+
+inlineinherited
+
+

Output pointer

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (pgm arg)
+
+inlineinherited
+
+

Output a string from flash using the pstr() macro

Parameters
+ + +
[in]argpgm struct pointing to string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const __FlashStringHelper * arg)
+
+inlineinherited
+
+

Output a string from flash using the Arduino F() macro.

Parameters
+ + +
[in]argpointing to flash string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::put (char ch)
+
+inlineinherited
+
+

Puts a character in a stream.

+

The unformatted output function inserts the element ch. It returns *this.

+
Parameters
+ + +
[in]chThe character
+
+
+
Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inlineinherited
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::seekp (pos_type pos)
+
+inlineinherited
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the write pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ostream& ostream::seekp (off_type off,
seekdir way 
)
+
+inlineinherited
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inlineinherited
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type ostream::tellp ()
+
+inlineinherited
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/classofstream__coll__graph.png b/libs/SdFat-master/html/classofstream__coll__graph.png new file mode 100755 index 0000000..eaa6cd8 Binary files /dev/null and b/libs/SdFat-master/html/classofstream__coll__graph.png differ diff --git a/libs/SdFat-master/html/classofstream__inherit__graph.png b/libs/SdFat-master/html/classofstream__inherit__graph.png new file mode 100755 index 0000000..eaa6cd8 Binary files /dev/null and b/libs/SdFat-master/html/classofstream__inherit__graph.png differ diff --git a/libs/SdFat-master/html/classostream-members.html b/libs/SdFat-master/html/classostream-members.html new file mode 100755 index 0000000..1a46ae3 --- /dev/null +++ b/libs/SdFat-master/html/classostream-members.html @@ -0,0 +1,143 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
ostream Member List
+
+
+ +

This is the complete list of members for ostream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adjustfieldios_basestatic
appios_basestatic
ateios_basestatic
bad() const iosinline
badbitios_basestatic
basefieldios_basestatic
beg enum valueios_base
binaryios_basestatic
boolalphaios_basestatic
clear(iostate state=goodbit)iosinline
cur enum valueios_base
decios_basestatic
end enum valueios_base
eof() const iosinline
eofbitios_basestatic
fail() const iosinline
failbitios_basestatic
fill()ios_baseinline
fill(char c)ios_baseinline
flags() const ios_baseinline
flags(fmtflags fl)ios_baseinline
flagsToBase()ios_baseinlineprotected
flush()ostreaminline
fmtflags typedefios_base
good() const iosinline
goodbitios_basestatic
hexios_basestatic
inios_basestatic
internalios_basestatic
ios()iosinline
ios_base() (defined in ios_base)ios_baseinline
iostate typedefios_base
leftios_basestatic
octios_basestatic
off_type typedefios_base
openmode typedefios_base
operator const void *() const iosinline
operator!() const iosinline
operator<<(ostream &(*pf)(ostream &str))ostreaminline
operator<<(ios_base &(*pf)(ios_base &str))ostreaminline
operator<<(bool arg)ostreaminline
operator<<(const char *arg)ostreaminline
operator<<(const signed char *arg)ostreaminline
operator<<(const unsigned char *arg)ostreaminline
operator<<(char arg)ostreaminline
operator<<(signed char arg)ostreaminline
operator<<(unsigned char arg)ostreaminline
operator<<(double arg)ostreaminline
operator<<(float arg)ostreaminline
operator<<(short arg)ostreaminline
operator<<(unsigned short arg)ostreaminline
operator<<(int arg)ostreaminline
operator<<(unsigned int arg)ostreaminline
operator<<(long arg)ostreaminline
operator<<(unsigned long arg)ostreaminline
operator<<(const void *arg)ostreaminline
operator<<(pgm arg)ostreaminline
operator<<(const __FlashStringHelper *arg)ostreaminline
ostream() (defined in ostream)ostreaminline
outios_basestatic
pos_type typedefios_base
precision() const ios_baseinline
precision(unsigned int n)ios_baseinline
put(char ch)ostreaminline
rdstate() const iosinline
rightios_basestatic
seekdir enum nameios_base
seekp(pos_type pos)ostreaminline
seekp(off_type off, seekdir way)ostreaminline
setf(fmtflags fl)ios_baseinline
setf(fmtflags fl, fmtflags mask)ios_baseinline
setstate(iostate state)iosinline
showbaseios_basestatic
showpointios_basestatic
showposios_basestatic
skipwsios_basestatic
streamsize typedefios_base
tellp()ostreaminline
truncios_basestatic
unsetf(fmtflags fl)ios_baseinline
uppercaseios_basestatic
width()ios_baseinline
width(unsigned n)ios_baseinline
+ + + + diff --git a/libs/SdFat-master/html/classostream.html b/libs/SdFat-master/html/classostream.html new file mode 100755 index 0000000..132f5f3 --- /dev/null +++ b/libs/SdFat-master/html/classostream.html @@ -0,0 +1,2279 @@ + + + + + + +SdFat: ostream Class Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

Output Stream. + More...

+ +

#include <ostream.h>

+
+Inheritance diagram for ostream:
+
+
Inheritance graph
+ + +
[legend]
+
+Collaboration diagram for ostream:
+
+
Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + +

+Public Types

typedef unsigned int fmtflags
 
typedef unsigned char iostate
 
typedef int32_t off_type
 
typedef uint8_t openmode
 
typedef uint32_t pos_type
 
enum  seekdir { beg, +cur, +end + }
 
typedef uint32_t streamsize
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool bad () const
 
void clear (iostate state=goodbit)
 
bool eof () const
 
bool fail () const
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
ostreamflush ()
 
bool good () const
 
 operator const void * () const
 
bool operator! () const
 
ostreamoperator<< (ostream &(*pf)(ostream &str))
 
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
 
ostreamoperator<< (bool arg)
 
ostreamoperator<< (const char *arg)
 
ostreamoperator<< (const signed char *arg)
 
ostreamoperator<< (const unsigned char *arg)
 
ostreamoperator<< (char arg)
 
ostreamoperator<< (signed char arg)
 
ostreamoperator<< (unsigned char arg)
 
ostreamoperator<< (double arg)
 
ostreamoperator<< (float arg)
 
ostreamoperator<< (short arg)
 
ostreamoperator<< (unsigned short arg)
 
ostreamoperator<< (int arg)
 
ostreamoperator<< (unsigned int arg)
 
ostreamoperator<< (long arg)
 
ostreamoperator<< (unsigned long arg)
 
ostreamoperator<< (const void *arg)
 
ostreamoperator<< (pgm arg)
 
ostreamoperator<< (const __FlashStringHelper *arg)
 
int precision () const
 
int precision (unsigned int n)
 
ostreamput (char ch)
 
iostate rdstate () const
 
ostreamseekp (pos_type pos)
 
ostreamseekp (off_type off, seekdir way)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void setstate (iostate state)
 
pos_type tellp ()
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

static const fmtflags adjustfield = left | right | internal
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const iostate badbit = 0X01
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode binary = 0X10
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags dec = 0x0008
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const iostate goodbit = 0x00
 
static const fmtflags hex = 0x0010
 
static const openmode in = 0X20
 
static const fmtflags internal = 0x0004
 
static const fmtflags left = 0x0001
 
static const fmtflags oct = 0x0020
 
static const openmode out = 0X40
 
static const fmtflags right = 0x0002
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const openmode trunc = 0X80
 
static const fmtflags uppercase = 0x4000
 
+ + + +

+Protected Member Functions

uint8_t flagsToBase ()
 
+

Detailed Description

+

Output Stream.

+

Member Typedef Documentation

+ +
+
+ + + + + +
+ + + + +
typedef unsigned int ios_base::fmtflags
+
+inherited
+
+

type for format flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef unsigned char ios_base::iostate
+
+inherited
+
+

typedef for iostate bitmask

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef int32_t ios_base::off_type
+
+inherited
+
+

type for relative seek offset

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint8_t ios_base::openmode
+
+inherited
+
+

typedef for iostream open mode

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::pos_type
+
+inherited
+
+

type for absolute seek position

+ +
+
+ +
+
+ + + + + +
+ + + + +
typedef uint32_t ios_base::streamsize
+
+inherited
+
+

unsigned size that can represent maximum file size. (violates spec - should be signed)

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + + +
+ + + + +
enum ios_base::seekdir
+
+inherited
+
+

enumerated type for the direction of relative seeks

+ + + + +
Enumerator
beg  +

seek relative to the beginning of the stream

+
cur  +

seek relative to the current stream position

+
end  +

seek relative to the end of the stream

+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool ios::bad () const
+
+inlineinherited
+
+
Returns
true if bad bit is set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::clear (iostate state = goodbit)
+
+inlineinherited
+
+

Clear iostate bits.

+
Parameters
+ + +
[in]stateThe flags you want to set after clearing all flags.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::eof () const
+
+inlineinherited
+
+
Returns
true if end of file has been reached else false.
+

Warning: An empty file returns false before the first read.

+

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::fail () const
+
+inlineinherited
+
+
Returns
true if any iostate bit other than eof are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
char ios_base::fill ()
+
+inlineinherited
+
+
Returns
fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
char ios_base::fill (char c)
+
+inlineinherited
+
+

Set fill character

Parameters
+ + +
[in]cnew fill character
+
+
+
Returns
old fill character
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
fmtflags ios_base::flags () const
+
+inlineinherited
+
+
Returns
format flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::flags (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flag
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
uint8_t ios_base::flagsToBase ()
+
+inlineprotectedinherited
+
+
Returns
current number base
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ostream& ostream::flush ()
+
+inline
+
+

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::good () const
+
+inlineinherited
+
+
Returns
True if no iostate flags are set else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
ios::operator const void * () const
+
+inlineinherited
+
+
Returns
null pointer if fail() is true.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool ios::operator! () const
+
+inlineinherited
+
+
Returns
true if fail() else false.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf)
+
+inline
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf)
+
+inline
+
+

call manipulator

Parameters
+ + +
[in]pffunction to call
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (bool arg)
+
+inline
+
+

Output bool

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const char * arg)
+
+inline
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const signed char * arg)
+
+inline
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const unsigned char * arg)
+
+inline
+
+

Output string

Parameters
+ + +
[in]argstring to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (char arg)
+
+inline
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (signed char arg)
+
+inline
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned char arg)
+
+inline
+
+

Output character

Parameters
+ + +
[in]argcharacter to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (double arg)
+
+inline
+
+

Output double

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (float arg)
+
+inline
+
+

Output float

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (short arg)
+
+inline
+
+

Output signed short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned short arg)
+
+inline
+
+

Output unsigned short

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (int arg)
+
+inline
+
+

Output signed int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned int arg)
+
+inline
+
+

Output unsigned int

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (long arg)
+
+inline
+
+

Output signed long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (unsigned long arg)
+
+inline
+
+

Output unsigned long

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const void * arg)
+
+inline
+
+

Output pointer

Parameters
+ + +
[in]argvalue to output
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (pgm arg)
+
+inline
+
+

Output a string from flash using the pstr() macro

Parameters
+ + +
[in]argpgm struct pointing to string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::operator<< (const __FlashStringHelper * arg)
+
+inline
+
+

Output a string from flash using the Arduino F() macro.

Parameters
+ + +
[in]argpointing to flash string
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
int ios_base::precision () const
+
+inlineinherited
+
+
Returns
precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
int ios_base::precision (unsigned int n)
+
+inlineinherited
+
+

set precision

Parameters
+ + +
[in]nnew precision
+
+
+
Returns
old precision
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::put (char ch)
+
+inline
+
+

Puts a character in a stream.

+

The unformatted output function inserts the element ch. It returns *this.

+
Parameters
+ + +
[in]chThe character
+
+
+
Returns
A reference to the ostream object.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
iostate ios::rdstate () const
+
+inlineinherited
+
+
Returns
The iostate flags for this file.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& ostream::seekp (pos_type pos)
+
+inline
+
+

Set the stream position

Parameters
+ + +
[in]posThe absolute position in which to move the write pointer.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ostream& ostream::seekp (off_type off,
seekdir way 
)
+
+inline
+
+

Set the stream position.

+
Parameters
+ + + +
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
+
+
+
Returns
Is always *this. Failure is indicated by the state of *this.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
fmtflags ios_base::setf (fmtflags fl)
+
+inlineinherited
+
+

set format flags

Parameters
+ + +
[in]flnew flags to be or'ed in
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
)
+
+inlineinherited
+
+

modify format flags

Parameters
+ + + +
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios::setstate (iostate state)
+
+inlineinherited
+
+

Set iostate bits.

+
Parameters
+ + +
[in]stateBitts to set.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
pos_type ostream::tellp ()
+
+inline
+
+
Returns
the stream position
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void ios_base::unsetf (fmtflags fl)
+
+inlineinherited
+
+

clear format flags

Parameters
+ + +
[in]flflags to be cleared
+
+
+
Returns
old flags
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
unsigned ios_base::width ()
+
+inlineinherited
+
+
Returns
width
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
unsigned ios_base::width (unsigned n)
+
+inlineinherited
+
+

set width

Parameters
+ + +
[in]nnew width
+
+
+
Returns
old width
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::adjustfield = left | right | internal
+
+staticinherited
+
+

mask for adjustfield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::app = 0X4
+
+staticinherited
+
+

seek to end before each write

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::ate = 0X8
+
+staticinherited
+
+

open and seek to end immediately after opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::badbit = 0X01
+
+staticinherited
+
+

iostate bad bit for a nonrecoverable error.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::basefield = dec | hex | oct
+
+staticinherited
+
+

mask for basefield

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::binary = 0X10
+
+staticinherited
+
+

perform input and output in binary mode (as opposed to text mode)

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::boolalpha = 0x0100
+
+staticinherited
+
+

use strings true/false for bool

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::dec = 0x0008
+
+staticinherited
+
+

base 10 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::eofbit = 0x02
+
+staticinherited
+
+

iostate bit for end of file reached

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::failbit = 0X04
+
+staticinherited
+
+

iostate fail bit for nonfatal error

+ +
+
+ +
+
+ + + + + +
+ + + + +
const iostate ios_base::goodbit = 0x00
+
+staticinherited
+
+

iostate for no flags

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::hex = 0x0010
+
+staticinherited
+
+

base 16 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::in = 0X20
+
+staticinherited
+
+

open for input

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::internal = 0x0004
+
+staticinherited
+
+

fill between sign/base prefix and number

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::left = 0x0001
+
+staticinherited
+
+

left adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::oct = 0x0020
+
+staticinherited
+
+

base 8 flag

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::out = 0X40
+
+staticinherited
+
+

open for output

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::right = 0x0002
+
+staticinherited
+
+

right adjust fields

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showbase = 0x0200
+
+staticinherited
+
+

use prefix 0X for hex and 0 for oct

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpoint = 0x0400
+
+staticinherited
+
+

always show '.' for floating numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::showpos = 0x0800
+
+staticinherited
+
+

show + sign for nonnegative numbers

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::skipws = 0x1000
+
+staticinherited
+
+

skip initial white space

+ +
+
+ +
+
+ + + + + +
+ + + + +
const openmode ios_base::trunc = 0X80
+
+staticinherited
+
+

truncate an existing stream when opening

+ +
+
+ +
+
+ + + + + +
+ + + + +
const fmtflags ios_base::uppercase = 0x4000
+
+staticinherited
+
+

use uppercase letters in number representations

+ +
+
+
The documentation for this class was generated from the following files:
    +
  • Arduino/libraries/SdFat/ostream.h
  • +
  • Arduino/libraries/SdFat/ostream.cpp
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/classostream__coll__graph.png b/libs/SdFat-master/html/classostream__coll__graph.png new file mode 100755 index 0000000..310a306 Binary files /dev/null and b/libs/SdFat-master/html/classostream__coll__graph.png differ diff --git a/libs/SdFat-master/html/classostream__inherit__graph.png b/libs/SdFat-master/html/classostream__inherit__graph.png new file mode 100755 index 0000000..8e5928f Binary files /dev/null and b/libs/SdFat-master/html/classostream__inherit__graph.png differ diff --git a/libs/SdFat-master/html/closed.png b/libs/SdFat-master/html/closed.png new file mode 100755 index 0000000..98cc2c9 Binary files /dev/null and b/libs/SdFat-master/html/closed.png differ diff --git a/libs/SdFat-master/html/dir_1281b15c327061056ab3b326e90c50cf.html b/libs/SdFat-master/html/dir_1281b15c327061056ab3b326e90c50cf.html new file mode 100755 index 0000000..456eefb --- /dev/null +++ b/libs/SdFat-master/html/dir_1281b15c327061056ab3b326e90c50cf.html @@ -0,0 +1,153 @@ + + + + + + +SdFat: Arduino/libraries/SdFat Directory Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
SdFat Directory Reference
+
+
+
+Directory dependency graph for SdFat:
+
+
Arduino/libraries/SdFat
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  ArduinoStream.h
 ArduinoInStream and ArduinoOutStream classes.
 
file  bufstream.h
 ibufstream and obufstream classes
 
file  ios.h
 ios_base and ios classes
 
file  iostream.h
 iostream class
 
file  istream.cpp
 
file  istream.h
 istream class
 
file  MinimumSerial.cpp
 
file  MinimumSerial.h
 
file  ostream.cpp
 
file  ostream.h
 ostream class
 
file  Sd2Card.cpp
 
file  Sd2Card.h
 Sd2Card class for V2 SD/SDHC cards.
 
file  SdBaseFile.cpp
 
file  SdBaseFile.h
 SdBaseFile class.
 
file  SdBaseFilePrint.cpp
 
file  SdFat.cpp
 
file  SdFat.h
 SdFat class.
 
file  SdFatConfig.h
 configuration definitions
 
file  SdFatErrorPrint.cpp
 
file  SdFatmainpage.h
 
file  SdFatUtil.cpp
 
file  SdFatUtil.h
 Useful utility functions.
 
file  SdFile.cpp
 
file  SdFile.h
 SdFile class.
 
file  SdSpi.h
 SdSpi class for V2 SD/SDHC cards.
 
file  SdSpiArduino.cpp
 
file  SdSpiAVR.cpp
 
file  SdSpiSAM3X.cpp
 
file  SdSpiSoft.cpp
 
file  SdSpiTeensy3.cpp
 
file  SdStream.cpp
 
file  SdStream.h
 fstream, ifstream, and ofstream classes
 
file  SdVolume.cpp
 
file  SdVolume.h
 SdVolume class.
 
file  StdioStream.cpp
 
file  StdioStream.h
 StdioStream class.
 
+
+ + + + diff --git a/libs/SdFat-master/html/dir_1281b15c327061056ab3b326e90c50cf_dep.png b/libs/SdFat-master/html/dir_1281b15c327061056ab3b326e90c50cf_dep.png new file mode 100755 index 0000000..c9c448f Binary files /dev/null and b/libs/SdFat-master/html/dir_1281b15c327061056ab3b326e90c50cf_dep.png differ diff --git a/libs/SdFat-master/html/dir_481cc946b8a81b8d9363a4aad6201160.html b/libs/SdFat-master/html/dir_481cc946b8a81b8d9363a4aad6201160.html new file mode 100755 index 0000000..6ee4dbb --- /dev/null +++ b/libs/SdFat-master/html/dir_481cc946b8a81b8d9363a4aad6201160.html @@ -0,0 +1,67 @@ + + + + + + +SdFat: Arduino/libraries Directory Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
libraries Directory Reference
+
+
+
+Directory dependency graph for libraries:
+
+
Arduino/libraries
+ + +
+ + + + +

+Directories

directory  SdFat
 
+
+ + + + diff --git a/libs/SdFat-master/html/dir_481cc946b8a81b8d9363a4aad6201160_dep.png b/libs/SdFat-master/html/dir_481cc946b8a81b8d9363a4aad6201160_dep.png new file mode 100755 index 0000000..423a5e8 Binary files /dev/null and b/libs/SdFat-master/html/dir_481cc946b8a81b8d9363a4aad6201160_dep.png differ diff --git a/libs/SdFat-master/html/dir_a991eec27578c865874ede3d8ec657c2.html b/libs/SdFat-master/html/dir_a991eec27578c865874ede3d8ec657c2.html new file mode 100755 index 0000000..07781ae --- /dev/null +++ b/libs/SdFat-master/html/dir_a991eec27578c865874ede3d8ec657c2.html @@ -0,0 +1,67 @@ + + + + + + +SdFat: Arduino Directory Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
Arduino Directory Reference
+
+
+
+Directory dependency graph for Arduino:
+
+
Arduino
+ + +
+ + + + +

+Directories

directory  libraries
 
+
+ + + + diff --git a/libs/SdFat-master/html/dir_a991eec27578c865874ede3d8ec657c2_dep.png b/libs/SdFat-master/html/dir_a991eec27578c865874ede3d8ec657c2_dep.png new file mode 100755 index 0000000..5422742 Binary files /dev/null and b/libs/SdFat-master/html/dir_a991eec27578c865874ede3d8ec657c2_dep.png differ diff --git a/libs/SdFat-master/html/doxygen.css b/libs/SdFat-master/html/doxygen.css new file mode 100755 index 0000000..02e8b01 --- /dev/null +++ b/libs/SdFat-master/html/doxygen.css @@ -0,0 +1,1440 @@ +/* The standard CSS for doxygen 1.8.8 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 4px 6px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('ftv2folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('ftv2folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('ftv2doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + diff --git a/libs/SdFat-master/html/doxygen.png b/libs/SdFat-master/html/doxygen.png new file mode 100755 index 0000000..3ff17d8 Binary files /dev/null and b/libs/SdFat-master/html/doxygen.png differ diff --git a/libs/SdFat-master/html/dynsections.js b/libs/SdFat-master/html/dynsections.js new file mode 100755 index 0000000..85e1836 --- /dev/null +++ b/libs/SdFat-master/html/dynsections.js @@ -0,0 +1,97 @@ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + +SdFat: File List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + + + + +
  Arduino
  libraries
  SdFat
 ArduinoStream.hArduinoInStream and ArduinoOutStream classes
 bufstream.hibufstream and obufstream classes
 ios.hios_base and ios classes
 iostream.hiostream class
 istream.histream class
 ostream.hostream class
 Sd2Card.hSd2Card class for V2 SD/SDHC cards
 SdBaseFile.hSdBaseFile class
 SdFat.hSdFat class
 SdFatConfig.hConfiguration definitions
 SdFatUtil.hUseful utility functions
 SdFile.hSdFile class
 SdSpi.hSdSpi class for V2 SD/SDHC cards
 SdStream.hfstream, ifstream, and ofstream classes
 SdVolume.hSdVolume class
 StdioStream.hStdioStream class
+
+
+ + + + diff --git a/libs/SdFat-master/html/ftv2blank.png b/libs/SdFat-master/html/ftv2blank.png new file mode 100755 index 0000000..63c605b Binary files /dev/null and b/libs/SdFat-master/html/ftv2blank.png differ diff --git a/libs/SdFat-master/html/ftv2doc.png b/libs/SdFat-master/html/ftv2doc.png new file mode 100755 index 0000000..17edabf Binary files /dev/null and b/libs/SdFat-master/html/ftv2doc.png differ diff --git a/libs/SdFat-master/html/ftv2folderclosed.png b/libs/SdFat-master/html/ftv2folderclosed.png new file mode 100755 index 0000000..bb8ab35 Binary files /dev/null and b/libs/SdFat-master/html/ftv2folderclosed.png differ diff --git a/libs/SdFat-master/html/ftv2folderopen.png b/libs/SdFat-master/html/ftv2folderopen.png new file mode 100755 index 0000000..d6c7f67 Binary files /dev/null and b/libs/SdFat-master/html/ftv2folderopen.png differ diff --git a/libs/SdFat-master/html/ftv2lastnode.png b/libs/SdFat-master/html/ftv2lastnode.png new file mode 100755 index 0000000..63c605b Binary files /dev/null and b/libs/SdFat-master/html/ftv2lastnode.png differ diff --git a/libs/SdFat-master/html/ftv2link.png b/libs/SdFat-master/html/ftv2link.png new file mode 100755 index 0000000..17edabf Binary files /dev/null and b/libs/SdFat-master/html/ftv2link.png differ diff --git a/libs/SdFat-master/html/ftv2mlastnode.png b/libs/SdFat-master/html/ftv2mlastnode.png new file mode 100755 index 0000000..0b63f6d Binary files /dev/null and b/libs/SdFat-master/html/ftv2mlastnode.png differ diff --git a/libs/SdFat-master/html/ftv2mnode.png b/libs/SdFat-master/html/ftv2mnode.png new file mode 100755 index 0000000..0b63f6d Binary files /dev/null and b/libs/SdFat-master/html/ftv2mnode.png differ diff --git a/libs/SdFat-master/html/ftv2node.png b/libs/SdFat-master/html/ftv2node.png new file mode 100755 index 0000000..63c605b Binary files /dev/null and b/libs/SdFat-master/html/ftv2node.png differ diff --git a/libs/SdFat-master/html/ftv2plastnode.png b/libs/SdFat-master/html/ftv2plastnode.png new file mode 100755 index 0000000..c6ee22f Binary files /dev/null and b/libs/SdFat-master/html/ftv2plastnode.png differ diff --git a/libs/SdFat-master/html/ftv2pnode.png b/libs/SdFat-master/html/ftv2pnode.png new file mode 100755 index 0000000..c6ee22f Binary files /dev/null and b/libs/SdFat-master/html/ftv2pnode.png differ diff --git a/libs/SdFat-master/html/ftv2splitbar.png b/libs/SdFat-master/html/ftv2splitbar.png new file mode 100755 index 0000000..fe895f2 Binary files /dev/null and b/libs/SdFat-master/html/ftv2splitbar.png differ diff --git a/libs/SdFat-master/html/ftv2vertline.png b/libs/SdFat-master/html/ftv2vertline.png new file mode 100755 index 0000000..63c605b Binary files /dev/null and b/libs/SdFat-master/html/ftv2vertline.png differ diff --git a/libs/SdFatBeta20120108/html/functions.html b/libs/SdFat-master/html/functions.html similarity index 51% rename from libs/SdFatBeta20120108/html/functions.html rename to libs/SdFat-master/html/functions.html index c821275..7099dbc 100755 --- a/libs/SdFatBeta20120108/html/functions.html +++ b/libs/SdFat-master/html/functions.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -81,7 +86,7 @@

- a -

- +
+ + diff --git a/libs/SdFat-master/html/functions_b.html b/libs/SdFat-master/html/functions_b.html new file mode 100755 index 0000000..d067823 --- /dev/null +++ b/libs/SdFat-master/html/functions_b.html @@ -0,0 +1,124 @@ + + + + + + +SdFat: Class Members + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- b -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_0x63.html b/libs/SdFat-master/html/functions_c.html similarity index 59% rename from libs/SdFatBeta20120108/html/functions_0x63.html rename to libs/SdFat-master/html/functions_c.html index 3b780cf..0cd21f0 100755 --- a/libs/SdFatBeta20120108/html/functions_0x63.html +++ b/libs/SdFat-master/html/functions_c.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -93,18 +98,26 @@

- c -

- +
+ + diff --git a/libs/SdFatBeta20120108/html/functions_0x64.html b/libs/SdFat-master/html/functions_d.html similarity index 58% rename from libs/SdFatBeta20120108/html/functions_0x64.html rename to libs/SdFat-master/html/functions_d.html index dd57be4..21b3ed5 100755 --- a/libs/SdFatBeta20120108/html/functions_0x64.html +++ b/libs/SdFat-master/html/functions_d.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -101,17 +106,13 @@

- d -

-
- +
+ + diff --git a/libs/SdFatBeta20120108/html/functions_0x65.html b/libs/SdFat-master/html/functions_e.html similarity index 59% rename from libs/SdFatBeta20120108/html/functions_0x65.html rename to libs/SdFat-master/html/functions_e.html index 130ed15..9675399 100755 --- a/libs/SdFatBeta20120108/html/functions_0x65.html +++ b/libs/SdFat-master/html/functions_e.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -77,18 +82,6 @@

- e -

- +
+ + diff --git a/libs/SdFatBeta20120108/html/functions_enum.html b/libs/SdFat-master/html/functions_enum.html similarity index 71% rename from libs/SdFatBeta20120108/html/functions_enum.html rename to libs/SdFat-master/html/functions_enum.html index da1ca15..269b4e8 100755 --- a/libs/SdFatBeta20120108/html/functions_enum.html +++ b/libs/SdFat-master/html/functions_enum.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Enumerations - + + + - -
+
-
SdFat
+
SdFat +
+ + -
+
  -
- + + + diff --git a/libs/SdFatBeta20120108/html/functions_eval.html b/libs/SdFat-master/html/functions_eval.html similarity index 74% rename from libs/SdFatBeta20120108/html/functions_eval.html rename to libs/SdFat-master/html/functions_eval.html index 7a2d5c6..76be408 100755 --- a/libs/SdFatBeta20120108/html/functions_eval.html +++ b/libs/SdFat-master/html/functions_eval.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Enumerator - + + + - -
+
-
SdFat
+
SdFat +
+ + -
+
  -
- + + + diff --git a/libs/SdFatBeta20120108/html/functions_0x66.html b/libs/SdFat-master/html/functions_f.html similarity index 50% rename from libs/SdFatBeta20120108/html/functions_0x66.html rename to libs/SdFat-master/html/functions_f.html index 6e2faed..09dac14 100755 --- a/libs/SdFatBeta20120108/html/functions_0x66.html +++ b/libs/SdFat-master/html/functions_f.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -86,28 +91,8 @@

- f -

- +
+ + diff --git a/libs/SdFat-master/html/functions_func.html b/libs/SdFat-master/html/functions_func.html new file mode 100755 index 0000000..c761ead --- /dev/null +++ b/libs/SdFat-master/html/functions_func.html @@ -0,0 +1,101 @@ + + + + + + +SdFat: Class Members - Functions + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+  + +

- a -

+
+ + + + diff --git a/libs/SdFat-master/html/functions_func_b.html b/libs/SdFat-master/html/functions_func_b.html new file mode 100755 index 0000000..e8afb28 --- /dev/null +++ b/libs/SdFat-master/html/functions_func_b.html @@ -0,0 +1,108 @@ + + + + + + +SdFat: Class Members - Functions + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+  + +

- b -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_func_0x63.html b/libs/SdFat-master/html/functions_func_c.html similarity index 59% rename from libs/SdFatBeta20120108/html/functions_func_0x63.html rename to libs/SdFat-master/html/functions_func_c.html index f86520f..0481b4b 100755 --- a/libs/SdFatBeta20120108/html/functions_func_0x63.html +++ b/libs/SdFat-master/html/functions_func_c.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Functions - + + + - -
+
-
SdFat
+
SdFat +
+ + +
  @@ -88,14 +95,22 @@

- c -

- +
+ + diff --git a/libs/SdFatBeta20120108/html/functions_func_0x64.html b/libs/SdFat-master/html/functions_func_d.html similarity index 55% rename from libs/SdFatBeta20120108/html/functions_func_0x64.html rename to libs/SdFat-master/html/functions_func_d.html index b998606..920fefa 100755 --- a/libs/SdFatBeta20120108/html/functions_func_0x64.html +++ b/libs/SdFat-master/html/functions_func_d.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Functions - + + + - -
+
-
SdFat
+
SdFat +
+ + +
  @@ -90,9 +97,12 @@

- d -

-
- +
+ + diff --git a/libs/SdFatBeta20120108/html/functions_func_0x65.html b/libs/SdFat-master/html/functions_func_e.html similarity index 60% rename from libs/SdFatBeta20120108/html/functions_func_0x65.html rename to libs/SdFat-master/html/functions_func_e.html index 82268e0..8f4acd4 100755 --- a/libs/SdFatBeta20120108/html/functions_func_0x65.html +++ b/libs/SdFat-master/html/functions_func_e.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Functions - + + + - -
+
-
SdFat
+
SdFat +
+ + +
  @@ -106,9 +113,12 @@

- e -

-
- +
+ + diff --git a/libs/SdFat-master/html/functions_func_f.html b/libs/SdFat-master/html/functions_func_f.html new file mode 100755 index 0000000..9cb22c4 --- /dev/null +++ b/libs/SdFat-master/html/functions_func_f.html @@ -0,0 +1,171 @@ + + + + + + +SdFat: Class Members - Functions + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+  + +

- f -

+
+ + + + diff --git a/libs/SdFat-master/html/functions_func_g.html b/libs/SdFat-master/html/functions_func_g.html new file mode 100755 index 0000000..03260e2 --- /dev/null +++ b/libs/SdFat-master/html/functions_func_g.html @@ -0,0 +1,116 @@ + + + + + + +SdFat: Class Members - Functions + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+  + +

- g -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_func_0x69.html b/libs/SdFat-master/html/functions_func_i.html similarity index 55% rename from libs/SdFatBeta20120108/html/functions_func_0x69.html rename to libs/SdFat-master/html/functions_func_i.html index c47cec3..fa8c2a9 100755 --- a/libs/SdFatBeta20120108/html/functions_func_0x69.html +++ b/libs/SdFat-master/html/functions_func_i.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Functions - + + + - -
+
-
SdFat
+
SdFat +
+ + +
  @@ -81,12 +88,11 @@

- i -

- +
+ + diff --git a/libs/SdFat-master/html/functions_func_l.html b/libs/SdFat-master/html/functions_func_l.html new file mode 100755 index 0000000..c6631fd --- /dev/null +++ b/libs/SdFat-master/html/functions_func_l.html @@ -0,0 +1,97 @@ + + + + + + +SdFat: Class Members - Functions + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+  + +

- l -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_func_0x6d.html b/libs/SdFat-master/html/functions_func_m.html similarity index 50% rename from libs/SdFatBeta20120108/html/functions_func_0x6d.html rename to libs/SdFat-master/html/functions_func_m.html index 4b7234d..0927745 100755 --- a/libs/SdFatBeta20120108/html/functions_func_0x6d.html +++ b/libs/SdFat-master/html/functions_func_m.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Functions - + + + - -
+
-
SdFat
+
SdFat +
+ + +
  @@ -76,9 +83,12 @@

- m -

-
- +
+ + diff --git a/libs/SdFat-master/html/functions_func_n.html b/libs/SdFat-master/html/functions_func_n.html new file mode 100755 index 0000000..76706f6 --- /dev/null +++ b/libs/SdFat-master/html/functions_func_n.html @@ -0,0 +1,93 @@ + + + + + + +SdFat: Class Members - Functions + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+  + +

- n -

    +
  • name() +: File +
  • +
+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_func_0x6f.html b/libs/SdFat-master/html/functions_func_o.html similarity index 52% rename from libs/SdFatBeta20120108/html/functions_func_0x6f.html rename to libs/SdFat-master/html/functions_func_o.html index 107da6e..1849b73 100755 --- a/libs/SdFatBeta20120108/html/functions_func_0x6f.html +++ b/libs/SdFat-master/html/functions_func_o.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Functions - + + + - -
+
-
SdFat
+
SdFat +
+ + +
  @@ -78,18 +85,24 @@

- o -

- +
+ + diff --git a/libs/SdFat-master/html/functions_func_p.html b/libs/SdFat-master/html/functions_func_p.html new file mode 100755 index 0000000..9a26c39 --- /dev/null +++ b/libs/SdFat-master/html/functions_func_p.html @@ -0,0 +1,151 @@ + + + + + + +SdFat: Class Members - Functions + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+  + +

- p -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_func_0x72.html b/libs/SdFat-master/html/functions_func_r.html similarity index 54% rename from libs/SdFatBeta20120108/html/functions_func_0x72.html rename to libs/SdFat-master/html/functions_func_r.html index 72d5477..a273679 100755 --- a/libs/SdFatBeta20120108/html/functions_func_0x72.html +++ b/libs/SdFat-master/html/functions_func_r.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Functions - + + + - -
+
-
SdFat
+
SdFat +
+ + +
  @@ -75,7 +82,10 @@

- r -

- +
+ + diff --git a/libs/SdFatBeta20120108/html/functions_func_0x73.html b/libs/SdFat-master/html/functions_func_s.html similarity index 59% rename from libs/SdFatBeta20120108/html/functions_func_0x73.html rename to libs/SdFat-master/html/functions_func_s.html index 7c44433..71f287e 100755 --- a/libs/SdFatBeta20120108/html/functions_func_0x73.html +++ b/libs/SdFat-master/html/functions_func_s.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Functions - + + + - -
+
-
SdFat
+
SdFat +
+ + +
 

- s -

- +
+ + diff --git a/libs/SdFatBeta20120108/html/functions_func_0x74.html b/libs/SdFat-master/html/functions_func_t.html similarity index 53% rename from libs/SdFatBeta20120108/html/functions_func_0x74.html rename to libs/SdFat-master/html/functions_func_t.html index a458137..5ec0530 100755 --- a/libs/SdFatBeta20120108/html/functions_func_0x74.html +++ b/libs/SdFat-master/html/functions_func_t.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Functions - + + + - -
+
-
SdFat
+
SdFat +
+ + +
  @@ -85,13 +92,16 @@

- t -

-
- +
+ + diff --git a/libs/SdFat-master/html/functions_func_u.html b/libs/SdFat-master/html/functions_func_u.html new file mode 100755 index 0000000..53b9fea --- /dev/null +++ b/libs/SdFat-master/html/functions_func_u.html @@ -0,0 +1,96 @@ + + + + + + +SdFat: Class Members - Functions + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+  + +

- u -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_func_0x76.html b/libs/SdFat-master/html/functions_func_v.html similarity index 51% rename from libs/SdFatBeta20120108/html/functions_func_0x76.html rename to libs/SdFat-master/html/functions_func_v.html index 5e0e828..8d4ccbc 100755 --- a/libs/SdFatBeta20120108/html/functions_func_0x76.html +++ b/libs/SdFat-master/html/functions_func_v.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Functions - + + + - -
+
-
SdFat
+
SdFat +
+ + +
  @@ -81,9 +88,12 @@

- v -

-
- +
+ + diff --git a/libs/SdFatBeta20120108/html/functions_func_0x77.html b/libs/SdFat-master/html/functions_func_w.html similarity index 52% rename from libs/SdFatBeta20120108/html/functions_func_0x77.html rename to libs/SdFat-master/html/functions_func_w.html index b6e08a3..49ef68d 100755 --- a/libs/SdFatBeta20120108/html/functions_func_0x77.html +++ b/libs/SdFat-master/html/functions_func_w.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Functions - + + + - -
+
-
SdFat
+
SdFat +
+ + +
  @@ -75,11 +82,10 @@

- w -

- +
+ + diff --git a/libs/SdFatBeta20120108/html/functions_0x67.html b/libs/SdFat-master/html/functions_g.html similarity index 51% rename from libs/SdFatBeta20120108/html/functions_0x67.html rename to libs/SdFat-master/html/functions_g.html index e8c33ed..998e007 100755 --- a/libs/SdFatBeta20120108/html/functions_0x67.html +++ b/libs/SdFat-master/html/functions_g.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -80,6 +85,9 @@

- g -

- +
+ + diff --git a/libs/SdFat-master/html/functions_h.html b/libs/SdFat-master/html/functions_h.html new file mode 100755 index 0000000..c59e55d --- /dev/null +++ b/libs/SdFat-master/html/functions_h.html @@ -0,0 +1,94 @@ + + + + + + +SdFat: Class Members + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- h -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_0x69.html b/libs/SdFat-master/html/functions_i.html similarity index 61% rename from libs/SdFatBeta20120108/html/functions_0x69.html rename to libs/SdFat-master/html/functions_i.html index 7db5424..95bff74 100755 --- a/libs/SdFatBeta20120108/html/functions_0x69.html +++ b/libs/SdFat-master/html/functions_i.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -87,11 +92,11 @@

- i -

- +
+ + diff --git a/libs/SdFat-master/html/functions_l.html b/libs/SdFat-master/html/functions_l.html new file mode 100755 index 0000000..de79b66 --- /dev/null +++ b/libs/SdFat-master/html/functions_l.html @@ -0,0 +1,101 @@ + + + + + + +SdFat: Class Members + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- l -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_0x6d.html b/libs/SdFat-master/html/functions_m.html similarity index 50% rename from libs/SdFatBeta20120108/html/functions_0x6d.html rename to libs/SdFat-master/html/functions_m.html index 47146ff..20324bf 100755 --- a/libs/SdFatBeta20120108/html/functions_0x6d.html +++ b/libs/SdFat-master/html/functions_m.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -77,24 +82,17 @@

- m -

-
- +
+ + diff --git a/libs/SdFat-master/html/functions_n.html b/libs/SdFat-master/html/functions_n.html new file mode 100755 index 0000000..4e25c58 --- /dev/null +++ b/libs/SdFat-master/html/functions_n.html @@ -0,0 +1,94 @@ + + + + + + +SdFat: Class Members + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- n -

    +
  • name() +: File +
  • +
+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_0x6f.html b/libs/SdFat-master/html/functions_o.html similarity index 55% rename from libs/SdFatBeta20120108/html/functions_0x6f.html rename to libs/SdFat-master/html/functions_o.html index ccea898..045bb81 100755 --- a/libs/SdFatBeta20120108/html/functions_0x6f.html +++ b/libs/SdFat-master/html/functions_o.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -80,10 +85,6 @@

- o -

- +
+ + diff --git a/libs/SdFat-master/html/functions_p.html b/libs/SdFat-master/html/functions_p.html new file mode 100755 index 0000000..15d50c2 --- /dev/null +++ b/libs/SdFat-master/html/functions_p.html @@ -0,0 +1,162 @@ + + + + + + +SdFat: Class Members + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- p -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_0x72.html b/libs/SdFat-master/html/functions_r.html similarity index 54% rename from libs/SdFatBeta20120108/html/functions_0x72.html rename to libs/SdFat-master/html/functions_r.html index 29c64ba..ee333b6 100755 --- a/libs/SdFatBeta20120108/html/functions_0x72.html +++ b/libs/SdFat-master/html/functions_r.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -78,7 +83,10 @@

- r -

- +
+ + diff --git a/libs/SdFatBeta20120108/html/functions_0x73.html b/libs/SdFat-master/html/functions_s.html similarity index 61% rename from libs/SdFatBeta20120108/html/functions_0x73.html rename to libs/SdFat-master/html/functions_s.html index cfaf965..a7fdd85 100755 --- a/libs/SdFatBeta20120108/html/functions_0x73.html +++ b/libs/SdFat-master/html/functions_s.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:

- s -

- +
+ + diff --git a/libs/SdFat-master/html/functions_t.html b/libs/SdFat-master/html/functions_t.html new file mode 100755 index 0000000..ef444d5 --- /dev/null +++ b/libs/SdFat-master/html/functions_t.html @@ -0,0 +1,111 @@ + + + + + + +SdFat: Class Members + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- t -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_type.html b/libs/SdFat-master/html/functions_type.html similarity index 76% rename from libs/SdFatBeta20120108/html/functions_type.html rename to libs/SdFat-master/html/functions_type.html index 4f06b7e..ee55554 100755 --- a/libs/SdFatBeta20120108/html/functions_type.html +++ b/libs/SdFat-master/html/functions_type.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - Typedefs - + + + - -
+
-
SdFat
+
SdFat +
+ + -
+
 
  • fmtflags @@ -66,9 +72,12 @@ : ios_base
-
- + + + diff --git a/libs/SdFatBeta20120108/html/functions_0x75.html b/libs/SdFat-master/html/functions_u.html similarity index 51% rename from libs/SdFatBeta20120108/html/functions_0x75.html rename to libs/SdFat-master/html/functions_u.html index 2790d8f..4579ed2 100755 --- a/libs/SdFatBeta20120108/html/functions_0x75.html +++ b/libs/SdFat-master/html/functions_u.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:

- u -

-
- +
+ + diff --git a/libs/SdFatBeta20120108/html/functions_0x76.html b/libs/SdFat-master/html/functions_v.html similarity index 51% rename from libs/SdFatBeta20120108/html/functions_0x76.html rename to libs/SdFat-master/html/functions_v.html index a3adf53..17db8a3 100755 --- a/libs/SdFatBeta20120108/html/functions_0x76.html +++ b/libs/SdFat-master/html/functions_v.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -80,21 +85,16 @@

- v -

-
- +
+ + diff --git a/libs/SdFat-master/html/functions_vars.html b/libs/SdFat-master/html/functions_vars.html new file mode 100755 index 0000000..9038711 --- /dev/null +++ b/libs/SdFat-master/html/functions_vars.html @@ -0,0 +1,274 @@ + + + + + + +SdFat: Class Members - Variables + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+  + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- w -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/functions_0x77.html b/libs/SdFat-master/html/functions_w.html similarity index 55% rename from libs/SdFatBeta20120108/html/functions_0x77.html rename to libs/SdFat-master/html/functions_w.html index 328cede..1aa1246 100755 --- a/libs/SdFatBeta20120108/html/functions_0x77.html +++ b/libs/SdFat-master/html/functions_w.html @@ -2,24 +2,30 @@ + + SdFat: Class Members - + + + - -
+
-
SdFat
+
SdFat +
+ + +
Here is a list of all documented class members with links to the class documentation for each member:
@@ -81,12 +86,10 @@

- w -

- +
+ + diff --git a/libs/SdFatBeta20120108/html/globals.html b/libs/SdFat-master/html/globals.html similarity index 53% rename from libs/SdFatBeta20120108/html/globals.html rename to libs/SdFat-master/html/globals.html index 7ee68b4..26d541a 100755 --- a/libs/SdFatBeta20120108/html/globals.html +++ b/libs/SdFat-master/html/globals.html @@ -2,24 +2,30 @@ + + SdFat: File Members - + + + - -
+
-
SdFat
+
SdFat +
+ + -
+
Here is a list of all documented file members with links to the documentation:

- a -

@@ -78,85 +83,40 @@

- b -

- d -

- e -

@@ -165,48 +125,6 @@

- f -

- + + + diff --git a/libs/SdFat-master/html/globals_defs.html b/libs/SdFat-master/html/globals_defs.html new file mode 100755 index 0000000..63a850c --- /dev/null +++ b/libs/SdFat-master/html/globals_defs.html @@ -0,0 +1,224 @@ + + + + + + +SdFat: File Members + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+  + +

- a -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- p -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+
+ + + + diff --git a/libs/SdFatBeta20120108/html/globals_func.html b/libs/SdFat-master/html/globals_func.html similarity index 51% rename from libs/SdFatBeta20120108/html/globals_func.html rename to libs/SdFat-master/html/globals_func.html index 2a295eb..8414775 100755 --- a/libs/SdFatBeta20120108/html/globals_func.html +++ b/libs/SdFat-master/html/globals_func.html @@ -2,24 +2,30 @@ + + SdFat: File Members - + + + - -
+
-
SdFat
+
SdFat +
+ + - -
+
-  - -

- b -

- + + + diff --git a/libs/SdFat-master/html/globals_vars.html b/libs/SdFat-master/html/globals_vars.html new file mode 100755 index 0000000..0ea0e26 --- /dev/null +++ b/libs/SdFat-master/html/globals_vars.html @@ -0,0 +1,214 @@ + + + + + + +SdFat: File Members + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + + +
+
+  + +

- f -

+ + +

- s -

+ + +

- u -

+
+ + + + diff --git a/libs/SdFat-master/html/graph_legend.html b/libs/SdFat-master/html/graph_legend.html new file mode 100755 index 0000000..9116c02 --- /dev/null +++ b/libs/SdFat-master/html/graph_legend.html @@ -0,0 +1,113 @@ + + + + + + +SdFat: Graph Legend + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + +
+
+
+
Graph Legend
+
+
+

This page explains how to interpret the graphs that are generated by doxygen.

+

Consider the following example:

1 /*! Invisible class because of truncation */
+
2 class Invisible { };
+
3 
+
4 /*! Truncated class, inheritance relation is hidden */
+
5 class Truncated : public Invisible { };
+
6 
+
7 /* Class not documented with doxygen comments */
+
8 class Undocumented { };
+
9 
+
10 /*! Class that is inherited using public inheritance */
+
11 class PublicBase : public Truncated { };
+
12 
+
13 /*! A template class */
+
14 template<class T> class Templ { };
+
15 
+
16 /*! Class that is inherited using protected inheritance */
+
17 class ProtectedBase { };
+
18 
+
19 /*! Class that is inherited using private inheritance */
+
20 class PrivateBase { };
+
21 
+
22 /*! Class that is used by the Inherited class */
+
23 class Used { };
+
24 
+
25 /*! Super class that inherits a number of other classes */
+
26 class Inherited : public PublicBase,
+
27  protected ProtectedBase,
+
28  private PrivateBase,
+
29  public Undocumented,
+
30  public Templ<int>
+
31 {
+
32  private:
+
33  Used *m_usedClass;
+
34 };
+

This will result in the following graph:

+
+ +
+

The boxes in the above graph have the following meaning:

+
    +
  • +A filled gray box represents the struct or class for which the graph is generated.
  • +
  • +A box with a black border denotes a documented struct or class.
  • +
  • +A box with a grey border denotes an undocumented struct or class.
  • +
  • +A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • +
+

The arrows have the following meaning:

+
    +
  • +A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • +
  • +A dark green arrow is used for protected inheritance.
  • +
  • +A dark red arrow is used for private inheritance.
  • +
  • +A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • +
  • +A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • +
+
+ + + + diff --git a/libs/SdFat-master/html/graph_legend.png b/libs/SdFat-master/html/graph_legend.png new file mode 100755 index 0000000..40d66df Binary files /dev/null and b/libs/SdFat-master/html/graph_legend.png differ diff --git a/libs/SdFat-master/html/hierarchy.html b/libs/SdFat-master/html/hierarchy.html new file mode 100755 index 0000000..bb033a7 --- /dev/null +++ b/libs/SdFat-master/html/hierarchy.html @@ -0,0 +1,100 @@ + + + + + + +SdFat: Class Hierarchy + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
Class Hierarchy
+
+
+
+

Go to the graphical class hierarchy

+This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 12345]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Ccache_tCache for an SD data block
 CFatPos_tInternal type for istream do not use in user apps
 Cios_baseBase class for all streams
 CiosError and state information for all streams
 CistreamInput Stream
 CibufstreamParse a char string
 CArduinoInStreamInput stream for Arduino Stream objects
 CifstreamSD file input stream
 CiostreamInput/Output stream
 CfstreamSD file input/output stream
 CostreamOutput Stream
 CArduinoOutStreamOutput stream for Arduino Print objects
 CiostreamInput/Output stream
 CobufstreamFormat a char string
 CofstreamSD card output stream
 CSdStreamBaseBase class for SD streams
 CfstreamSD file input/output stream
 CifstreamSD file input stream
 CofstreamSD card output stream
 CpgmType for string in flash
 CPrint
 CMinimumSerialMini serial class for the SdFat library
 CSdFileSdBaseFile with Arduino Stream
 CSd2CardRaw access to SD and SDHC flash memory cards
 CSdBaseFileBase class for SdFile with Print and C++ streams
 CFileArduino SD.h style File API
 CSdFileSdBaseFile with Arduino Stream
 CSdStreamBaseBase class for SD streams
 CStdioStreamStdioStream implements a minimal stdio stream
 CSdFatIntegration class for the SdFat library
 CSdSpiSPI class for access to SD and SDHC flash memory cards
 CSdVolumeAccess FAT16 and FAT32 volumes on SD and SDHC cards
 CsetfillType for setfill manipulator
 CsetprecisionType for setprecision manipulator
 CsetwType for setw manipulator
 CStream
 CFileArduino SD.h style File API
+
+
+ + + + diff --git a/libs/SdFat-master/html/index.html b/libs/SdFat-master/html/index.html new file mode 100755 index 0000000..1d025db --- /dev/null +++ b/libs/SdFat-master/html/index.html @@ -0,0 +1,143 @@ + + + + + + +SdFat: Arduino SdFat Library + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + +
+
+
+
Arduino SdFat Library
+
+
+
Copyright © 2012, 2013, 2014 by William Greiman

+Introduction

+

The Arduino SdFat Library is a minimal implementation of FAT16 and FAT32 file systems on SD flash memory cards. Standard SD and high capacity SDHC cards are supported.

+

Experimental support for FAT12 can be enabled by setting FAT12_SUPPORT nonzero in SdFatConfig.h.

+

The SdFat library only supports short 8.3 names.

+

The main classes in SdFat are SdFat, SdBaseFile, SdFile, File, StdioStream, fstream, ifstream, and ofstream.

+

The SdFat class maintains a FAT volume, a current working directory, and simplifies initialization of other classes.

+

The SdBaseFile class provides basic file access functions such as open(), binary read(), binary write(), close(), remove(), and sync(). SdBaseFile is the smallest file class.

+

The SdFile class has all the SdBaseFile class functions plus the Arduino Print class functions.

+

The File class has all the SdBaseFile functions plus the functions in the Arduino SD.h File class. This provides compatibility with the Arduino SD.h library.

+

The StdioStream class implements functions similar to Linux/Unix standard buffered input/output.

+

The fstream class implements C++ iostreams for both reading and writing text files.

+

The ifstream class implements C++ iostreams for reading text files.

+

The ofstream class implements C++ iostreams for writing text files.

+

The classes ibufstream and obufstream format and parse character strings in memory buffers.

+

the classes ArduinoInStream and ArduinoOutStream provide iostream functions for Serial, LiquidCrystal, and other devices.

+

A number of example are provided in the SdFat/examples folder. These were developed to test SdFat and illustrate its use.

+

+Installation

+

You must manually install SdFat by copying the SdFat folder from the download package to the Arduino libraries folder in you sketch book.

+

See the Manual installation section of this guide.

+

http://arduino.cc/en/Guide/Libraries

+

+SdFat Configuration

+

Several configuration options may be changed by editing the SdFatConfig.h file in the SdFat folder.

+

Set SD_FILE_USES_STREAM nonzero to use Stream instead of Print for SdFile. Using Stream will use more flash.

+

To enable SD card CRC checking set USE_SD_CRC nonzero.

+

To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.

+

Set FAT12_SUPPORT nonzero to enable use of FAT12 volumes. FAT12 has not been well tested and requires additional flash.

+

Set USE_ARDUINO_SPI_LIBRARY nonzero to force use of Arduino Standard SPI library. This will override native and software SPI for all boards.

+

Use of software SPI can be enabled for selected boards by setting the symbols AVR_SOFT_SPI, DUE_SOFT_SPI, LEONARDO_SOFT_SPI, MEGA_SOFT_SPI, and TEENSY3_SOFT_SPI.

+

Set ENABLE_SPI_TRANSACTION nonzero to enable the SPI transaction feature of the standard Arduino SPI library. You must include SPI.h in your sketches when ENABLE_SPI_TRANSACTION is nonzero.

+

Set ENABLE_SPI_YIELD nonzero to enable release of the SPI bus during SD card busy waits.

+

+SD\SDHC Cards

+

Arduinos access SD cards using the cards SPI protocol. PCs, Macs, and most consumer devices use the 4-bit parallel SD protocol. A card that functions well on A PC or Mac may not work well on the Arduino.

+

Most cards have good SPI read performance but cards vary widely in SPI write performance. Write performance is limited by how efficiently the card manages internal erase/remapping operations. The Arduino cannot optimize writes to reduce erase operations because of its limit RAM.

+

SanDisk cards generally have good write performance. They seem to have more internal RAM buffering than other cards and therefore can limit the number of flash erase operations that the Arduino forces due to its limited RAM.

+

+Hardware Configuration

+

SdFat was developed using an Adafruit Industries Data Logging Shield.

+

The hardware interface to the SD card should not use a resistor based level shifter. SdFat sets the SPI bus frequency to 8 MHz which results in signal rise times that are too slow for the edge detectors in many newer SD card controllers when resistor voltage dividers are used.

+

The 5 to 3.3 V level shifter for 5 V Arduinos should be IC based like the 74HC4050N based circuit shown in the file SdLevel.png. The Adafruit Wave Shield uses a 74AHC125N. Gravitech sells SD and MicroSD Card Adapters based on the 74LCX245.

+

If you are using a resistor based level shifter and are having problems try setting the SPI bus frequency to 4 MHz. This can be done by using card.init(SPI_HALF_SPEED) to initialize the SD card.

+

+Bugs and Comments

+

If you wish to report bugs or have comments, send email to fat16.nosp@m.lib@.nosp@m.sbcgl.nosp@m.obal.nosp@m..net.

+

+SdFat Usage

+

SdFat uses a slightly restricted form of short names. Short names are limited to 8 characters followed by an optional period (.) and extension of up to 3 characters. The characters may be any combination of letters and digits. The following special characters are also allowed:

+

$ % ' - _ @ ~ ` ! ( ) { } ^ # &

+

Short names are always converted to upper case and their original case value is lost.

+

An application which writes to a file using print(), println() or write() must call sync() at the appropriate time to force data and directory information to be written to the SD Card. Data and directory information are also written to the SD card when close() is called.

+

Applications must use care calling sync() since 2048 bytes of I/O is required to update file and directory information. This includes writing the current data block, reading the block that contains the directory entry for update, writing the directory block back and reading back the current data block.

+

It is possible to open a file with two or more instances of a file object. A file may be corrupted if data is written to the file by more than one instance of a file object.

+

+How to format SD Cards as FAT Volumes

+

The best way to restore an SD card's format on a PC or Mac is to use SDFormatter which can be downloaded from:

+

http://www.sdcard.org/downloads

+

A formatter sketch, SdFormatter.ino, is included in the SdFat/examples/SdFormatter directory. This sketch attempts to emulate SD Association's SDFormatter.

+

SDFormatter aligns flash erase boundaries with file system structures which reduces write latency and file system overhead.

+

The PC/Mac SDFormatter does not have an option for FAT type so it may format very small cards as FAT12. Use the SdFat formatter to force FAT16 formatting of small cards.

+

Do not format the SD card with an OS utility, OS utilities do not format SD cards in conformance with the SD standard.

+

You should use a freshly formatted SD card for best performance. FAT file systems become slower if many files have been created and deleted. This is because the directory entry for a deleted file is marked as deleted, but is not deleted. When a new file is created, these entries must be scanned before creating the file. Also files can become fragmented which causes reads and writes to be slower.

+

+Examples

+

A number of examples are provided in the SdFat/examples folder. See the html documentation for a list.

+

To access these examples from the Arduino development environment go to: File -> Examples -> SdFat -> <Sketch Name>

+

Compile, upload to your Arduino and click on Serial Monitor to run the example.

+

Here is a list:

+

AnalogBinLogger - Fast AVR ADC logger - see the AnalogBinLoggerExtras folder.

+

bench - A read/write benchmark.

+

cin_cout - Demo of ArduinoInStream and ArduinoOutStream.

+

dataLogger - A simple modifiable data logger.

+

directoryFunctions - Demo of chdir(), ls(), mkdir(), and rmdir().

+

fgets - Demo of the fgets read line/string function.

+

formating - Print a table with various formatting options.

+

getline - Example of getline from section 27.7.1.3 of the C++ standard.

+

LowLatencyLogger - A modifiable data logger for higher data rates.

+

OpenNext - Open all files in the root dir and print their filename.

+

PrintBenchmark - A simple benchmark for printing to a text file.

+

QuickStart - A sketch to quickly test your SD card and SD shield/module.

+

RawWrite - A test of raw write functions for contiguous files.

+

readCSV - Read a comma-separated value file using iostream extractors.

+

ReadWriteSdFat - SdFat version of Arduino SD ReadWrite example.

+

rename - A demo of SdFat::rename(old, new) and SdFile::rename(dirFile, newPath).

+

SdFormatter - This sketch will format an SD or SDHC card.

+

SdInfo - Initialize an SD card and analyze its structure for trouble shooting.

+

StdioBench - Demo and test of stdio style stream.

+

StreamParseInt - Simple demo of parseInt() Stream member function.

+

StressTest - Create and write files until the SD is full.

+

Timestamp - Sets file create, modify, and access timestamps.

+

TwoCards - Example using two SD cards.

+
+ + + + diff --git a/libs/SdFat-master/html/inherit_graph_0.png b/libs/SdFat-master/html/inherit_graph_0.png new file mode 100755 index 0000000..4b076b4 Binary files /dev/null and b/libs/SdFat-master/html/inherit_graph_0.png differ diff --git a/libs/SdFat-master/html/inherit_graph_1.png b/libs/SdFat-master/html/inherit_graph_1.png new file mode 100755 index 0000000..add8800 Binary files /dev/null and b/libs/SdFat-master/html/inherit_graph_1.png differ diff --git a/libs/SdFat-master/html/inherit_graph_10.png b/libs/SdFat-master/html/inherit_graph_10.png new file mode 100755 index 0000000..53441c3 Binary files /dev/null and b/libs/SdFat-master/html/inherit_graph_10.png differ diff --git a/libs/SdFat-master/html/inherit_graph_2.png b/libs/SdFat-master/html/inherit_graph_2.png new file mode 100755 index 0000000..085b72f Binary files /dev/null and b/libs/SdFat-master/html/inherit_graph_2.png differ diff --git a/libs/SdFat-master/html/inherit_graph_3.png b/libs/SdFat-master/html/inherit_graph_3.png new file mode 100755 index 0000000..b50aad9 Binary files /dev/null and b/libs/SdFat-master/html/inherit_graph_3.png differ diff --git a/libs/SdFat-master/html/inherit_graph_4.png b/libs/SdFat-master/html/inherit_graph_4.png new file mode 100755 index 0000000..248216e Binary files /dev/null and b/libs/SdFat-master/html/inherit_graph_4.png differ diff --git a/libs/SdFat-master/html/inherit_graph_5.png b/libs/SdFat-master/html/inherit_graph_5.png new file mode 100755 index 0000000..418bf6f Binary files /dev/null and b/libs/SdFat-master/html/inherit_graph_5.png differ diff --git a/libs/SdFat-master/html/inherit_graph_6.png b/libs/SdFat-master/html/inherit_graph_6.png new file mode 100755 index 0000000..3469a10 Binary files /dev/null and b/libs/SdFat-master/html/inherit_graph_6.png differ diff --git a/libs/SdFat-master/html/inherit_graph_7.png b/libs/SdFat-master/html/inherit_graph_7.png new file mode 100755 index 0000000..792debc Binary files /dev/null and b/libs/SdFat-master/html/inherit_graph_7.png differ diff --git a/libs/SdFat-master/html/inherit_graph_8.png b/libs/SdFat-master/html/inherit_graph_8.png new file mode 100755 index 0000000..b885d43 Binary files /dev/null and b/libs/SdFat-master/html/inherit_graph_8.png differ diff --git a/libs/SdFat-master/html/inherit_graph_9.png b/libs/SdFat-master/html/inherit_graph_9.png new file mode 100755 index 0000000..8a0ddeb Binary files /dev/null and b/libs/SdFat-master/html/inherit_graph_9.png differ diff --git a/libs/SdFat-master/html/inherits.html b/libs/SdFat-master/html/inherits.html new file mode 100755 index 0000000..ca43e74 --- /dev/null +++ b/libs/SdFat-master/html/inherits.html @@ -0,0 +1,105 @@ + + + + + + +SdFat: Class Hierarchy + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
Class Hierarchy
+
+
+ + + + + + + + + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+ + + + diff --git a/libs/SdFat-master/html/ios_8h.html b/libs/SdFat-master/html/ios_8h.html new file mode 100755 index 0000000..f5252b8 --- /dev/null +++ b/libs/SdFat-master/html/ios_8h.html @@ -0,0 +1,691 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/ios.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
ios.h File Reference
+
+
+ +

ios_base and ios classes +More...

+
#include <SdBaseFile.h>
+
+Include dependency graph for ios.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + + + + +

+Classes

class  ios
 Error and state information for all streams. More...
 
class  ios_base
 Base class for all streams. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

ios_baseboolalpha (ios_base &str)
 
ios_basedec (ios_base &str)
 
ios_basehex (ios_base &str)
 
ios_baseinternal (ios_base &str)
 
ios_baseleft (ios_base &str)
 
ios_basenoboolalpha (ios_base &str)
 
ios_basenoshowbase (ios_base &str)
 
ios_basenoshowpoint (ios_base &str)
 
ios_basenoshowpos (ios_base &str)
 
ios_basenoskipws (ios_base &str)
 
ios_basenouppercase (ios_base &str)
 
ios_baseoct (ios_base &str)
 
ios_baseright (ios_base &str)
 
ios_baseshowbase (ios_base &str)
 
ios_baseshowpoint (ios_base &str)
 
ios_baseshowpos (ios_base &str)
 
ios_baseskipws (ios_base &str)
 
ios_baseuppercase (ios_base &str)
 
+

Detailed Description

+

ios_base and ios classes

+

Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& boolalpha (ios_basestr)
+
+inline
+
+

function for boolalpha manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& dec (ios_basestr)
+
+inline
+
+

function for dec manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& hex (ios_basestr)
+
+inline
+
+

function for hex manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& internal (ios_basestr)
+
+inline
+
+

function for internal manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& left (ios_basestr)
+
+inline
+
+

function for left manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& noboolalpha (ios_basestr)
+
+inline
+
+

function for noboolalpha manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& noshowbase (ios_basestr)
+
+inline
+
+

function for noshowbase manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& noshowpoint (ios_basestr)
+
+inline
+
+

function for noshowpoint manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& noshowpos (ios_basestr)
+
+inline
+
+

function for noshowpos manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& noskipws (ios_basestr)
+
+inline
+
+

function for noskipws manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& nouppercase (ios_basestr)
+
+inline
+
+

function for nouppercase manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& oct (ios_basestr)
+
+inline
+
+

function for oct manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& right (ios_basestr)
+
+inline
+
+

function for right manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& showbase (ios_basestr)
+
+inline
+
+

function for showbase manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& showpoint (ios_basestr)
+
+inline
+
+

function for showpoint manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& showpos (ios_basestr)
+
+inline
+
+

function for showpos manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& skipws (ios_basestr)
+
+inline
+
+

function for skipws manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ios_base& uppercase (ios_basestr)
+
+inline
+
+

function for uppercase manipulator

Parameters
+ + +
[in]strThe stream
+
+
+
Returns
The stream
+ +
+
+
+ + + + diff --git a/libs/SdFat-master/html/ios_8h__dep__incl.png b/libs/SdFat-master/html/ios_8h__dep__incl.png new file mode 100755 index 0000000..459ddf1 Binary files /dev/null and b/libs/SdFat-master/html/ios_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/ios_8h__incl.png b/libs/SdFat-master/html/ios_8h__incl.png new file mode 100755 index 0000000..87546e2 Binary files /dev/null and b/libs/SdFat-master/html/ios_8h__incl.png differ diff --git a/libs/SdFat-master/html/iostream_8h.html b/libs/SdFat-master/html/iostream_8h.html new file mode 100755 index 0000000..78c6d02 --- /dev/null +++ b/libs/SdFat-master/html/iostream_8h.html @@ -0,0 +1,467 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/iostream.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
iostream.h File Reference
+
+
+ +

iostream class +More...

+
#include <istream.h>
+#include <ostream.h>
+
+Include dependency graph for iostream.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + + + + + + + + + + +

+Classes

class  iostream
 Input/Output stream. More...
 
struct  setfill
 type for setfill manipulator More...
 
struct  setprecision
 type for setprecision manipulator More...
 
struct  setw
 type for setw manipulator More...
 
+ + + + + + + + + + + + + + + + + + + +

+Functions

ostreamendl (ostream &os)
 
ostreamflush (ostream &os)
 
ostreamoperator<< (ostream &os, const setfill &arg)
 
ostreamoperator<< (ostream &os, const setprecision &arg)
 
ostreamoperator<< (ostream &os, const setw &arg)
 
istreamoperator>> (istream &obj, const setfill &arg)
 
istreamoperator>> (istream &is, const setprecision &arg)
 
istreamoperator>> (istream &is, const setw &arg)
 
istreamws (istream &is)
 
+

Detailed Description

+

iostream class

+

Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
ostream& endl (ostreamos)
+
+inline
+
+

insert endline

Parameters
+ + +
[in]osThe Stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
ostream& flush (ostreamos)
+
+inline
+
+

flush manipulator

Parameters
+ + +
[in]osThe stream
+
+
+
Returns
The stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ostream& operator<< (ostreamos,
const setfillarg 
)
+
+inline
+
+

setfill manipulator

Parameters
+ + + +
[in]osthe stream
[in]argset setfill object
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ostream& operator<< (ostreamos,
const setprecisionarg 
)
+
+inline
+
+

setprecision manipulator

Parameters
+ + + +
[in]osthe stream
[in]argset setprecision object
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ostream& operator<< (ostreamos,
const setwarg 
)
+
+inline
+
+

setw manipulator

Parameters
+ + + +
[in]osthe stream
[in]argset setw object
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream& operator>> (istreamobj,
const setfillarg 
)
+
+inline
+
+

setfill manipulator

Parameters
+ + + +
[in]objthe stream
[in]argset setfill object
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream& operator>> (istreamis,
const setprecisionarg 
)
+
+inline
+
+

setprecision manipulator

Parameters
+ + + +
[in]isthe stream
[in]argset setprecision object
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
istream& operator>> (istreamis,
const setwarg 
)
+
+inline
+
+

setw manipulator

Parameters
+ + + +
[in]isthe stream
[in]argset setw object
+
+
+
Returns
the stream
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
istream& ws (istreamis)
+
+inline
+
+

Skip white space

Parameters
+ + +
[in]isthe Stream
+
+
+
Returns
The stream
+ +
+
+
+ + + + diff --git a/libs/SdFat-master/html/iostream_8h__dep__incl.png b/libs/SdFat-master/html/iostream_8h__dep__incl.png new file mode 100755 index 0000000..78779c6 Binary files /dev/null and b/libs/SdFat-master/html/iostream_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/iostream_8h__incl.png b/libs/SdFat-master/html/iostream_8h__incl.png new file mode 100755 index 0000000..f93fd36 Binary files /dev/null and b/libs/SdFat-master/html/iostream_8h__incl.png differ diff --git a/libs/SdFat-master/html/istream_8h.html b/libs/SdFat-master/html/istream_8h.html new file mode 100755 index 0000000..621370e --- /dev/null +++ b/libs/SdFat-master/html/istream_8h.html @@ -0,0 +1,89 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/istream.h File Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + + +
+
+ +
+
istream.h File Reference
+
+
+ +

istream class +More...

+
#include <ios.h>
+
+Include dependency graph for istream.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + +

+Classes

class  istream
 Input Stream. More...
 
+

Detailed Description

+

istream class

+
+ + + + diff --git a/libs/SdFat-master/html/istream_8h__dep__incl.png b/libs/SdFat-master/html/istream_8h__dep__incl.png new file mode 100755 index 0000000..b6ba9d2 Binary files /dev/null and b/libs/SdFat-master/html/istream_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/istream_8h__incl.png b/libs/SdFat-master/html/istream_8h__incl.png new file mode 100755 index 0000000..1e98bc6 Binary files /dev/null and b/libs/SdFat-master/html/istream_8h__incl.png differ diff --git a/libs/SdFat-master/html/jquery.js b/libs/SdFat-master/html/jquery.js new file mode 100755 index 0000000..c197801 --- /dev/null +++ b/libs/SdFat-master/html/jquery.js @@ -0,0 +1,31 @@ +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; +if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1 +},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av); +ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length; +if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b +})}})(window); diff --git a/libs/SdFat-master/html/nav_f.png b/libs/SdFat-master/html/nav_f.png new file mode 100755 index 0000000..72a58a5 Binary files /dev/null and b/libs/SdFat-master/html/nav_f.png differ diff --git a/libs/SdFat-master/html/nav_g.png b/libs/SdFat-master/html/nav_g.png new file mode 100755 index 0000000..2093a23 Binary files /dev/null and b/libs/SdFat-master/html/nav_g.png differ diff --git a/libs/SdFat-master/html/nav_h.png b/libs/SdFat-master/html/nav_h.png new file mode 100755 index 0000000..33389b1 Binary files /dev/null and b/libs/SdFat-master/html/nav_h.png differ diff --git a/libs/SdFat-master/html/open.png b/libs/SdFat-master/html/open.png new file mode 100755 index 0000000..30f75c7 Binary files /dev/null and b/libs/SdFat-master/html/open.png differ diff --git a/libs/SdFat-master/html/ostream_8h.html b/libs/SdFat-master/html/ostream_8h.html new file mode 100755 index 0000000..bd271c3 --- /dev/null +++ b/libs/SdFat-master/html/ostream_8h.html @@ -0,0 +1,116 @@ + + + + + + +SdFat: Arduino/libraries/SdFat/ostream.h File Reference + + + + + + +
+
+
+ + + + + +
+
SdFat +
+
+ + + + + + + +
+ +
+
ostream.h File Reference
+
+
+ +

ostream class +More...

+
#include <ios.h>
+
+Include dependency graph for ostream.h:
+
+
+ + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + +
+
+ + + + + + + +

+Classes

class  ostream
 Output Stream. More...
 
struct  pgm
 type for string in flash More...
 
+ + + +

+Macros

#define pstr(str)   pgm(PSTR(str))
 
+

Detailed Description

+

ostream class

+

Macro Definition Documentation

+ +
+
+ + + + + + + + +
#define pstr( str)   pgm(PSTR(str))
+
+

macro for flash inserter

+ +
+
+
+ + + + diff --git a/libs/SdFat-master/html/ostream_8h__dep__incl.png b/libs/SdFat-master/html/ostream_8h__dep__incl.png new file mode 100755 index 0000000..d3f1942 Binary files /dev/null and b/libs/SdFat-master/html/ostream_8h__dep__incl.png differ diff --git a/libs/SdFat-master/html/ostream_8h__incl.png b/libs/SdFat-master/html/ostream_8h__incl.png new file mode 100755 index 0000000..cbbd840 Binary files /dev/null and b/libs/SdFat-master/html/ostream_8h__incl.png differ diff --git a/libs/SdFat-master/html/struct_fat_pos__t-members.html b/libs/SdFat-master/html/struct_fat_pos__t-members.html new file mode 100755 index 0000000..5c2961a --- /dev/null +++ b/libs/SdFat-master/html/struct_fat_pos__t-members.html @@ -0,0 +1,63 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
FatPos_t Member List
+
+
+ +

This is the complete list of members for FatPos_t, including all inherited members.

+ + + + +
clusterFatPos_t
FatPos_t() (defined in FatPos_t)FatPos_tinline
positionFatPos_t
+ + + + diff --git a/libs/SdFat-master/html/struct_fat_pos__t.html b/libs/SdFat-master/html/struct_fat_pos__t.html new file mode 100755 index 0000000..5d5477b --- /dev/null +++ b/libs/SdFat-master/html/struct_fat_pos__t.html @@ -0,0 +1,105 @@ + + + + + + +SdFat: FatPos_t Struct Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+ +
+
FatPos_t Struct Reference
+
+
+ +

internal type for istream do not use in user apps + More...

+ +

#include <SdBaseFile.h>

+ + + + + + +

+Public Attributes

uint32_t cluster
 
uint32_t position
 
+

Detailed Description

+

internal type for istream do not use in user apps

+

Member Data Documentation

+ +
+
+ + + + +
uint32_t FatPos_t::cluster
+
+

cluster for position

+ +
+
+ +
+
+ + + + +
uint32_t FatPos_t::position
+
+

stream position

+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/structpgm-members.html b/libs/SdFat-master/html/structpgm-members.html new file mode 100755 index 0000000..8fac6e1 --- /dev/null +++ b/libs/SdFat-master/html/structpgm-members.html @@ -0,0 +1,63 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
pgm Member List
+
+
+ +

This is the complete list of members for pgm, including all inherited members.

+ + + + +
pgm(char *str)pgminlineexplicit
pgm(const char *str)pgminlineexplicit
ptrpgm
+ + + + diff --git a/libs/SdFat-master/html/structpgm.html b/libs/SdFat-master/html/structpgm.html new file mode 100755 index 0000000..8241d39 --- /dev/null +++ b/libs/SdFat-master/html/structpgm.html @@ -0,0 +1,159 @@ + + + + + + +SdFat: pgm Struct Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

type for string in flash + More...

+ +

#include <ostream.h>

+ + + + + + +

+Public Member Functions

 pgm (char *str)
 
 pgm (const char *str)
 
+ + + +

+Public Attributes

char * ptr
 
+

Detailed Description

+

type for string in flash

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
pgm::pgm (char * str)
+
+inlineexplicit
+
+

constructor

Parameters
+ + +
[in]strinitializer for pointer.
+
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
pgm::pgm (const char * str)
+
+inlineexplicit
+
+

constructor

Parameters
+ + +
[in]strinitializer for pointer.
+
+
+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
char* pgm::ptr
+
+

Pointer to flash string

+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/structsetfill-members.html b/libs/SdFat-master/html/structsetfill-members.html new file mode 100755 index 0000000..6183af1 --- /dev/null +++ b/libs/SdFat-master/html/structsetfill-members.html @@ -0,0 +1,62 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
setfill Member List
+
+
+ +

This is the complete list of members for setfill, including all inherited members.

+ + + +
csetfill
setfill(char arg)setfillinlineexplicit
+ + + + diff --git a/libs/SdFat-master/html/structsetfill.html b/libs/SdFat-master/html/structsetfill.html new file mode 100755 index 0000000..82fef38 --- /dev/null +++ b/libs/SdFat-master/html/structsetfill.html @@ -0,0 +1,128 @@ + + + + + + +SdFat: setfill Struct Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+ +
+
setfill Struct Reference
+
+
+ +

type for setfill manipulator + More...

+ +

#include <iostream.h>

+ + + + +

+Public Member Functions

 setfill (char arg)
 
+ + + +

+Public Attributes

char c
 
+

Detailed Description

+

type for setfill manipulator

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
setfill::setfill (char arg)
+
+inlineexplicit
+
+

constructor

+
Parameters
+ + +
[in]argnew fill character
+
+
+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
char setfill::c
+
+

fill character

+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/structsetprecision-members.html b/libs/SdFat-master/html/structsetprecision-members.html new file mode 100755 index 0000000..d0e3ff7 --- /dev/null +++ b/libs/SdFat-master/html/structsetprecision-members.html @@ -0,0 +1,62 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
setprecision Member List
+
+
+ +

This is the complete list of members for setprecision, including all inherited members.

+ + + +
psetprecision
setprecision(unsigned int arg)setprecisioninlineexplicit
+ + + + diff --git a/libs/SdFat-master/html/structsetprecision.html b/libs/SdFat-master/html/structsetprecision.html new file mode 100755 index 0000000..58d902a --- /dev/null +++ b/libs/SdFat-master/html/structsetprecision.html @@ -0,0 +1,127 @@ + + + + + + +SdFat: setprecision Struct Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+ +
+
setprecision Struct Reference
+
+
+ +

type for setprecision manipulator + More...

+ +

#include <iostream.h>

+ + + + +

+Public Member Functions

 setprecision (unsigned int arg)
 
+ + + +

+Public Attributes

unsigned int p
 
+

Detailed Description

+

type for setprecision manipulator

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
setprecision::setprecision (unsigned int arg)
+
+inlineexplicit
+
+

constructor

Parameters
+ + +
[in]argnew precision
+
+
+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
unsigned int setprecision::p
+
+

precision

+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/structsetw-members.html b/libs/SdFat-master/html/structsetw-members.html new file mode 100755 index 0000000..54f8ead --- /dev/null +++ b/libs/SdFat-master/html/structsetw-members.html @@ -0,0 +1,62 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
setw Member List
+
+
+ +

This is the complete list of members for setw, including all inherited members.

+ + + +
setw(unsigned arg)setwinlineexplicit
wsetw
+ + + + diff --git a/libs/SdFat-master/html/structsetw.html b/libs/SdFat-master/html/structsetw.html new file mode 100755 index 0000000..c1c4b68 --- /dev/null +++ b/libs/SdFat-master/html/structsetw.html @@ -0,0 +1,127 @@ + + + + + + +SdFat: setw Struct Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+ +
+ +

type for setw manipulator + More...

+ +

#include <iostream.h>

+ + + + +

+Public Member Functions

 setw (unsigned arg)
 
+ + + +

+Public Attributes

unsigned w
 
+

Detailed Description

+

type for setw manipulator

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
setw::setw (unsigned arg)
+
+inlineexplicit
+
+

constructor

Parameters
+ + +
[in]argnew width
+
+
+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
unsigned setw::w
+
+

width

+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/html/sync_off.png b/libs/SdFat-master/html/sync_off.png new file mode 100755 index 0000000..3b443fc Binary files /dev/null and b/libs/SdFat-master/html/sync_off.png differ diff --git a/libs/SdFat-master/html/sync_on.png b/libs/SdFat-master/html/sync_on.png new file mode 100755 index 0000000..e08320f Binary files /dev/null and b/libs/SdFat-master/html/sync_on.png differ diff --git a/libs/SdFat-master/html/tab_a.png b/libs/SdFat-master/html/tab_a.png new file mode 100755 index 0000000..3b725c4 Binary files /dev/null and b/libs/SdFat-master/html/tab_a.png differ diff --git a/libs/SdFat-master/html/tab_b.png b/libs/SdFat-master/html/tab_b.png new file mode 100755 index 0000000..e2b4a86 Binary files /dev/null and b/libs/SdFat-master/html/tab_b.png differ diff --git a/libs/SdFat-master/html/tab_h.png b/libs/SdFat-master/html/tab_h.png new file mode 100755 index 0000000..fd5cb70 Binary files /dev/null and b/libs/SdFat-master/html/tab_h.png differ diff --git a/libs/SdFat-master/html/tab_s.png b/libs/SdFat-master/html/tab_s.png new file mode 100755 index 0000000..ab478c9 Binary files /dev/null and b/libs/SdFat-master/html/tab_s.png differ diff --git a/libs/SerialPortBeta20120106/html/tabs.css b/libs/SdFat-master/html/tabs.css similarity index 94% rename from libs/SerialPortBeta20120106/html/tabs.css rename to libs/SdFat-master/html/tabs.css index 2192056..9cf578f 100755 --- a/libs/SerialPortBeta20120106/html/tabs.css +++ b/libs/SdFat-master/html/tabs.css @@ -3,6 +3,7 @@ width: 100%; z-index: 101; font-size: 13px; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } .tabs2 { diff --git a/libs/SdFat-master/html/unioncache__t-members.html b/libs/SdFat-master/html/unioncache__t-members.html new file mode 100755 index 0000000..366d7c9 --- /dev/null +++ b/libs/SdFat-master/html/unioncache__t-members.html @@ -0,0 +1,68 @@ + + + + + + +SdFat: Member List + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+
+
cache_t Member List
+
+
+ +

This is the complete list of members for cache_t, including all inherited members.

+ + + + + + + + + +
datacache_t
dircache_t
fat16cache_t
fat32cache_t
fbscache_t
fbs32cache_t
fsinfocache_t
mbrcache_t
+ + + + diff --git a/libs/SdFat-master/html/unioncache__t.html b/libs/SdFat-master/html/unioncache__t.html new file mode 100755 index 0000000..2279668 --- /dev/null +++ b/libs/SdFat-master/html/unioncache__t.html @@ -0,0 +1,195 @@ + + + + + + +SdFat: cache_t Union Reference + + + + + + +
+
+ + + + + + +
+
SdFat +
+
+
+ + + + +
+
+ +
+
cache_t Union Reference
+
+
+ +

Cache for an SD data block. + More...

+ +

#include <SdVolume.h>

+ + + + + + + + + + + + + + + + + + +

+Public Attributes

uint8_t data [512]
 
dir_t dir [16]
 
uint16_t fat16 [256]
 
uint32_t fat32 [128]
 
fat_boot_t fbs
 
fat32_boot_t fbs32
 
fat32_fsinfo_t fsinfo
 
mbr_t mbr
 
+

Detailed Description

+

Cache for an SD data block.

+

Member Data Documentation

+ +
+
+ + + + +
uint8_t cache_t::data[512]
+
+

Used to access cached file data blocks.

+ +
+
+ +
+
+ + + + +
dir_t cache_t::dir[16]
+
+

Used to access cached directory entries.

+ +
+
+ +
+
+ + + + +
uint16_t cache_t::fat16[256]
+
+

Used to access cached FAT16 entries.

+ +
+
+ +
+
+ + + + +
uint32_t cache_t::fat32[128]
+
+

Used to access cached FAT32 entries.

+ +
+
+ +
+
+ + + + +
fat_boot_t cache_t::fbs
+
+

Used to access to a cached FAT boot sector.

+ +
+
+ +
+
+ + + + +
fat32_boot_t cache_t::fbs32
+
+

Used to access to a cached FAT32 boot sector.

+ +
+
+ +
+
+ + + + +
fat32_fsinfo_t cache_t::fsinfo
+
+

Used to access to a cached FAT32 FSINFO sector.

+ +
+
+ +
+
+ + + + +
mbr_t cache_t::mbr
+
+

Used to access a cached Master Boot Record.

+ +
+
+
The documentation for this union was generated from the following file: +
+ + + + diff --git a/libs/SdFat-master/readme.txt b/libs/SdFat-master/readme.txt new file mode 100755 index 0000000..98620c6 --- /dev/null +++ b/libs/SdFat-master/readme.txt @@ -0,0 +1,168 @@ +The Arduino SdFat library provides read/write access to FAT16/FAT32 +file systems on SD/SDHC flash cards. + +SdFat requires Arduino 1.05 or greater. + +To use SdFat, unzip the download file and place the SdFat folder +into the libraries sub-folder in your main sketch folder. + +For more information see the Manual installation section of this guide: + +http://arduino.cc/en/Guide/Libraries + +A number of configuration options can be set by editing SdFatConfig.h +#define macros. See the html documentation for details + +If you wish to report bugs or have comments, send email to +fat16lib@sbcglobal.net + +Read changes.txt if you have used previous releases of this library. + +Read troubleshooting.txt for common hardware problems. + +Please read the html documentation for this library. Start with +html/index.html and read the Main Page. Next go to the Classes tab and +read the documentation for the classes SdFat, SdBaseFile, SdFile, File, +StdioStream, ifstream, ofstream, and others. + +Support has been added for Software SPI on AVR, Due, and Teensy 3.1 boards. + +SPI transactions are supported. See SoftwareSPI.txt and SPI_Transactions.txt +for more information. + + +A new class, "File", has been added to provide compatibility with the Arduino +SD.h library. To use SdFat with programs written for SD.h replace + +#include + +with these two lines: + +#include +SdFat SD; + + +The SdFile class implements binary files similar to Linux's system calls. + +The StdioStream class implements buffered I/O for similar to Linux stdio.h. +StdioStream is under development so expect changes and bugs. + +The classes ifstream, ofstream, istream, and ostream follow the +C++ iostream standard when possible. + +Many examples are included in the SdFat/examples folder. + +There are many tutorials and much documentation about using C++ iostreams +on the web. + +http://www.cplusplus.com/ is a good C++ site for learning iostreams. + +Arduinos access SD cards using the cards SPI protocol. PCs, Macs, and +most consumer devices use the 4-bit parallel SD protocol. A card that +functions well on A PC or Mac may not work well on the Arduino. + +Most cards have good SPI read performance but cards vary widely in SPI +write performance. Write performance is limited by how efficiently the +card manages internal erase/remapping operations. The Arduino cannot +optimize writes to reduce erase operations because of its limited RAM. + +SanDisk cards generally have good write performance. They seem to have +more internal RAM buffering than other cards and therefore can limit +the number of flash erase operations that the Arduino forces due to its +limited RAM. + +The hardware interface to the SD card should not use a resistor based +level shifter. SdFat sets the SPI bus frequency to 8 MHz which results +in signal rise times that are too slow for the edge detectors in many +newer SD card controllers when resistor voltage dividers are used. + +The 5 to 3.3 V level shifter for 5 V Arduinos should be IC based like +the 74HC4050N based circuit shown in the file SdLevel.png. The +Adafruit Wave Shield uses a 74AHC125N. Gravitech sells SD and MicroSD +Card Adapters based on the 74LCX245. + +If you are using a resistor based level shifter and are having problems +try setting the SPI bus frequency to 4 MHz. This can be done by using +card.init(SPI_HALF_SPEED) to initialize the SD card. + +A feature to use software SPI is available. Software SPI is slower +than hardware SPI but allows any digital pins to be used. See +SdFatConfig.h for software SPI definitions. + +An many shields designed for an Uno can be use on an Arduino Mega +by defining MEGA_SOFT_SPI in SdFatConfig.h. + + +The best way to restore an SD card's format is to use SDFormatter +which can be downloaded from: + +http://www.sdcard.org/consumers/formatter/ + +SDFormatter aligns flash erase boundaries with file +system structures which reduces write latency and file system overhead. + +SDFormatter does not have an option for FAT type so it may format +small cards as FAT12. + +The example sketch SdFatFormatter.ino will format smaller cards FAT16 +so they can be used with SdFat. + +The SdFatTestSuite folder contains development tests. + +The SdFat/examples folder has the following sketches. Older examples +and test programs are in the examples/#attic folder. + +AnalogBinLogger - Fast AVR ADC logger - see the AnalogBinLoggerExtras folder. + +bench - A read/write benchmark. + +cin_cout - Demo of ArduinoInStream and ArduinoOutStream. + +dataLogger - A simple modifiable data logger. + +directoryFunctions - Demo of chdir(), ls(), mkdir(), and rmdir(). + +fgets - Demo of the fgets read line/string function. + +formating - Print a table with various formatting options. + +getline - Example of getline from section 27.7.1.3 of the C++ standard. + +LowLatencyLogger - A modifiable data logger for higher data rates. + +OpenNext - Open all files in the root dir and print their filename. + +PrintBenchmark - A simple benchmark for printing to a text file. + +QuickStart - A sketch to quickly test your SD card and SD shield/module. + +RawWrite - A test of raw write functions for contiguous files. + +readCSV - Read a comma-separated value file using iostream extractors. + +ReadWriteSdFat - SdFat version of Arduino SD ReadWrite example. + +rename - A demo of SdFat::rename(old, new) and SdFile::rename(dirFile, newPath). + +SdFormatter - This sketch will format an SD or SDHC card. + +SdInfo - Initialize an SD card and analyze its structure for trouble shooting. + +StdioBench - Demo and test of stdio style stream. + +StreamParseInt - Simple demo of parseInt() Stream member function. + +StressTest - Create and write files until the SD is full. + +Timestamp - Sets file create, modify, and access timestamps. + +TwoCards - Example using two SD cards. + +To access these examples from the Arduino development environment +go to: File -> Examples -> SdFat -> + +Compile, upload to your Arduino and click on Serial Monitor to run +the example. + + +Updated 25 Oct 2014 diff --git a/libs/SdFatBeta20120108/troubleshooting.txt b/libs/SdFat-master/troubleshooting.txt similarity index 59% rename from libs/SdFatBeta20120108/troubleshooting.txt rename to libs/SdFat-master/troubleshooting.txt index 59e876f..a0bb1aa 100755 --- a/libs/SdFatBeta20120108/troubleshooting.txt +++ b/libs/SdFat-master/troubleshooting.txt @@ -1,11 +1,14 @@ -The best source of recent information is the AdaFruit forum +The best source of recent information is the Arduino forum -http://forums.adafruit.com/ +http://arduino.cc/forum/ + +Also search the Adafruit forum -Also search the Arduino forum +http://forums.adafruit.com/ -http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl +If you are using a Teensy try +http://forum.pjrc.com/forum.php Try running the SdInfo sketch in the SdFat/examples folder to get more information. @@ -29,17 +32,3 @@ Other cards fail with an errorCode() > 1. These cards see SD commands at low SPI clock rate but fail at higher SPI clock rate. It may be possible to use these cards by replacing card.init() with card.init(SPI_HALF_SPEED). This will slow the the SPI clock by 50%. - --------------------------------------------------------------------------------- -Redefining SS_PIN to be a pin other than the Arduino/AVR hardware SS pin. - -Arduino/AVR SPI will only function correctly in master mode if the hardware SS -pin is in output mode. Sd2Card::init() will enable output mode for the hardware -SS pin even if it is not SD chip select. - -If you have multiple SPI devices you must insure devices other than the SD card -have their chip select pin high when Sd2Card::init() is called. - -If you want to understand in more detail how AVR SPI works read this - -http://www.atmel.com/dyn/resources/prod_documents/doc2585.pdf. See section 2.3. diff --git a/libs/SdFatBeta20120108/MegaSoftSpi.txt b/libs/SdFatBeta20120108/MegaSoftSpi.txt deleted file mode 100755 index f086eca..0000000 --- a/libs/SdFatBeta20120108/MegaSoftSpi.txt +++ /dev/null @@ -1,14 +0,0 @@ -Features have been added to support an unmodified Adafruit GPS Shield -or Datalogging Shield on an Arduino Mega. - -Define MEGA_SOFT_SPI to be non-zero in SdFatConfig.h to use software SPI -on Mega Arduinos. Pins used are SS 10, MOSI 11, MISO 12, and SCK 13. - -Defining MEGA_SOFT_SPI allows an unmodified Adafruit GPS Shield to be -used on Mega Arduinos. Software SPI works well with GPS Shield V1.1 -but many SD cards will fail with GPS Shield V1.0. - -Software SPI should work with all Datalogging Shields. - -The examples SdFatGPS_CSVSensorLogger.pde and SdFatGPSLogger_v3.pde -should work on on the Mega when MEGA_SOFT_SPI is defined. \ No newline at end of file diff --git a/libs/SdFatBeta20120108/SdFat/Sd2PinMap.h b/libs/SdFatBeta20120108/SdFat/Sd2PinMap.h deleted file mode 100755 index d265839..0000000 --- a/libs/SdFatBeta20120108/SdFat/Sd2PinMap.h +++ /dev/null @@ -1,360 +0,0 @@ -/* Arduino SdFat Library - * Copyright (C) 2010 by William Greiman - * - * This file is part of the Arduino SdFat Library - * - * This Library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with the Arduino SdFat Library. If not, see - * . - */ -// Warning this file was generated by a program. -#ifndef Sd2PinMap_h -#define Sd2PinMap_h -#include -//------------------------------------------------------------------------------ -/** struct for mapping digital pins */ -struct pin_map_t { - volatile uint8_t* ddr; - volatile uint8_t* pin; - volatile uint8_t* port; - uint8_t bit; -}; -//------------------------------------------------------------------------------ -#if defined(__AVR_ATmega1280__)\ -|| defined(__AVR_ATmega2560__) -// Mega - -// Two Wire (aka I2C) ports -uint8_t const SDA_PIN = 20; // D1 -uint8_t const SCL_PIN = 21; // D0 - -// SPI port -uint8_t const SS_PIN = 53; // B0 -uint8_t const MOSI_PIN = 51; // B2 -uint8_t const MISO_PIN = 50; // B3 -uint8_t const SCK_PIN = 52; // B1 - -static const pin_map_t digitalPinMap[] = { - {&DDRE, &PINE, &PORTE, 0}, // E0 0 - {&DDRE, &PINE, &PORTE, 1}, // E1 1 - {&DDRE, &PINE, &PORTE, 4}, // E4 2 - {&DDRE, &PINE, &PORTE, 5}, // E5 3 - {&DDRG, &PING, &PORTG, 5}, // G5 4 - {&DDRE, &PINE, &PORTE, 3}, // E3 5 - {&DDRH, &PINH, &PORTH, 3}, // H3 6 - {&DDRH, &PINH, &PORTH, 4}, // H4 7 - {&DDRH, &PINH, &PORTH, 5}, // H5 8 - {&DDRH, &PINH, &PORTH, 6}, // H6 9 - {&DDRB, &PINB, &PORTB, 4}, // B4 10 - {&DDRB, &PINB, &PORTB, 5}, // B5 11 - {&DDRB, &PINB, &PORTB, 6}, // B6 12 - {&DDRB, &PINB, &PORTB, 7}, // B7 13 - {&DDRJ, &PINJ, &PORTJ, 1}, // J1 14 - {&DDRJ, &PINJ, &PORTJ, 0}, // J0 15 - {&DDRH, &PINH, &PORTH, 1}, // H1 16 - {&DDRH, &PINH, &PORTH, 0}, // H0 17 - {&DDRD, &PIND, &PORTD, 3}, // D3 18 - {&DDRD, &PIND, &PORTD, 2}, // D2 19 - {&DDRD, &PIND, &PORTD, 1}, // D1 20 - {&DDRD, &PIND, &PORTD, 0}, // D0 21 - {&DDRA, &PINA, &PORTA, 0}, // A0 22 - {&DDRA, &PINA, &PORTA, 1}, // A1 23 - {&DDRA, &PINA, &PORTA, 2}, // A2 24 - {&DDRA, &PINA, &PORTA, 3}, // A3 25 - {&DDRA, &PINA, &PORTA, 4}, // A4 26 - {&DDRA, &PINA, &PORTA, 5}, // A5 27 - {&DDRA, &PINA, &PORTA, 6}, // A6 28 - {&DDRA, &PINA, &PORTA, 7}, // A7 29 - {&DDRC, &PINC, &PORTC, 7}, // C7 30 - {&DDRC, &PINC, &PORTC, 6}, // C6 31 - {&DDRC, &PINC, &PORTC, 5}, // C5 32 - {&DDRC, &PINC, &PORTC, 4}, // C4 33 - {&DDRC, &PINC, &PORTC, 3}, // C3 34 - {&DDRC, &PINC, &PORTC, 2}, // C2 35 - {&DDRC, &PINC, &PORTC, 1}, // C1 36 - {&DDRC, &PINC, &PORTC, 0}, // C0 37 - {&DDRD, &PIND, &PORTD, 7}, // D7 38 - {&DDRG, &PING, &PORTG, 2}, // G2 39 - {&DDRG, &PING, &PORTG, 1}, // G1 40 - {&DDRG, &PING, &PORTG, 0}, // G0 41 - {&DDRL, &PINL, &PORTL, 7}, // L7 42 - {&DDRL, &PINL, &PORTL, 6}, // L6 43 - {&DDRL, &PINL, &PORTL, 5}, // L5 44 - {&DDRL, &PINL, &PORTL, 4}, // L4 45 - {&DDRL, &PINL, &PORTL, 3}, // L3 46 - {&DDRL, &PINL, &PORTL, 2}, // L2 47 - {&DDRL, &PINL, &PORTL, 1}, // L1 48 - {&DDRL, &PINL, &PORTL, 0}, // L0 49 - {&DDRB, &PINB, &PORTB, 3}, // B3 50 - {&DDRB, &PINB, &PORTB, 2}, // B2 51 - {&DDRB, &PINB, &PORTB, 1}, // B1 52 - {&DDRB, &PINB, &PORTB, 0}, // B0 53 - {&DDRF, &PINF, &PORTF, 0}, // F0 54 - {&DDRF, &PINF, &PORTF, 1}, // F1 55 - {&DDRF, &PINF, &PORTF, 2}, // F2 56 - {&DDRF, &PINF, &PORTF, 3}, // F3 57 - {&DDRF, &PINF, &PORTF, 4}, // F4 58 - {&DDRF, &PINF, &PORTF, 5}, // F5 59 - {&DDRF, &PINF, &PORTF, 6}, // F6 60 - {&DDRF, &PINF, &PORTF, 7}, // F7 61 - {&DDRK, &PINK, &PORTK, 0}, // K0 62 - {&DDRK, &PINK, &PORTK, 1}, // K1 63 - {&DDRK, &PINK, &PORTK, 2}, // K2 64 - {&DDRK, &PINK, &PORTK, 3}, // K3 65 - {&DDRK, &PINK, &PORTK, 4}, // K4 66 - {&DDRK, &PINK, &PORTK, 5}, // K5 67 - {&DDRK, &PINK, &PORTK, 6}, // K6 68 - {&DDRK, &PINK, &PORTK, 7} // K7 69 -}; -//------------------------------------------------------------------------------ -#elif defined(__AVR_ATmega644P__)\ -|| defined(__AVR_ATmega644__)\ -|| defined(__AVR_ATmega1284P__) -// Sanguino - -// Two Wire (aka I2C) ports -uint8_t const SDA_PIN = 17; // C1 -uint8_t const SCL_PIN = 18; // C2 - -// SPI port -uint8_t const SS_PIN = 4; // B4 -uint8_t const MOSI_PIN = 5; // B5 -uint8_t const MISO_PIN = 6; // B6 -uint8_t const SCK_PIN = 7; // B7 - -static const pin_map_t digitalPinMap[] = { - {&DDRB, &PINB, &PORTB, 0}, // B0 0 - {&DDRB, &PINB, &PORTB, 1}, // B1 1 - {&DDRB, &PINB, &PORTB, 2}, // B2 2 - {&DDRB, &PINB, &PORTB, 3}, // B3 3 - {&DDRB, &PINB, &PORTB, 4}, // B4 4 - {&DDRB, &PINB, &PORTB, 5}, // B5 5 - {&DDRB, &PINB, &PORTB, 6}, // B6 6 - {&DDRB, &PINB, &PORTB, 7}, // B7 7 - {&DDRD, &PIND, &PORTD, 0}, // D0 8 - {&DDRD, &PIND, &PORTD, 1}, // D1 9 - {&DDRD, &PIND, &PORTD, 2}, // D2 10 - {&DDRD, &PIND, &PORTD, 3}, // D3 11 - {&DDRD, &PIND, &PORTD, 4}, // D4 12 - {&DDRD, &PIND, &PORTD, 5}, // D5 13 - {&DDRD, &PIND, &PORTD, 6}, // D6 14 - {&DDRD, &PIND, &PORTD, 7}, // D7 15 - {&DDRC, &PINC, &PORTC, 0}, // C0 16 - {&DDRC, &PINC, &PORTC, 1}, // C1 17 - {&DDRC, &PINC, &PORTC, 2}, // C2 18 - {&DDRC, &PINC, &PORTC, 3}, // C3 19 - {&DDRC, &PINC, &PORTC, 4}, // C4 20 - {&DDRC, &PINC, &PORTC, 5}, // C5 21 - {&DDRC, &PINC, &PORTC, 6}, // C6 22 - {&DDRC, &PINC, &PORTC, 7}, // C7 23 - {&DDRA, &PINA, &PORTA, 7}, // A7 24 - {&DDRA, &PINA, &PORTA, 6}, // A6 25 - {&DDRA, &PINA, &PORTA, 5}, // A5 26 - {&DDRA, &PINA, &PORTA, 4}, // A4 27 - {&DDRA, &PINA, &PORTA, 3}, // A3 28 - {&DDRA, &PINA, &PORTA, 2}, // A2 29 - {&DDRA, &PINA, &PORTA, 1}, // A1 30 - {&DDRA, &PINA, &PORTA, 0} // A0 31 -}; -//------------------------------------------------------------------------------ -#elif defined(__AVR_ATmega32U4__) -// Teensy 2.0 - -// Two Wire (aka I2C) ports -uint8_t const SDA_PIN = 6; // D1 -uint8_t const SCL_PIN = 5; // D0 - -// SPI port -uint8_t const SS_PIN = 0; // B0 -uint8_t const MOSI_PIN = 2; // B2 -uint8_t const MISO_PIN = 3; // B3 -uint8_t const SCK_PIN = 1; // B1 - -static const pin_map_t digitalPinMap[] = { - {&DDRB, &PINB, &PORTB, 0}, // B0 0 - {&DDRB, &PINB, &PORTB, 1}, // B1 1 - {&DDRB, &PINB, &PORTB, 2}, // B2 2 - {&DDRB, &PINB, &PORTB, 3}, // B3 3 - {&DDRB, &PINB, &PORTB, 7}, // B7 4 - {&DDRD, &PIND, &PORTD, 0}, // D0 5 - {&DDRD, &PIND, &PORTD, 1}, // D1 6 - {&DDRD, &PIND, &PORTD, 2}, // D2 7 - {&DDRD, &PIND, &PORTD, 3}, // D3 8 - {&DDRC, &PINC, &PORTC, 6}, // C6 9 - {&DDRC, &PINC, &PORTC, 7}, // C7 10 - {&DDRD, &PIND, &PORTD, 6}, // D6 11 - {&DDRD, &PIND, &PORTD, 7}, // D7 12 - {&DDRB, &PINB, &PORTB, 4}, // B4 13 - {&DDRB, &PINB, &PORTB, 5}, // B5 14 - {&DDRB, &PINB, &PORTB, 6}, // B6 15 - {&DDRF, &PINF, &PORTF, 7}, // F7 16 - {&DDRF, &PINF, &PORTF, 6}, // F6 17 - {&DDRF, &PINF, &PORTF, 5}, // F5 18 - {&DDRF, &PINF, &PORTF, 4}, // F4 19 - {&DDRF, &PINF, &PORTF, 1}, // F1 20 - {&DDRF, &PINF, &PORTF, 0}, // F0 21 - {&DDRD, &PIND, &PORTD, 4}, // D4 22 - {&DDRD, &PIND, &PORTD, 5}, // D5 23 - {&DDRE, &PINE, &PORTE, 6} // E6 24 -}; -//------------------------------------------------------------------------------ -#elif defined(__AVR_AT90USB646__)\ -|| defined(__AVR_AT90USB1286__) -// Teensy++ 1.0 & 2.0 - -// Two Wire (aka I2C) ports -uint8_t const SDA_PIN = 1; // D1 -uint8_t const SCL_PIN = 0; // D0 - -// SPI port -uint8_t const SS_PIN = 20; // B0 -uint8_t const MOSI_PIN = 22; // B2 -uint8_t const MISO_PIN = 23; // B3 -uint8_t const SCK_PIN = 21; // B1 - -static const pin_map_t digitalPinMap[] = { - {&DDRD, &PIND, &PORTD, 0}, // D0 0 - {&DDRD, &PIND, &PORTD, 1}, // D1 1 - {&DDRD, &PIND, &PORTD, 2}, // D2 2 - {&DDRD, &PIND, &PORTD, 3}, // D3 3 - {&DDRD, &PIND, &PORTD, 4}, // D4 4 - {&DDRD, &PIND, &PORTD, 5}, // D5 5 - {&DDRD, &PIND, &PORTD, 6}, // D6 6 - {&DDRD, &PIND, &PORTD, 7}, // D7 7 - {&DDRE, &PINE, &PORTE, 0}, // E0 8 - {&DDRE, &PINE, &PORTE, 1}, // E1 9 - {&DDRC, &PINC, &PORTC, 0}, // C0 10 - {&DDRC, &PINC, &PORTC, 1}, // C1 11 - {&DDRC, &PINC, &PORTC, 2}, // C2 12 - {&DDRC, &PINC, &PORTC, 3}, // C3 13 - {&DDRC, &PINC, &PORTC, 4}, // C4 14 - {&DDRC, &PINC, &PORTC, 5}, // C5 15 - {&DDRC, &PINC, &PORTC, 6}, // C6 16 - {&DDRC, &PINC, &PORTC, 7}, // C7 17 - {&DDRE, &PINE, &PORTE, 6}, // E6 18 - {&DDRE, &PINE, &PORTE, 7}, // E7 19 - {&DDRB, &PINB, &PORTB, 0}, // B0 20 - {&DDRB, &PINB, &PORTB, 1}, // B1 21 - {&DDRB, &PINB, &PORTB, 2}, // B2 22 - {&DDRB, &PINB, &PORTB, 3}, // B3 23 - {&DDRB, &PINB, &PORTB, 4}, // B4 24 - {&DDRB, &PINB, &PORTB, 5}, // B5 25 - {&DDRB, &PINB, &PORTB, 6}, // B6 26 - {&DDRB, &PINB, &PORTB, 7}, // B7 27 - {&DDRA, &PINA, &PORTA, 0}, // A0 28 - {&DDRA, &PINA, &PORTA, 1}, // A1 29 - {&DDRA, &PINA, &PORTA, 2}, // A2 30 - {&DDRA, &PINA, &PORTA, 3}, // A3 31 - {&DDRA, &PINA, &PORTA, 4}, // A4 32 - {&DDRA, &PINA, &PORTA, 5}, // A5 33 - {&DDRA, &PINA, &PORTA, 6}, // A6 34 - {&DDRA, &PINA, &PORTA, 7}, // A7 35 - {&DDRE, &PINE, &PORTE, 4}, // E4 36 - {&DDRE, &PINE, &PORTE, 5}, // E5 37 - {&DDRF, &PINF, &PORTF, 0}, // F0 38 - {&DDRF, &PINF, &PORTF, 1}, // F1 39 - {&DDRF, &PINF, &PORTF, 2}, // F2 40 - {&DDRF, &PINF, &PORTF, 3}, // F3 41 - {&DDRF, &PINF, &PORTF, 4}, // F4 42 - {&DDRF, &PINF, &PORTF, 5}, // F5 43 - {&DDRF, &PINF, &PORTF, 6}, // F6 44 - {&DDRF, &PINF, &PORTF, 7} // F7 45 -}; -//------------------------------------------------------------------------------ -#elif defined(__AVR_ATmega168__)\ -||defined(__AVR_ATmega168P__)\ -||defined(__AVR_ATmega328P__) -// 168 and 328 Arduinos - -// Two Wire (aka I2C) ports -uint8_t const SDA_PIN = 18; // C4 -uint8_t const SCL_PIN = 19; // C5 - -// SPI port -uint8_t const SS_PIN = 10; // B2 -uint8_t const MOSI_PIN = 11; // B3 -uint8_t const MISO_PIN = 12; // B4 -uint8_t const SCK_PIN = 13; // B5 - -static const pin_map_t digitalPinMap[] = { - {&DDRD, &PIND, &PORTD, 0}, // D0 0 - {&DDRD, &PIND, &PORTD, 1}, // D1 1 - {&DDRD, &PIND, &PORTD, 2}, // D2 2 - {&DDRD, &PIND, &PORTD, 3}, // D3 3 - {&DDRD, &PIND, &PORTD, 4}, // D4 4 - {&DDRD, &PIND, &PORTD, 5}, // D5 5 - {&DDRD, &PIND, &PORTD, 6}, // D6 6 - {&DDRD, &PIND, &PORTD, 7}, // D7 7 - {&DDRB, &PINB, &PORTB, 0}, // B0 8 - {&DDRB, &PINB, &PORTB, 1}, // B1 9 - {&DDRB, &PINB, &PORTB, 2}, // B2 10 - {&DDRB, &PINB, &PORTB, 3}, // B3 11 - {&DDRB, &PINB, &PORTB, 4}, // B4 12 - {&DDRB, &PINB, &PORTB, 5}, // B5 13 - {&DDRC, &PINC, &PORTC, 0}, // C0 14 - {&DDRC, &PINC, &PORTC, 1}, // C1 15 - {&DDRC, &PINC, &PORTC, 2}, // C2 16 - {&DDRC, &PINC, &PORTC, 3}, // C3 17 - {&DDRC, &PINC, &PORTC, 4}, // C4 18 - {&DDRC, &PINC, &PORTC, 5} // C5 19 -}; -#else // defined(__AVR_ATmega1280__) -#error unknown chip -#endif // defined(__AVR_ATmega1280__) -//------------------------------------------------------------------------------ -static const uint8_t digitalPinCount = sizeof(digitalPinMap)/sizeof(pin_map_t); - -uint8_t badPinNumber(void) - __attribute__((error("Pin number is too large or not a constant"))); - -static inline __attribute__((always_inline)) - bool getPinMode(uint8_t pin) { - if (__builtin_constant_p(pin) && pin < digitalPinCount) { - return (*digitalPinMap[pin].ddr >> digitalPinMap[pin].bit) & 1; - } else { - return badPinNumber(); - } -} -static inline __attribute__((always_inline)) - void setPinMode(uint8_t pin, uint8_t mode) { - if (__builtin_constant_p(pin) && pin < digitalPinCount) { - if (mode) { - *digitalPinMap[pin].ddr |= 1 << digitalPinMap[pin].bit; - } else { - *digitalPinMap[pin].ddr &= ~(1 << digitalPinMap[pin].bit); - } - } else { - badPinNumber(); - } -} -static inline __attribute__((always_inline)) - bool fastDigitalRead(uint8_t pin) { - if (__builtin_constant_p(pin) && pin < digitalPinCount) { - return (*digitalPinMap[pin].pin >> digitalPinMap[pin].bit) & 1; - } else { - return badPinNumber(); - } -} -static inline __attribute__((always_inline)) - void fastDigitalWrite(uint8_t pin, uint8_t value) { - if (__builtin_constant_p(pin) && pin < digitalPinCount) { - if (value) { - *digitalPinMap[pin].port |= 1 << digitalPinMap[pin].bit; - } else { - *digitalPinMap[pin].port &= ~(1 << digitalPinMap[pin].bit); - } - } else { - badPinNumber(); - } -} -#endif // Sd2PinMap_h diff --git a/libs/SdFatBeta20120108/SdFat/SdBaseFile.h b/libs/SdFatBeta20120108/SdFat/SdBaseFile.h deleted file mode 100755 index 420c651..0000000 --- a/libs/SdFatBeta20120108/SdFat/SdBaseFile.h +++ /dev/null @@ -1,489 +0,0 @@ -/* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino SdFat Library - * - * This Library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with the Arduino SdFat Library. If not, see - * . - */ -#ifndef SdBaseFile_h -#define SdBaseFile_h -/** - * \file - * \brief SdBaseFile class - */ -#include -#if ARDUINO < 100 -#include -#else // ARDUINO -#include -#endif // ARDUINO -#include -#include -//------------------------------------------------------------------------------ -/** - * \struct fpos_t - * \brief internal type for istream - * do not use in user apps - */ -struct fpos_t { - /** stream position */ - uint32_t position; - /** cluster for position */ - uint32_t cluster; - fpos_t() : position(0), cluster(0) {} -}; - -// use the gnu style oflag in open() -/** open() oflag for reading */ -uint8_t const O_READ = 0X01; -/** open() oflag - same as O_IN */ -uint8_t const O_RDONLY = O_READ; -/** open() oflag for write */ -uint8_t const O_WRITE = 0X02; -/** open() oflag - same as O_WRITE */ -uint8_t const O_WRONLY = O_WRITE; -/** open() oflag for reading and writing */ -uint8_t const O_RDWR = (O_READ | O_WRITE); -/** open() oflag mask for access modes */ -uint8_t const O_ACCMODE = (O_READ | O_WRITE); -/** The file offset shall be set to the end of the file prior to each write. */ -uint8_t const O_APPEND = 0X04; -/** synchronous writes - call sync() after each write */ -uint8_t const O_SYNC = 0X08; -/** truncate the file to zero length */ -uint8_t const O_TRUNC = 0X10; -/** set the initial position at the end of the file */ -uint8_t const O_AT_END = 0X20; -/** create the file if nonexistent */ -uint8_t const O_CREAT = 0X40; -/** If O_CREAT and O_EXCL are set, open() shall fail if the file exists */ -uint8_t const O_EXCL = 0X80; - -// SdBaseFile class static and const definitions -// flags for ls() -/** ls() flag to print modify date */ -uint8_t const LS_DATE = 1; -/** ls() flag to print file size */ -uint8_t const LS_SIZE = 2; -/** ls() flag for recursive list of subdirectories */ -uint8_t const LS_R = 4; - - -// flags for timestamp -/** set the file's last access date */ -uint8_t const T_ACCESS = 1; -/** set the file's creation date and time */ -uint8_t const T_CREATE = 2; -/** Set the file's write date and time */ -uint8_t const T_WRITE = 4; -// values for type_ -/** This file has not been opened. */ -uint8_t const FAT_FILE_TYPE_CLOSED = 0; -/** A normal file */ -uint8_t const FAT_FILE_TYPE_NORMAL = 1; -/** A FAT12 or FAT16 root directory */ -uint8_t const FAT_FILE_TYPE_ROOT_FIXED = 2; -/** A FAT32 root directory */ -uint8_t const FAT_FILE_TYPE_ROOT32 = 3; -/** A subdirectory file*/ -uint8_t const FAT_FILE_TYPE_SUBDIR = 4; -/** Test value for directory type */ -uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED; - -/** date field for FAT directory entry - * \param[in] year [1980,2107] - * \param[in] month [1,12] - * \param[in] day [1,31] - * - * \return Packed date for dir_t entry. - */ -static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { - return (year - 1980) << 9 | month << 5 | day; -} -/** year part of FAT directory date field - * \param[in] fatDate Date in packed dir format. - * - * \return Extracted year [1980,2107] - */ -static inline uint16_t FAT_YEAR(uint16_t fatDate) { - return 1980 + (fatDate >> 9); -} -/** month part of FAT directory date field - * \param[in] fatDate Date in packed dir format. - * - * \return Extracted month [1,12] - */ -static inline uint8_t FAT_MONTH(uint16_t fatDate) { - return (fatDate >> 5) & 0XF; -} -/** day part of FAT directory date field - * \param[in] fatDate Date in packed dir format. - * - * \return Extracted day [1,31] - */ -static inline uint8_t FAT_DAY(uint16_t fatDate) { - return fatDate & 0X1F; -} -/** time field for FAT directory entry - * \param[in] hour [0,23] - * \param[in] minute [0,59] - * \param[in] second [0,59] - * - * \return Packed time for dir_t entry. - */ -static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) { - return hour << 11 | minute << 5 | second >> 1; -} -/** hour part of FAT directory time field - * \param[in] fatTime Time in packed dir format. - * - * \return Extracted hour [0,23] - */ -static inline uint8_t FAT_HOUR(uint16_t fatTime) { - return fatTime >> 11; -} -/** minute part of FAT directory time field - * \param[in] fatTime Time in packed dir format. - * - * \return Extracted minute [0,59] - */ -static inline uint8_t FAT_MINUTE(uint16_t fatTime) { - return(fatTime >> 5) & 0X3F; -} -/** second part of FAT directory time field - * Note second/2 is stored in packed time. - * - * \param[in] fatTime Time in packed dir format. - * - * \return Extracted second [0,58] - */ -static inline uint8_t FAT_SECOND(uint16_t fatTime) { - return 2*(fatTime & 0X1F); -} -/** Default date for file timestamps is 1 Jan 2000 */ -uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1; -/** Default time for file timestamp is 1 am */ -uint16_t const FAT_DEFAULT_TIME = (1 << 11); -//------------------------------------------------------------------------------ -/** - * \class SdBaseFile - * \brief Base class for SdFile with Print and C++ streams. - */ -class SdBaseFile { - public: - /** Create an instance. */ - SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {} - SdBaseFile(const char* path, uint8_t oflag); - ~SdBaseFile() {if(isOpen()) close();} - /** - * writeError is set to true if an error occurs during a write(). - * Set writeError to false before calling print() and/or write() and check - * for true after calls to print() and/or write(). - */ - bool writeError; - //---------------------------------------------------------------------------- - // helpers for stream classes - /** get position for streams - * \param[out] pos struct to receive position - */ - void getpos(fpos_t* pos); - /** set position for streams - * \param[out] pos struct with value for new position - */ - void setpos(fpos_t* pos); - //---------------------------------------------------------------------------- - bool close(); - bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock); - bool createContiguous(SdBaseFile* dirFile, - const char* path, uint32_t size); - /** \return The current cluster number for a file or directory. */ - uint32_t curCluster() const {return curCluster_;} - /** \return The current position for a file or directory. */ - uint32_t curPosition() const {return curPosition_;} - /** \return Current working directory */ - static SdBaseFile* cwd() {return cwd_;} - /** Set the date/time callback function - * - * \param[in] dateTime The user's call back function. The callback - * function is of the form: - * - * \code - * void dateTime(uint16_t* date, uint16_t* time) { - * uint16_t year; - * uint8_t month, day, hour, minute, second; - * - * // User gets date and time from GPS or real-time clock here - * - * // return date using FAT_DATE macro to format fields - * *date = FAT_DATE(year, month, day); - * - * // return time using FAT_TIME macro to format fields - * *time = FAT_TIME(hour, minute, second); - * } - * \endcode - * - * Sets the function that is called when a file is created or when - * a file's directory entry is modified by sync(). All timestamps, - * access, creation, and modify, are set when a file is created. - * sync() maintains the last access date and last modify date/time. - * - * See the timestamp() function. - */ - static void dateTimeCallback( - void (*dateTime)(uint16_t* date, uint16_t* time)) { - dateTime_ = dateTime; - } - /** Cancel the date/time callback function. */ - static void dateTimeCallbackCancel() {dateTime_ = 0;} - bool dirEntry(dir_t* dir); - static void dirName(const dir_t& dir, char* name); - bool exists(const char* name); - int16_t fgets(char* str, int16_t num, char* delim = 0); - /** \return The total number of bytes in a file or directory. */ - uint32_t fileSize() const {return fileSize_;} - /** \return The first cluster number for a file or directory. */ - uint32_t firstCluster() const {return firstCluster_;} - bool getFilename(char* name); - /** \return True if this is a directory else false. */ - bool isDir() const {return type_ >= FAT_FILE_TYPE_MIN_DIR;} - /** \return True if this is a normal file else false. */ - bool isFile() const {return type_ == FAT_FILE_TYPE_NORMAL;} - /** \return True if this is an open file/directory else false. */ - bool isOpen() const {return type_ != FAT_FILE_TYPE_CLOSED;} - /** \return True if this is a subdirectory else false. */ - bool isSubDir() const {return type_ == FAT_FILE_TYPE_SUBDIR;} - /** \return True if this is the root directory. */ - bool isRoot() const { - return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32; - } - void ls(Print* pr, uint8_t flags = 0, uint8_t indent = 0); - void ls(uint8_t flags = 0); - bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true); - // alias for backward compactability - bool makeDir(SdBaseFile* dir, const char* path) { - return mkdir(dir, path, false); - } - bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag); - bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag); - bool open(const char* path, uint8_t oflag = O_READ); - bool openNext(SdBaseFile* dirFile, uint8_t oflag); - bool openRoot(SdVolume* vol); - int peek(); - static void printFatDate(uint16_t fatDate); - static void printFatDate(Print* pr, uint16_t fatDate); - static void printFatTime(uint16_t fatTime); - static void printFatTime(Print* pr, uint16_t fatTime); - bool printName(); - int16_t read(); - int16_t read(void* buf, uint16_t nbyte); - int8_t readDir(dir_t* dir); - static bool remove(SdBaseFile* dirFile, const char* path); - bool remove(); - /** Set the file's current position to zero. */ - void rewind() {seekSet(0);} - bool rename(SdBaseFile* dirFile, const char* newPath); - bool rmdir(); - // for backward compatibility - bool rmDir() {return rmdir();} - bool rmRfStar(); - /** Set the files position to current position + \a pos. See seekSet(). - * \param[in] offset The new position in bytes from the current position. - * \return true for success or false for failure. - */ - bool seekCur(int32_t offset) { - return seekSet(curPosition_ + offset); - } - /** Set the files position to end-of-file + \a offset. See seekSet(). - * \param[in] offset The new position in bytes from end-of-file. - * \return true for success or false for failure. - */ - bool seekEnd(int32_t offset = 0) {return seekSet(fileSize_ + offset);} - bool seekSet(uint32_t pos); - bool sync(); - bool timestamp(SdBaseFile* file); - bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, - uint8_t hour, uint8_t minute, uint8_t second); - /** Type of file. You should use isFile() or isDir() instead of type() - * if possible. - * - * \return The file or directory type. - */ - uint8_t type() const {return type_;} - bool truncate(uint32_t size); - /** \return SdVolume that contains this file. */ - SdVolume* volume() const {return vol_;} - int16_t write(const void* buf, uint16_t nbyte); -//------------------------------------------------------------------------------ - private: - // allow SdFat to set cwd_ - friend class SdFat; - // global pointer to cwd dir - static SdBaseFile* cwd_; - // data time callback function - static void (*dateTime_)(uint16_t* date, uint16_t* time); - // bits defined in flags_ - // should be 0X0F - static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC); - // sync of directory entry required - static uint8_t const F_FILE_DIR_DIRTY = 0X80; - - // private data - uint8_t flags_; // See above for definition of flags_ bits - uint8_t fstate_; // error and eof indicator - uint8_t type_; // type of file see above for values - uint32_t curCluster_; // cluster for current file position - uint32_t curPosition_; // current file position in bytes from beginning - uint32_t dirBlock_; // block for this files directory entry - uint8_t dirIndex_; // index of directory entry in dirBlock - uint32_t fileSize_; // file size in bytes - uint32_t firstCluster_; // first cluster of file - SdVolume* vol_; // volume where file is located - - /** experimental don't use */ - bool openParent(SdBaseFile* dir); - // private functions - bool addCluster(); - bool addDirCluster(); - dir_t* cacheDirEntry(uint8_t action); - int8_t lsPrintNext(Print *pr, uint8_t flags, uint8_t indent); - static bool make83Name(const char* str, uint8_t* name, const char** ptr); - bool mkdir(SdBaseFile* parent, const uint8_t dname[11]); - bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag); - bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags); - dir_t* readDirCache(); -//------------------------------------------------------------------------------ -// to be deleted - static void printDirName(const dir_t& dir, - uint8_t width, bool printSlash); - static void printDirName(Print* pr, const dir_t& dir, - uint8_t width, bool printSlash); -//------------------------------------------------------------------------------ -// Deprecated functions - suppress cpplint warnings with NOLINT comment -#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN) - public: - /** \deprecated Use: - * bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock); - * \param[out] bgnBlock the first block address for the file. - * \param[out] endBlock the last block address for the file. - * \return true for success or false for failure. - */ - bool contiguousRange(uint32_t& bgnBlock, uint32_t& endBlock) { // NOLINT - return contiguousRange(&bgnBlock, &endBlock); - } - /** \deprecated Use: - * bool createContiguous(SdBaseFile* dirFile, - * const char* path, uint32_t size) - * \param[in] dirFile The directory where the file will be created. - * \param[in] path A path with a valid DOS 8.3 file name. - * \param[in] size The desired file size. - * \return true for success or false for failure. - */ - bool createContiguous(SdBaseFile& dirFile, // NOLINT - const char* path, uint32_t size) { - return createContiguous(&dirFile, path, size); - } - /** \deprecated Use: - * static void dateTimeCallback( - * void (*dateTime)(uint16_t* date, uint16_t* time)); - * \param[in] dateTime The user's call back function. - */ - static void dateTimeCallback( - void (*dateTime)(uint16_t& date, uint16_t& time)) { // NOLINT - oldDateTime_ = dateTime; - dateTime_ = dateTime ? oldToNew : 0; - } - /** \deprecated Use: bool dirEntry(dir_t* dir); - * \param[out] dir Location for return of the file's directory entry. - * \return true for success or false for failure. - */ - bool dirEntry(dir_t& dir) {return dirEntry(&dir);} // NOLINT - /** \deprecated Use: - * bool mkdir(SdBaseFile* dir, const char* path); - * \param[in] dir An open SdFat instance for the directory that will contain - * the new directory. - * \param[in] path A path with a valid 8.3 DOS name for the new directory. - * \return true for success or false for failure. - */ - bool mkdir(SdBaseFile& dir, const char* path) { // NOLINT - return mkdir(&dir, path); - } - /** \deprecated Use: - * bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag); - * \param[in] dirFile An open SdFat instance for the directory containing the - * file to be opened. - * \param[in] path A path with a valid 8.3 DOS name for the file. - * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive - * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC. - * \return true for success or false for failure. - */ - bool open(SdBaseFile& dirFile, // NOLINT - const char* path, uint8_t oflag) { - return open(&dirFile, path, oflag); - } - /** \deprecated Do not use in new apps - * \param[in] dirFile An open SdFat instance for the directory containing the - * file to be opened. - * \param[in] path A path with a valid 8.3 DOS name for a file to be opened. - * \return true for success or false for failure. - */ - bool open(SdBaseFile& dirFile, const char* path) { // NOLINT - return open(dirFile, path, O_RDWR); - } - /** \deprecated Use: - * bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag); - * \param[in] dirFile An open SdFat instance for the directory. - * \param[in] index The \a index of the directory entry for the file to be - * opened. The value for \a index is (directory file position)/32. - * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive - * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC. - * \return true for success or false for failure. - */ - bool open(SdBaseFile& dirFile, uint16_t index, uint8_t oflag) { // NOLINT - return open(&dirFile, index, oflag); - } - /** \deprecated Use: bool openRoot(SdVolume* vol); - * \param[in] vol The FAT volume containing the root directory to be opened. - * \return true for success or false for failure. - */ - bool openRoot(SdVolume& vol) {return openRoot(&vol);} // NOLINT - /** \deprecated Use: int8_t readDir(dir_t* dir); - * \param[out] dir The dir_t struct that will receive the data. - * \return bytes read for success zero for eof or -1 for failure. - */ - int8_t readDir(dir_t& dir) {return readDir(&dir);} // NOLINT - /** \deprecated Use: - * static uint8_t remove(SdBaseFile* dirFile, const char* path); - * \param[in] dirFile The directory that contains the file. - * \param[in] path The name of the file to be removed. - * \return true for success or false for failure. - */ - static bool remove(SdBaseFile& dirFile, const char* path) { // NOLINT - return remove(&dirFile, path); - } -//------------------------------------------------------------------------------ -// rest are private - private: - static void (*oldDateTime_)(uint16_t& date, uint16_t& time); // NOLINT - static void oldToNew(uint16_t* date, uint16_t* time) { - uint16_t d; - uint16_t t; - oldDateTime_(d, t); - *date = d; - *time = t; - } -#endif // ALLOW_DEPRECATED_FUNCTIONS -}; - -#endif // SdBaseFile_h diff --git a/libs/SdFatBeta20120108/SdFat/SdFatConfig.h b/libs/SdFatBeta20120108/SdFat/SdFatConfig.h deleted file mode 100755 index 343f2f0..0000000 --- a/libs/SdFatBeta20120108/SdFat/SdFatConfig.h +++ /dev/null @@ -1,121 +0,0 @@ -/* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino SdFat Library - * - * This Library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with the Arduino SdFat Library. If not, see - * . - */ -/** - * \file - * \brief configuration definitions - */ -#ifndef SdFatConfig_h -#define SdFatConfig_h -#include -//------------------------------------------------------------------------------ -/** - * To use multiple SD cards set USE_MULTIPLE_CARDS nonzero. - * - * Using multiple cards costs 400 - 500 bytes of flash. - * - * Each card requires about 550 bytes of SRAM so use of a Mega is recommended. - */ -#define USE_MULTIPLE_CARDS 0 -//------------------------------------------------------------------------------ -/** - * Set nonzero to use Serial (the HardwareSerial class) for error messages - * and output from print functions like ls(). - * - * If USE_SERIAL_FOR_STD_OUT is zero, a small non-interrupt driven class - * is used to output messages to serial port zero. This allows an alternate - * Serial library like SerialPort to be used with SdFat. - * - * You can redirect stdOut with SdFat::setStdOut(Print* stream) and - * get the current stream with SdFat::stdOut(). - */ -#define USE_SERIAL_FOR_STD_OUT 0 -//------------------------------------------------------------------------------ -/** - * Call flush for endl if ENDL_CALLS_FLUSH is nonzero - * - * The standard for iostreams is to call flush. This is very costly for - * SdFat. Each call to flush causes 2048 bytes of I/O to the SD. - * - * SdFat has a single 512 byte buffer for SD I/O so it must write the current - * data block to the SD, read the directory block from the SD, update the - * directory entry, write the directory block to the SD and read the data - * block back into the buffer. - * - * The SD flash memory controller is not designed for this many rewrites - * so performance may be reduced by more than a factor of 100. - * - * If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force - * all data to be written to the SD. - */ -#define ENDL_CALLS_FLUSH 0 -//------------------------------------------------------------------------------ -/** - * Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero - */ -#define ALLOW_DEPRECATED_FUNCTIONS 1 -//------------------------------------------------------------------------------ -/** - * Allow FAT12 volumes if FAT12_SUPPORT is nonzero. - * FAT12 has not been well tested. - */ -#define FAT12_SUPPORT 0 -//------------------------------------------------------------------------------ -/** - * SPI init rate for SD initialization commands. Must be 5 (F_CPU/64) - * or 6 (F_CPU/128). - */ -#define SPI_SD_INIT_RATE 5 -//------------------------------------------------------------------------------ -/** - * Set the SS pin high for hardware SPI. If SS is chip select for another SPI - * device this will disable that device during the SD init phase. - */ -#define SET_SPI_SS_HIGH 1 -//------------------------------------------------------------------------------ -/** - * Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos. - * Pins used are SS 10, MOSI 11, MISO 12, and SCK 13. - * - * MEGA_SOFT_SPI allows an unmodified Adafruit GPS Shield to be used - * on Mega Arduinos. Software SPI works well with GPS Shield V1.1 - * but many SD cards will fail with GPS Shield V1.0. - */ -#define MEGA_SOFT_SPI 0 -//------------------------------------------------------------------------------ -/** - * Set USE_SOFTWARE_SPI nonzero to always use software SPI. - */ -#define USE_SOFTWARE_SPI 0 -// define software SPI pins so Mega can use unmodified 168/328 shields -/** Software SPI chip select pin for the SD */ -uint8_t const SOFT_SPI_CS_PIN = 10; -/** Software SPI Master Out Slave In pin */ -uint8_t const SOFT_SPI_MOSI_PIN = 11; -/** Software SPI Master In Slave Out pin */ -uint8_t const SOFT_SPI_MISO_PIN = 12; -/** Software SPI Clock pin */ -uint8_t const SOFT_SPI_SCK_PIN = 13; -//------------------------------------------------------------------------------ -/** - * The __cxa_pure_virtual function is an error handler that is invoked when - * a pure virtual function is called. - */ -#define USE_CXA_PURE_VIRTUAL 1 -#endif // SdFatConfig_h diff --git a/libs/SdFatBeta20120108/SdFat/SdFatmainpage.h b/libs/SdFatBeta20120108/SdFat/SdFatmainpage.h deleted file mode 100755 index fad0149..0000000 --- a/libs/SdFatBeta20120108/SdFat/SdFatmainpage.h +++ /dev/null @@ -1,228 +0,0 @@ -/* Arduino SdFat Library - * Copyright (C) 2011 by William Greiman - * - * This file is part of the Arduino SdFat Library - * - * This Library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with the Arduino SdFat Library. If not, see - * . - */ - -/** -\mainpage Arduino %SdFat Library -
Copyright © 2011 by William Greiman -
- -\section Intro Introduction -The Arduino %SdFat Library is a minimal implementation of FAT16 and FAT32 -file systems on SD flash memory cards. Standard SD and high capacity SDHC -cards are supported. - -Experimental support for FAT12 can be enabled by setting FAT12_SUPPORT -nonzero in SdFatConfig.h. - -The %SdFat library only supports short 8.3 names. - -The main classes in %SdFat are SdFat, SdFile, \ref fstream, \ref ifstream, -and \ref ofstream. - -The SdFat class maintains a volume working directories, a current working -directory, and simplifies initialization of other classes. - -The SdFile class provides binary file access functions such as open(), read(), -remove(), write(), close() and sync(). This class supports access to the root -directory and subdirectories. - -The \ref fstream class implements C++ iostreams for both reading and writing -text files. - -The \ref ifstream class implements the C++ iostreams for reading text files. - -The \ref ofstream class implements the C++ iostreams for writing text files. - -The classes \ref ibufstream and \ref obufstream format and parse character - strings in memory buffers. - -the classes ArduinoInStream and ArduinoOutStream provide iostream functions -for Serial, LiquidCrystal, and other devices. - -The SdVolume class supports FAT16 and FAT32 partitions. Most applications -will not need to call SdVolume member function. - -The Sd2Card class supports access to standard SD cards and SDHC cards. Most -applications will not need to call Sd2Card functions. The Sd2Card class can -be used for raw access to the SD card. - -A number of example are provided in the %SdFat/examples folder. These were -developed to test %SdFat and illustrate its use. - -%SdFat was developed for high speed data recording. %SdFat was used to -implement an audio record/play class, WaveRP, for the Adafruit Wave Shield. -This application uses special Sd2Card calls to write to contiguous files in -raw mode. These functions reduce write latency so that audio can be -recorded with the small amount of RAM in the Arduino. - -\section SDcard SD\SDHC Cards - -Arduinos access SD cards using the cards SPI protocol. PCs, Macs, and -most consumer devices use the 4-bit parallel SD protocol. A card that -functions well on A PC or Mac may not work well on the Arduino. - -Most cards have good SPI read performance but cards vary widely in SPI -write performance. Write performance is limited by how efficiently the -card manages internal erase/remapping operations. The Arduino cannot -optimize writes to reduce erase operations because of its limit RAM. - -SanDisk cards generally have good write performance. They seem to have -more internal RAM buffering than other cards and therefore can limit -the number of flash erase operations that the Arduino forces due to its -limited RAM. - -\section Hardware Hardware Configuration - -%SdFat was developed using an - Adafruit Industries - Wave Shield. - -The hardware interface to the SD card should not use a resistor based level -shifter. %SdFat sets the SPI bus frequency to 8 MHz which results in signal -rise times that are too slow for the edge detectors in many newer SD card -controllers when resistor voltage dividers are used. - -The 5 to 3.3 V level shifter for 5 V Arduinos should be IC based like the -74HC4050N based circuit shown in the file SdLevel.png. The Adafruit Wave Shield -uses a 74AHC125N. Gravitech sells SD and MicroSD Card Adapters based on the -74LCX245. - -If you are using a resistor based level shifter and are having problems try -setting the SPI bus frequency to 4 MHz. This can be done by using -card.init(SPI_HALF_SPEED) to initialize the SD card. - -\section comment Bugs and Comments - -If you wish to report bugs or have comments, send email to fat16lib@sbcglobal.net. - -\section SdFatClass SdFat Usage - -%SdFat uses a slightly restricted form of short names. -Only printable ASCII characters are supported. No characters with code point -values greater than 127 are allowed. Space is not allowed even though space -was allowed in the API of early versions of DOS. - -Short names are limited to 8 characters followed by an optional period (.) -and extension of up to 3 characters. The characters may be any combination -of letters and digits. The following special characters are also allowed: - -$ % ' - _ @ ~ ` ! ( ) { } ^ # & - -Short names are always converted to upper case and their original case -value is lost. - -\note - The Arduino Print class uses character -at a time writes so it was necessary to use a \link SdFile::sync() sync() \endlink -function to control when data is written to the SD card. - -\par -An application which writes to a file using \link Print::print() print()\endlink, -\link Print::println() println() \endlink -or \link SdFile::write write() \endlink must call \link SdFile::sync() sync() \endlink -at the appropriate time to force data and directory information to be written -to the SD Card. Data and directory information are also written to the SD card -when \link SdFile::close() close() \endlink is called. - -\par -Applications must use care calling \link SdFile::sync() sync() \endlink -since 2048 bytes of I/O is required to update file and -directory information. This includes writing the current data block, reading -the block that contains the directory entry for update, writing the directory -block back and reading back the current data block. - -It is possible to open a file with two or more instances of SdFile. A file may -be corrupted if data is written to the file by more than one instance of SdFile. - -\section HowTo How to format SD Cards as FAT Volumes - -You should use a freshly formatted SD card for best performance. FAT -file systems become slower if many files have been created and deleted. -This is because the directory entry for a deleted file is marked as deleted, -but is not deleted. When a new file is created, these entries must be scanned -before creating the file, a flaw in the FAT design. Also files can become -fragmented which causes reads and writes to be slower. - -A formatter sketch, SdFormatter.pde, is included in the -%SdFat/examples/SdFormatter directory. This sketch attempts to -emulate SD Association's SDFormatter. - -The best way to restore an SD card's format on a PC is to use SDFormatter -which can be downloaded from: - -http://www.sdcard.org/consumers/formatter/ - -SDFormatter aligns flash erase boundaries with file -system structures which reduces write latency and file system overhead. - -SDFormatter does not have an option for FAT type so it may format -small cards as FAT12. - -After the MBR is restored by SDFormatter you may need to reformat small -cards that have been formatted FAT12 to force the volume type to be FAT16. - -If you reformat the SD card with an OS utility, choose a cluster size that -will result in: - -4084 < CountOfClusters && CountOfClusters < 65525 - -The volume will then be FAT16. - -If you are formatting an SD card on OS X or Linux, be sure to use the first -partition. Format this partition with a cluster count in above range for FAT16. -SDHC cards should be formatted FAT32 with a cluster size of 32 KB. - -Microsoft operating systems support removable media formatted with a -Master Boot Record, MBR, or formatted as a super floppy with a FAT Boot Sector -in block zero. - -Microsoft operating systems expect MBR formatted removable media -to have only one partition. The first partition should be used. - -Microsoft operating systems do not support partitioning SD flash cards. -If you erase an SD card with a program like KillDisk, Most versions of -Windows will format the card as a super floppy. - -\section References References - -Adafruit Industries: - -http://www.adafruit.com/ - -http://www.ladyada.net/make/waveshield/ - -The Arduino site: - -http://www.arduino.cc/ - -For more information about FAT file systems see: - -http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx - -For information about using SD cards as SPI devices see: - -http://www.sdcard.org/developers/tech/sdcard/pls/Simplified_Physical_Layer_Spec.pdf - -The ATmega328 datasheet: - -http://www.atmel.com/dyn/resources/prod_documents/doc8161.pdf - - - */ diff --git a/libs/SdFatBeta20120108/SdFat/SdVolume.cpp b/libs/SdFatBeta20120108/SdFat/SdVolume.cpp deleted file mode 100755 index f05a05b..0000000 --- a/libs/SdFatBeta20120108/SdFat/SdVolume.cpp +++ /dev/null @@ -1,401 +0,0 @@ -/* Arduino SdFat Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino SdFat Library - * - * This Library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with the Arduino SdFat Library. If not, see - * . - */ -#include -//------------------------------------------------------------------------------ -#if !USE_MULTIPLE_CARDS -// raw block cache -uint32_t SdVolume::cacheBlockNumber_; // current block number -cache_t SdVolume::cacheBuffer_; // 512 byte cache for Sd2Card -Sd2Card* SdVolume::sdCard_; // pointer to SD card object -bool SdVolume::cacheDirty_; // cacheFlush() will write block if true -uint32_t SdVolume::cacheMirrorBlock_; // mirror block for second FAT -#endif // USE_MULTIPLE_CARDS -//------------------------------------------------------------------------------ -// find a contiguous group of clusters -bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) { - // start of group - uint32_t bgnCluster; - // end of group - uint32_t endCluster; - // last cluster of FAT - uint32_t fatEnd = clusterCount_ + 1; - - // flag to save place to start next search - bool setStart; - - // set search start cluster - if (*curCluster) { - // try to make file contiguous - bgnCluster = *curCluster + 1; - - // don't save new start location - setStart = false; - } else { - // start at likely place for free cluster - bgnCluster = allocSearchStart_; - - // save next search start if one cluster - setStart = count == 1; - } - // end of group - endCluster = bgnCluster; - - // search the FAT for free clusters - for (uint32_t n = 0;; n++, endCluster++) { - // can't find space checked all clusters - if (n >= clusterCount_) goto fail; - - // past end - start from beginning of FAT - if (endCluster > fatEnd) { - bgnCluster = endCluster = 2; - } - uint32_t f; - if (!fatGet(endCluster, &f)) goto fail; - - if (f != 0) { - // cluster in use try next cluster as bgnCluster - bgnCluster = endCluster + 1; - } else if ((endCluster - bgnCluster + 1) == count) { - // done - found space - break; - } - } - // mark end of chain - if (!fatPutEOC(endCluster)) goto fail; - - // link clusters - while (endCluster > bgnCluster) { - if (!fatPut(endCluster - 1, endCluster)) goto fail; - endCluster--; - } - if (*curCluster != 0) { - // connect chains - if (!fatPut(*curCluster, bgnCluster)) goto fail; - } - // return first cluster number to caller - *curCluster = bgnCluster; - - // remember possible next free cluster - if (setStart) allocSearchStart_ = bgnCluster + 1; - - return true; - - fail: - return false; -} -//------------------------------------------------------------------------------ -bool SdVolume::cacheFlush() { - if (cacheDirty_) { - if (!sdCard_->writeBlock(cacheBlockNumber_, cacheBuffer_.data)) { - goto fail; - } - // mirror FAT tables - if (cacheMirrorBlock_) { - if (!sdCard_->writeBlock(cacheMirrorBlock_, cacheBuffer_.data)) { - goto fail; - } - cacheMirrorBlock_ = 0; - } - cacheDirty_ = 0; - } - return true; - - fail: - return false; -} -//------------------------------------------------------------------------------ -bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) { - if (cacheBlockNumber_ != blockNumber) { - if (!cacheFlush()) goto fail; - if (!sdCard_->readBlock(blockNumber, cacheBuffer_.data)) goto fail; - cacheBlockNumber_ = blockNumber; - } - if (dirty) cacheDirty_ = true; - return true; - - fail: - return false; -} -//------------------------------------------------------------------------------ -// return the size in bytes of a cluster chain -bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) { - uint32_t s = 0; - do { - if (!fatGet(cluster, &cluster)) goto fail; - s += 512UL << clusterSizeShift_; - } while (!isEOC(cluster)); - *size = s; - return true; - - fail: - return false; -} -//------------------------------------------------------------------------------ -// Fetch a FAT entry -bool SdVolume::fatGet(uint32_t cluster, uint32_t* value) { - uint32_t lba; - if (cluster > (clusterCount_ + 1)) goto fail; - if (FAT12_SUPPORT && fatType_ == 12) { - uint16_t index = cluster; - index += index >> 1; - lba = fatStartBlock_ + (index >> 9); - if (!cacheRawBlock(lba, CACHE_FOR_READ)) goto fail; - index &= 0X1FF; - uint16_t tmp = cacheBuffer_.data[index]; - index++; - if (index == 512) { - if (!cacheRawBlock(lba + 1, CACHE_FOR_READ)) goto fail; - index = 0; - } - tmp |= cacheBuffer_.data[index] << 8; - *value = cluster & 1 ? tmp >> 4 : tmp & 0XFFF; - return true; - } - if (fatType_ == 16) { - lba = fatStartBlock_ + (cluster >> 8); - } else if (fatType_ == 32) { - lba = fatStartBlock_ + (cluster >> 7); - } else { - goto fail; - } - if (lba != cacheBlockNumber_) { - if (!cacheRawBlock(lba, CACHE_FOR_READ)) goto fail; - } - if (fatType_ == 16) { - *value = cacheBuffer_.fat16[cluster & 0XFF]; - } else { - *value = cacheBuffer_.fat32[cluster & 0X7F] & FAT32MASK; - } - return true; - - fail: - return false; -} -//------------------------------------------------------------------------------ -// Store a FAT entry -bool SdVolume::fatPut(uint32_t cluster, uint32_t value) { - uint32_t lba; - // error if reserved cluster - if (cluster < 2) goto fail; - - // error if not in FAT - if (cluster > (clusterCount_ + 1)) goto fail; - - if (FAT12_SUPPORT && fatType_ == 12) { - uint16_t index = cluster; - index += index >> 1; - lba = fatStartBlock_ + (index >> 9); - if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail; - // mirror second FAT - if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_; - index &= 0X1FF; - uint8_t tmp = value; - if (cluster & 1) { - tmp = (cacheBuffer_.data[index] & 0XF) | tmp << 4; - } - cacheBuffer_.data[index] = tmp; - index++; - if (index == 512) { - lba++; - index = 0; - if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail; - // mirror second FAT - if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_; - } - tmp = value >> 4; - if (!(cluster & 1)) { - tmp = ((cacheBuffer_.data[index] & 0XF0)) | tmp >> 4; - } - cacheBuffer_.data[index] = tmp; - return true; - } - if (fatType_ == 16) { - lba = fatStartBlock_ + (cluster >> 8); - } else if (fatType_ == 32) { - lba = fatStartBlock_ + (cluster >> 7); - } else { - goto fail; - } - if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail; - // store entry - if (fatType_ == 16) { - cacheBuffer_.fat16[cluster & 0XFF] = value; - } else { - cacheBuffer_.fat32[cluster & 0X7F] = value; - } - // mirror second FAT - if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_; - return true; - - fail: - return false; -} -//------------------------------------------------------------------------------ -// free a cluster chain -bool SdVolume::freeChain(uint32_t cluster) { - uint32_t next; - - // clear free cluster location - allocSearchStart_ = 2; - - do { - if (!fatGet(cluster, &next)) goto fail; - - // free cluster - if (!fatPut(cluster, 0)) goto fail; - - cluster = next; - } while (!isEOC(cluster)); - - return true; - - fail: - return false; -} -//------------------------------------------------------------------------------ -/** Volume free space in clusters. - * - * \return Count of free clusters for success or -1 if an error occurs. - */ -int32_t SdVolume::freeClusterCount() { - uint32_t free = 0; - uint16_t n; - uint32_t todo = clusterCount_ + 2; - - if (fatType_ == 16) { - n = 256; - } else if (fatType_ == 32) { - n = 128; - } else { - // put FAT12 here - return -1; - } - - for (uint32_t lba = fatStartBlock_; todo; todo -= n, lba++) { - if (!cacheRawBlock(lba, CACHE_FOR_READ)) return -1; - if (todo < n) n = todo; - if (fatType_ == 16) { - for (uint16_t i = 0; i < n; i++) { - if (cacheBuffer_.fat16[i] == 0) free++; - } - } else { - for (uint16_t i = 0; i < n; i++) { - if (cacheBuffer_.fat32[i] == 0) free++; - } - } - } - return free; -} -//------------------------------------------------------------------------------ -/** Initialize a FAT volume. - * - * \param[in] dev The SD card where the volume is located. - * - * \param[in] part The partition to be used. Legal values for \a part are - * 1-4 to use the corresponding partition on a device formatted with - * a MBR, Master Boot Record, or zero if the device is formatted as - * a super floppy with the FAT boot sector in block zero. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. Reasons for - * failure include not finding a valid partition, not finding a valid - * FAT file system in the specified partition or an I/O error. - */ -bool SdVolume::init(Sd2Card* dev, uint8_t part) { - uint32_t totalBlocks; - uint32_t volumeStartBlock = 0; - fat32_boot_t* fbs; - - sdCard_ = dev; - fatType_ = 0; - allocSearchStart_ = 2; - cacheDirty_ = 0; // cacheFlush() will write block if true - cacheMirrorBlock_ = 0; - cacheBlockNumber_ = 0XFFFFFFFF; - - // if part == 0 assume super floppy with FAT boot sector in block zero - // if part > 0 assume mbr volume with partition table - if (part) { - if (part > 4)goto fail; - if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) goto fail; - part_t* p = &cacheBuffer_.mbr.part[part-1]; - if ((p->boot & 0X7F) !=0 || - p->totalSectors < 100 || - p->firstSector == 0) { - // not a valid partition - goto fail; - } - volumeStartBlock = p->firstSector; - } - if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) goto fail; - fbs = &cacheBuffer_.fbs32; - if (fbs->bytesPerSector != 512 || - fbs->fatCount == 0 || - fbs->reservedSectorCount == 0 || - fbs->sectorsPerCluster == 0) { - // not valid FAT volume - goto fail; - } - fatCount_ = fbs->fatCount; - blocksPerCluster_ = fbs->sectorsPerCluster; - // determine shift that is same as multiply by blocksPerCluster_ - clusterSizeShift_ = 0; - while (blocksPerCluster_ != (1 << clusterSizeShift_)) { - // error if not power of 2 - if (clusterSizeShift_++ > 7) goto fail; - } - blocksPerFat_ = fbs->sectorsPerFat16 ? - fbs->sectorsPerFat16 : fbs->sectorsPerFat32; - - fatStartBlock_ = volumeStartBlock + fbs->reservedSectorCount; - - // count for FAT16 zero for FAT32 - rootDirEntryCount_ = fbs->rootDirEntryCount; - - // directory start for FAT16 dataStart for FAT32 - rootDirStart_ = fatStartBlock_ + fbs->fatCount * blocksPerFat_; - - // data start for FAT16 and FAT32 - dataStartBlock_ = rootDirStart_ + ((32 * fbs->rootDirEntryCount + 511)/512); - - // total blocks for FAT16 or FAT32 - totalBlocks = fbs->totalSectors16 ? - fbs->totalSectors16 : fbs->totalSectors32; - // total data blocks - clusterCount_ = totalBlocks - (dataStartBlock_ - volumeStartBlock); - - // divide by cluster size to get cluster count - clusterCount_ >>= clusterSizeShift_; - - // FAT type is determined by cluster count - if (clusterCount_ < 4085) { - fatType_ = 12; - if (!FAT12_SUPPORT) goto fail; - } else if (clusterCount_ < 65525) { - fatType_ = 16; - } else { - rootDirStart_ = fbs->fat32RootCluster; - fatType_ = 32; - } - return true; - - fail: - return false; -} diff --git a/libs/SdFatBeta20120108/SdFat/examples/bench/bench.pde b/libs/SdFatBeta20120108/SdFat/examples/bench/bench.pde deleted file mode 100755 index 11ed723..0000000 --- a/libs/SdFatBeta20120108/SdFat/examples/bench/bench.pde +++ /dev/null @@ -1,103 +0,0 @@ -/* - * This sketch is a simple binary write/read benchmark. - */ -#include -#include - -// SD chip select pin -const uint8_t chipSelect = SS_PIN; - -#define FILE_SIZE_MB 5 -#define FILE_SIZE (1000000UL*FILE_SIZE_MB) -#define BUF_SIZE 100 - -uint8_t buf[BUF_SIZE]; - -// file system -SdFat sd; - -// test file -SdFile file; - -// Serial output stream -ArduinoOutStream cout(Serial); -//------------------------------------------------------------------------------ -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) -//------------------------------------------------------------------------------ -void setup() { - uint32_t maxLatency; - uint32_t totalLatency; - Serial.begin(9600); - - // pstr stores strings in flash to save RAM - cout << pstr("Type any character to start\n"); - while (Serial.read() < 0) {} - - cout << pstr("Free RAM: ") << FreeRam() << endl; - - // initialize the SD card at SPI_FULL_SPEED for best performance. - // try SPI_HALF_SPEED if bus errors occur. - if (!sd.init(SPI_FULL_SPEED, chipSelect)) sd.initErrorHalt(); - - cout << pstr("Type is FAT") << int(sd.vol()->fatType()) << endl; - - // open or create file - truncate existing file. - if (!file.open("BENCH.DAT", O_CREAT | O_TRUNC | O_RDWR)) { - error("open failed"); - } - - // fill buf with known data - for (uint16_t i = 0; i < (BUF_SIZE-2); i++) { - buf[i] = 'A' + (i % 26); - } - buf[BUF_SIZE-2] = '\r'; - buf[BUF_SIZE-1] = '\n'; - - cout << pstr("File size ") << FILE_SIZE_MB << pstr("MB\n"); - - cout << pstr("Starting write test. Please wait up to a minute\n"); - - // do write test - uint32_t n = FILE_SIZE/sizeof(buf); - maxLatency = 0; - totalLatency = 0; - uint32_t t = millis(); - for (uint32_t i = 0; i < n; i++) { - uint32_t m = micros(); - if (file.write(buf, sizeof(buf)) != sizeof(buf)) { - error("write failed"); - } - m = micros() - m; - if (maxLatency < m) maxLatency = m; - totalLatency += m; - } - file.sync(); - t = millis() - t; - double s = file.fileSize(); - cout << pstr("Write ") << s/t << pstr(" KB/sec\n"); - cout << pstr("Maximum latency: ") << maxLatency; - cout << pstr(" usec, Avg Latency: ") << totalLatency/n << pstr(" usec\n\n"); - cout << pstr("Starting read test. Please wait up to a minute\n"); - // do read test - file.rewind(); - maxLatency = 0; - totalLatency = 0; - t = millis(); - for (uint32_t i = 0; i < n; i++) { - uint32_t m = micros(); - if (file.read(buf, sizeof(buf)) != sizeof(buf)) { - error("read failed"); - } - m = micros() - m; - if (maxLatency < m) maxLatency = m; - totalLatency += m; - } - t = millis() - t; - cout << pstr("Read ") << s/t << pstr(" KB/sec\n"); - cout << pstr("Maximum latency: ") << maxLatency; - cout << pstr(" usec, Avg Latency: ") << totalLatency/n << pstr(" usec\n\n"); - cout << pstr("Done\n"); -} -//------------------------------------------------------------------------------ -void loop() { } diff --git a/libs/SdFatBeta20120108/extra/FridgeLogger/LightTempSdfat.pde b/libs/SdFatBeta20120108/extra/FridgeLogger/LightTempSdfat.pde deleted file mode 100755 index 8666833..0000000 --- a/libs/SdFatBeta20120108/extra/FridgeLogger/LightTempSdfat.pde +++ /dev/null @@ -1,224 +0,0 @@ -#include -SdFat SD; -#include -#include "RTClib.h" - -// A simple data logger for the Arduino analog pins - -// how many milliseconds between grabbing data and logging it. 1000 ms is once a second -#define LOG_INTERVAL 1000 // mills between entries (reduce to take more/faster data) - -// how many milliseconds before writing the logged data permanently to disk -// set it to the LOG_INTERVAL to write each time (safest) -// set it to 10*LOG_INTERVAL to write all data every 10 datareads, you could lose up to -// the last 10 reads if power is lost but it uses less power and is much faster! -#define SYNC_INTERVAL 1000 // mills between calls to flush() - to write data to the card -uint32_t syncTime = 0; // time of last sync() - -#define ECHO_TO_SERIAL 1 // echo data to serial port -#define WAIT_TO_START 0 // Wait for serial input in setup() - -// the digital pins that connect to the LEDs -#define redLEDpin 2 -#define greenLEDpin 3 - -// The analog pins that connect to the sensors -#define photocellPin 0 // analog 0 -#define tempPin 1 // analog 1 -#define BANDGAPREF 14 // special indicator that we want to measure the bandgap - -#define aref_voltage 3.3 // we tie 3.3V to ARef and measure it with a multimeter! -#define bandgap_voltage 1.1 // this is not super guaranteed but its not -too- off - -RTC_DS1307 RTC; // define the Real Time Clock object - -// for the data logging shield, we use digital pin 10 for the SD cs line -const int chipSelect = 10; - -// the logging file -SdFile logfile; - -void error(char *str) -{ - Serial.print("error: "); - Serial.println(str); - - // red LED indicates error - digitalWrite(redLEDpin, HIGH); - - while(1); -} - -void setup(void) -{ - Serial.begin(9600); - Serial.println(); - - // use debugging LEDs - pinMode(redLEDpin, OUTPUT); - pinMode(greenLEDpin, OUTPUT); - -#if WAIT_TO_START - Serial.println("Type any character to start"); - while (!Serial.available()); -#endif //WAIT_TO_START - - // initialize the SD card - Serial.print("Initializing SD card..."); - // make sure that the default chip select pin is set to - // output, even if you don't use it: - pinMode(10, OUTPUT); - - // see if the card is present and can be initialized: - if (!SD.init(SPI_HALF_SPEED, chipSelect)) { - error("Card failed, or not present"); - } - Serial.println("card initialized."); - - // create a new file - char filename[] = "LOGGER00.CSV"; - for (uint8_t i = 0; i < 100; i++) { - filename[6] = i/10 + '0'; - filename[7] = i%10 + '0'; - if (! SD.exists(filename)) { - // only open a new file if it doesn't exist - logfile.open(filename, O_WRITE | O_CREAT); - break; // leave the loop! - } - } - - if (! logfile.isOpen()) { - error("couldnt create file"); - } - - Serial.print("Logging to: "); - Serial.println(filename); - - // connect to RTC - Wire.begin(); - if (!RTC.begin()) { - logfile.println("RTC failed"); -#if ECHO_TO_SERIAL - Serial.println("RTC failed"); -#endif //ECHO_TO_SERIAL - } - - - logfile.println("millis,stamp,datetime,light,temp,vcc"); -#if ECHO_TO_SERIAL - Serial.println("millis,stamp,datetime,light,temp,vcc"); -#endif //ECHO_TO_SERIAL - - // If you want to set the aref to something other than 5v - analogReference(EXTERNAL); -} - -void loop(void) -{ - DateTime now; - - // delay for the amount of time we want between readings - delay((LOG_INTERVAL -1) - (millis() % LOG_INTERVAL)); - - digitalWrite(greenLEDpin, HIGH); - - // log milliseconds since starting - uint32_t m = millis(); - logfile.print(m); // milliseconds since start - logfile.print(", "); -#if ECHO_TO_SERIAL - Serial.print(m); // milliseconds since start - Serial.print(", "); -#endif - - // fetch the time - now = RTC.now(); - // log time - logfile.print(now.unixtime()); // seconds since 1/1/1970 - logfile.print(", "); - logfile.write('"'); - logfile.print(now.year(), DEC); - logfile.write('/'); - logfile.print(now.month(), DEC); - logfile.write('/'); - logfile.print(now.day(), DEC); - logfile.write(' '); - logfile.print(now.hour(), DEC); - logfile.write(':'); - logfile.print(now.minute(), DEC); - logfile.write(':'); - logfile.print(now.second(), DEC); - logfile.write('"'); -#if ECHO_TO_SERIAL - Serial.print(now.unixtime()); // seconds since 1/1/1970 - Serial.print(", "); - Serial.write('"'); - Serial.print(now.year(), DEC); - Serial.write('/'); - Serial.print(now.month(), DEC); - Serial.write('/'); - Serial.print(now.day(), DEC); - Serial.write(' '); - Serial.print(now.hour(), DEC); - Serial.write(':'); - Serial.print(now.minute(), DEC); - Serial.write(':'); - Serial.print(now.second(), DEC); - Serial.write('"'); -#endif //ECHO_TO_SERIAL - - analogRead(photocellPin); - delay(10); - int photocellReading = analogRead(photocellPin); - - analogRead(tempPin); - delay(10); - int tempReading = analogRead(tempPin); - - // converting that reading to voltage, for 3.3v arduino use 3.3, for 5.0, use 5.0 - float voltage = tempReading * aref_voltage / 1024; - float temperatureC = (voltage - 0.5) * 100 ; - float temperatureF = (temperatureC * 9 / 5) + 32; - - logfile.print(", "); - logfile.print(photocellReading); - logfile.print(", "); - logfile.print(temperatureF); -#if ECHO_TO_SERIAL - Serial.print(", "); - Serial.print(photocellReading); - Serial.print(", "); - Serial.print(temperatureF); -#endif //ECHO_TO_SERIAL - - // Log the estimated 'VCC' voltage by measuring the internal 1.1v ref - analogRead(BANDGAPREF); - delay(10); - int refReading = analogRead(BANDGAPREF); - float supplyvoltage = (bandgap_voltage * 1024) / refReading; - - logfile.print(", "); - logfile.print(supplyvoltage); -#if ECHO_TO_SERIAL - Serial.print(", "); - Serial.print(supplyvoltage); -#endif // ECHO_TO_SERIAL - - logfile.println(); -#if ECHO_TO_SERIAL - Serial.println(); -#endif // ECHO_TO_SERIAL - - digitalWrite(greenLEDpin, LOW); - - // Now we write data to disk! Don't sync too often - requires 2048 bytes of I/O to SD card - // which uses a bunch of power and takes time - if ((millis() - syncTime) < SYNC_INTERVAL) return; - syncTime = millis(); - - // blink LED to show we are syncing data to the card & updating FAT! - digitalWrite(redLEDpin, HIGH); - logfile.sync(); - digitalWrite(redLEDpin, LOW); - -} \ No newline at end of file diff --git a/libs/SdFatBeta20120108/extra/FridgeLogger/LightTempStreams.pde b/libs/SdFatBeta20120108/extra/FridgeLogger/LightTempStreams.pde deleted file mode 100755 index 1b389f5..0000000 --- a/libs/SdFatBeta20120108/extra/FridgeLogger/LightTempStreams.pde +++ /dev/null @@ -1,177 +0,0 @@ -#include -#include -#include "RTClib.h" - -// A simple data logger for the Arduino analog pins - -// how many milliseconds between grabbing data and logging it. 1000 ms is once a second -#define LOG_INTERVAL 1000 // mills between entries (reduce to take more/faster data) - -// how many milliseconds before writing the logged data permanently to disk -// set it to the LOG_INTERVAL to write each time (safest) -// set it to 10*LOG_INTERVAL to write all data every 10 datareads, you could lose up to -// the last 10 reads if power is lost but it uses less power and is much faster! -#define SYNC_INTERVAL 1000 // mills between calls to flush() - to write data to the card -uint32_t syncTime = 0; // time of last sync() - -#define ECHO_TO_SERIAL 1 // echo data to serial port -#define WAIT_TO_START 0 // Wait for serial input in setup() - -// the digital pins that connect to the LEDs -#define redLEDpin 2 -#define greenLEDpin 3 - -// The analog pins that connect to the sensors -#define photocellPin 0 // analog 0 -#define tempPin 1 // analog 1 -#define BANDGAPREF 14 // special indicator that we want to measure the bandgap -#define aref_voltage 3.3 // we tie 3.3V to ARef and measure it with a multimeter! -#define bandgap_voltage 1.1 // this is not super guaranteed but its not -too- off -//------------------------------------------------------------------------------ -// for the data logging shield, we use digital pin 10 for the sd cs line -const int chipSelect = 10; - -// Serial Stream -ArduinoOutStream cout(Serial); - -// file system -SdFat sd; - -// the logging file -ofstream logfile; - -RTC_DS1307 RTC; // define the Real Time Clock object -//------------------------------------------------------------------------------ -// operator that formats date/time -ostream& operator << (ostream& os, DateTime& dt) { - os << dt.year() << '/' << int(dt.month()) << '/' << int(dt.day()) << ','; - os << int(dt.hour()) << ':' << setfill('0') << setw(2) << int(dt.minute()); - os << ':' << setw(2) << int(dt.second()) << setfill(' '); - return os; -} -//------------------------------------------------------------------------------ -// call back for file timestamps -void dateTime(uint16_t* date, uint16_t* time) { - DateTime now = RTC.now(); - - // return date using FAT_DATE macro to format fields - *date = FAT_DATE(now.year(), now.month(), now.day()); - - // return time using FAT_TIME macro to format fields - *time = FAT_TIME(now.hour(), now.minute(), now.second()); -} -//------------------------------------------------------------------------------ -void error(char *str) { - // red LED indicates error - digitalWrite(redLEDpin, HIGH); - sd.errorHalt(str); -} -//------------------------------------------------------------------------------ -void setup(void) { - Serial.begin(9600); - - // use debugging LEDs - pinMode(redLEDpin, OUTPUT); - pinMode(greenLEDpin, OUTPUT); - -#if WAIT_TO_START - cout << "Type any character to start" << endl; - while (!Serial.available()); -#endif //WAIT_TO_START - - // connect to RTC - Wire.begin(); - if (!RTC.begin()) error("RTC failed"); - - // set date time callback function - SdFile::dateTimeCallback(dateTime); - - // see if the card is present and can be initialized: - if (!sd.init(SPI_HALF_SPEED, chipSelect)) sd.initErrorHalt(); - - // create a new file - char filename[] = "LOGGER00.CSV"; - for (uint8_t i = 0; i < 100; i++) { - filename[6] = i/10 + '0'; - filename[7] = i%10 + '0'; - if (!sd.exists(filename)) { - // only open a new file if it doesn't exist - logfile.open(filename); - break; // leave the loop! - } - } - - if (!logfile.is_open()) error("couldnt create file"); - cout <<"Logging to: " << filename << endl; - - // file header - logfile << "millis,stamp,date,time,light,temp,vcc" << endl; -#if ECHO_TO_SERIAL - cout << "millis,stamp,date,time,light,temp,vcc" << endl; -#endif //ECHO_TO_SERIAL - - // If you want to set the aref to something other than 5v - analogReference(EXTERNAL); -} -//------------------------------------------------------------------------------ -void loop(void) { - // milliseconds since starting - uint32_t m = millis(); - - // wait for time to be a multiple of logging interval - do { - m = millis(); - } while (m % LOG_INTERVAL); - - digitalWrite(greenLEDpin, HIGH); - - // fetch the time - DateTime now = RTC.now(); - - // read the photo cell - analogRead(photocellPin); - delay(10); - int photocellReading = analogRead(photocellPin); - - // read the temperature - analogRead(tempPin); - delay(10); - int tempReading = analogRead(tempPin); - - // converting that reading to voltage, for 3.3v arduino use 3.3, for 5.0, use 5.0 - float voltage = tempReading * aref_voltage / 1024; - float temperatureC = (voltage - 0.5) * 100 ; - float temperatureF = (temperatureC * 9 / 5) + 32; - - // Get the estimated 'VCC' voltage by measuring the internal 1.1v ref - analogRead(BANDGAPREF); - delay(10); - int refReading = analogRead(BANDGAPREF); - float supplyvoltage = (bandgap_voltage * 1024) / refReading; - - // log the data - logfile << m << ',' << now.unixtime() << ',' << now; - logfile << ',' << photocellReading << ',' << temperatureF; - logfile << ',' << supplyvoltage << endl; -#if ECHO_TO_SERIAL - cout << m << ',' << now.unixtime() << ',' << now; - cout << ',' << photocellReading << ',' << temperatureF; - cout << ',' << supplyvoltage << endl; -#endif // ECHO_TO_SERIAL - - digitalWrite(greenLEDpin, LOW); - - // Now we write data to disk! Don't sync too often - // requires 2048 bytes of I/O to sd card - // which uses a bunch of power and takes time - if ((millis() - syncTime) >= SYNC_INTERVAL) { - syncTime = millis(); - - // blink LED to show we are syncing data to the card & updating FAT! - digitalWrite(redLEDpin, HIGH); - logfile.flush(); - digitalWrite(redLEDpin, LOW); - } - // check for errors - if (!logfile.good()) error("write error"); -} diff --git a/libs/SdFatBeta20120108/extra/FridgeLogger/diff.txt b/libs/SdFatBeta20120108/extra/FridgeLogger/diff.txt deleted file mode 100755 index da0b485..0000000 --- a/libs/SdFatBeta20120108/extra/FridgeLogger/diff.txt +++ /dev/null @@ -1,25 +0,0 @@ -1c1,2 -< #include ---- -> #include -> SdFat SD; -38c39 -< File logfile; ---- -> SdFile logfile; -72c73 -< if (!SD.begin(chipSelect)) { ---- -> if (!SD.init(SPI_HALF_SPEED, chipSelect)) { -84c85 -< logfile = SD.open(filename, FILE_WRITE); ---- -> logfile.open(filename, O_WRITE | O_CREAT); -89c90 -< if (! logfile) { ---- -> if (! logfile.isOpen()) { -220c221 -< logfile.flush(); ---- -> logfile.sync(); diff --git a/libs/SdFatBeta20120108/extra/FridgeLogger/lighttemplogger.pde b/libs/SdFatBeta20120108/extra/FridgeLogger/lighttemplogger.pde deleted file mode 100755 index 9f09937..0000000 --- a/libs/SdFatBeta20120108/extra/FridgeLogger/lighttemplogger.pde +++ /dev/null @@ -1,223 +0,0 @@ -#include -#include -#include "RTClib.h" - -// A simple data logger for the Arduino analog pins - -// how many milliseconds between grabbing data and logging it. 1000 ms is once a second -#define LOG_INTERVAL 1000 // mills between entries (reduce to take more/faster data) - -// how many milliseconds before writing the logged data permanently to disk -// set it to the LOG_INTERVAL to write each time (safest) -// set it to 10*LOG_INTERVAL to write all data every 10 datareads, you could lose up to -// the last 10 reads if power is lost but it uses less power and is much faster! -#define SYNC_INTERVAL 1000 // mills between calls to flush() - to write data to the card -uint32_t syncTime = 0; // time of last sync() - -#define ECHO_TO_SERIAL 1 // echo data to serial port -#define WAIT_TO_START 0 // Wait for serial input in setup() - -// the digital pins that connect to the LEDs -#define redLEDpin 2 -#define greenLEDpin 3 - -// The analog pins that connect to the sensors -#define photocellPin 0 // analog 0 -#define tempPin 1 // analog 1 -#define BANDGAPREF 14 // special indicator that we want to measure the bandgap - -#define aref_voltage 3.3 // we tie 3.3V to ARef and measure it with a multimeter! -#define bandgap_voltage 1.1 // this is not super guaranteed but its not -too- off - -RTC_DS1307 RTC; // define the Real Time Clock object - -// for the data logging shield, we use digital pin 10 for the SD cs line -const int chipSelect = 10; - -// the logging file -File logfile; - -void error(char *str) -{ - Serial.print("error: "); - Serial.println(str); - - // red LED indicates error - digitalWrite(redLEDpin, HIGH); - - while(1); -} - -void setup(void) -{ - Serial.begin(9600); - Serial.println(); - - // use debugging LEDs - pinMode(redLEDpin, OUTPUT); - pinMode(greenLEDpin, OUTPUT); - -#if WAIT_TO_START - Serial.println("Type any character to start"); - while (!Serial.available()); -#endif //WAIT_TO_START - - // initialize the SD card - Serial.print("Initializing SD card..."); - // make sure that the default chip select pin is set to - // output, even if you don't use it: - pinMode(10, OUTPUT); - - // see if the card is present and can be initialized: - if (!SD.begin(chipSelect)) { - error("Card failed, or not present"); - } - Serial.println("card initialized."); - - // create a new file - char filename[] = "LOGGER00.CSV"; - for (uint8_t i = 0; i < 100; i++) { - filename[6] = i/10 + '0'; - filename[7] = i%10 + '0'; - if (! SD.exists(filename)) { - // only open a new file if it doesn't exist - logfile = SD.open(filename, FILE_WRITE); - break; // leave the loop! - } - } - - if (! logfile) { - error("couldnt create file"); - } - - Serial.print("Logging to: "); - Serial.println(filename); - - // connect to RTC - Wire.begin(); - if (!RTC.begin()) { - logfile.println("RTC failed"); -#if ECHO_TO_SERIAL - Serial.println("RTC failed"); -#endif //ECHO_TO_SERIAL - } - - - logfile.println("millis,stamp,datetime,light,temp,vcc"); -#if ECHO_TO_SERIAL - Serial.println("millis,stamp,datetime,light,temp,vcc"); -#endif //ECHO_TO_SERIAL - - // If you want to set the aref to something other than 5v - analogReference(EXTERNAL); -} - -void loop(void) -{ - DateTime now; - - // delay for the amount of time we want between readings - delay((LOG_INTERVAL -1) - (millis() % LOG_INTERVAL)); - - digitalWrite(greenLEDpin, HIGH); - - // log milliseconds since starting - uint32_t m = millis(); - logfile.print(m); // milliseconds since start - logfile.print(", "); -#if ECHO_TO_SERIAL - Serial.print(m); // milliseconds since start - Serial.print(", "); -#endif - - // fetch the time - now = RTC.now(); - // log time - logfile.print(now.unixtime()); // seconds since 1/1/1970 - logfile.print(", "); - logfile.write('"'); - logfile.print(now.year(), DEC); - logfile.write('/'); - logfile.print(now.month(), DEC); - logfile.write('/'); - logfile.print(now.day(), DEC); - logfile.write(' '); - logfile.print(now.hour(), DEC); - logfile.write(':'); - logfile.print(now.minute(), DEC); - logfile.write(':'); - logfile.print(now.second(), DEC); - logfile.write('"'); -#if ECHO_TO_SERIAL - Serial.print(now.unixtime()); // seconds since 1/1/1970 - Serial.print(", "); - Serial.write('"'); - Serial.print(now.year(), DEC); - Serial.write('/'); - Serial.print(now.month(), DEC); - Serial.write('/'); - Serial.print(now.day(), DEC); - Serial.write(' '); - Serial.print(now.hour(), DEC); - Serial.write(':'); - Serial.print(now.minute(), DEC); - Serial.write(':'); - Serial.print(now.second(), DEC); - Serial.write('"'); -#endif //ECHO_TO_SERIAL - - analogRead(photocellPin); - delay(10); - int photocellReading = analogRead(photocellPin); - - analogRead(tempPin); - delay(10); - int tempReading = analogRead(tempPin); - - // converting that reading to voltage, for 3.3v arduino use 3.3, for 5.0, use 5.0 - float voltage = tempReading * aref_voltage / 1024; - float temperatureC = (voltage - 0.5) * 100 ; - float temperatureF = (temperatureC * 9 / 5) + 32; - - logfile.print(", "); - logfile.print(photocellReading); - logfile.print(", "); - logfile.print(temperatureF); -#if ECHO_TO_SERIAL - Serial.print(", "); - Serial.print(photocellReading); - Serial.print(", "); - Serial.print(temperatureF); -#endif //ECHO_TO_SERIAL - - // Log the estimated 'VCC' voltage by measuring the internal 1.1v ref - analogRead(BANDGAPREF); - delay(10); - int refReading = analogRead(BANDGAPREF); - float supplyvoltage = (bandgap_voltage * 1024) / refReading; - - logfile.print(", "); - logfile.print(supplyvoltage); -#if ECHO_TO_SERIAL - Serial.print(", "); - Serial.print(supplyvoltage); -#endif // ECHO_TO_SERIAL - - logfile.println(); -#if ECHO_TO_SERIAL - Serial.println(); -#endif // ECHO_TO_SERIAL - - digitalWrite(greenLEDpin, LOW); - - // Now we write data to disk! Don't sync too often - requires 2048 bytes of I/O to SD card - // which uses a bunch of power and takes time - if ((millis() - syncTime) < SYNC_INTERVAL) return; - syncTime = millis(); - - // blink LED to show we are syncing data to the card & updating FAT! - digitalWrite(redLEDpin, HIGH); - logfile.flush(); - digitalWrite(redLEDpin, LOW); - -} \ No newline at end of file diff --git a/libs/SdFatBeta20120108/extra/FridgeLogger/readme.txt b/libs/SdFatBeta20120108/extra/FridgeLogger/readme.txt deleted file mode 100755 index 7662ce7..0000000 --- a/libs/SdFatBeta20120108/extra/FridgeLogger/readme.txt +++ /dev/null @@ -1,15 +0,0 @@ -These three files are versions of the Adafruit Fridge Logger. - -See: - -http://forums.adafruit.com/viewtopic.php?f=31&t=21844 - -http://www.ladyada.net/make/logshield/lighttemp.html - - -lighttemplogger.pde - version for the Arduino SD.h library - -LightTempSdfat.pde - minimal changes to port to SdFat - -LightTempStreams.pde - version using I/O streams - diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatAnalogLogger/SdFatAnalogLogger.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatAnalogLogger/SdFatAnalogLogger.pde deleted file mode 100755 index 9bad4e9..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatAnalogLogger/SdFatAnalogLogger.pde +++ /dev/null @@ -1,109 +0,0 @@ -// A simple data logger for the Arduino analog pins -#define LOG_INTERVAL 1000 // mills between entries -#define SENSOR_COUNT 3 // number of analog pins to log -#define ECHO_TO_SERIAL 1 // echo data to serial port -#define WAIT_TO_START 1 // Wait for serial input in setup() -#define SYNC_INTERVAL 1000 // mills between calls to sync() -uint32_t syncTime = 0; // time of last sync() - -#include - -// file system -SdFat sd; - -// log file -SdFile file; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) -//------------------------------------------------------------------------------ -void setup(void) { - Serial.begin(9600); - Serial.println(); - -#if WAIT_TO_START - Serial.println("Type any character to start"); - while (!Serial.available()); -#endif //WAIT_TO_START - - // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - - // create a new file - char name[] = "LOGGER00.CSV"; - for (uint8_t i = 0; i < 100; i++) { - name[6] = i/10 + '0'; - name[7] = i%10 + '0'; - if (file.open(name, O_CREAT | O_EXCL | O_WRITE)) break; - } - if (!file.isOpen()) error ("file.create"); - Serial.print("Logging to: "); - Serial.println(name); - - // write header - file.writeError = 0; - file.print("millis"); -#if ECHO_TO_SERIAL - Serial.print("millis"); -#endif //ECHO_TO_SERIAL - -#if SENSOR_COUNT > 6 -#error SENSOR_COUNT too large -#endif //SENSOR_COUNT - - for (uint8_t i = 0; i < SENSOR_COUNT; i++) { - file.print(",sens");file.print(i, DEC); -#if ECHO_TO_SERIAL - Serial.print(",sens");Serial.print(i, DEC); -#endif //ECHO_TO_SERIAL - } - file.println(); -#if ECHO_TO_SERIAL - Serial.println(); -#endif //ECHO_TO_SERIAL - - if (file.writeError || !file.sync()) { - error("write header failed"); - } -} -//------------------------------------------------------------------------------ -void loop(void) { - uint32_t m; - - // wait for time to be a multiple of interval - do { - m = millis(); - } while (m % LOG_INTERVAL); - - // log time - file.print(m); -#if ECHO_TO_SERIAL - Serial.print(m); -#endif //ECHO_TO_SERIAL - - // add sensor data - for (uint8_t ia = 0; ia < SENSOR_COUNT; ia++) { - uint16_t data = analogRead(ia); - file.write(','); - file.print(data); -#if ECHO_TO_SERIAL - Serial.write(','); - Serial.print(data); -#endif //ECHO_TO_SERIAL - } - file.println(); -#if ECHO_TO_SERIAL - Serial.println(); -#endif //ECHO_TO_SERIAL - - if (file.writeError) error("write data failed"); - - //don't sync too often - requires 2048 bytes of I/O to SD card - if ((millis() - syncTime) >= SYNC_INTERVAL) { - syncTime = millis(); - if (!file.sync()) error("sync failed"); - } - // don't log two samples in same millisecond - if (m == millis()) delay(1); -} diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatAppend/SdFatAppend.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatAppend/SdFatAppend.pde deleted file mode 100755 index 47ed45c..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatAppend/SdFatAppend.pde +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Append Example - * - * This sketch shows how to use open for append and the Arduino Print class - * with SdFat. - */ -#include -#include // use functions to print strings from flash memory - -SdFat sd; - -SdFile file; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) -//------------------------------------------------------------------------------ -void setup(void) { - Serial.begin(9600); - Serial.println(); - PgmPrintln("Type any character to start"); - while (!Serial.available()); - - // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - - char name[] = "APPEND.TXT"; - PgmPrint("Appending to: "); - Serial.println(name); - - for (uint8_t i = 0; i < 100; i++) { - // O_CREAT - create the file if it does not exist - // O_APPEND - seek to the end of the file prior to each write - // O_WRITE - open for write - if (!file.open(name, O_CREAT | O_APPEND | O_WRITE)) { - error("open failed"); - } - // print 100 lines to file - for (uint8_t j = 0; j < 100; j++) { - file.print("line "); - file.print(j, DEC); - file.print(" of pass "); - file.print(i, DEC); - file.print(" millis = "); - file.println(millis()); - } - if (file.writeError) error("write failed"); - if (!file.close()) error("close failed"); - if (i > 0 && i%25 == 0) Serial.println(); - Serial.write('.'); - } - Serial.println(); - Serial.println("Done"); -} -void loop(void){} diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatBench/SdFatBench.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatBench/SdFatBench.pde deleted file mode 100755 index 2b03ed8..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatBench/SdFatBench.pde +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This sketch is a simple write/read benchmark. - */ -#include -#include - -#define FILE_SIZE_MB 5 -#define FILE_SIZE (1000000UL*FILE_SIZE_MB) -#define BUF_SIZE 100 - -uint8_t buf[BUF_SIZE]; - -SdFat sd; - -SdFile file; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) -//------------------------------------------------------------------------------ -void setup() { - Serial.begin(9600); - PgmPrintln("Type any character to start"); - while (!Serial.available()); - - PgmPrint("Free RAM: "); - Serial.println(FreeRam()); - - // initialize the SD card at SPI_FULL_SPEED for best performance. - // try SPI_HALF_SPEED if bus errors occur. - if (!sd.init(SPI_FULL_SPEED)) sd.initErrorHalt(); - - PgmPrint("Type is FAT"); - Serial.println(sd.vol()->fatType(), DEC); - - // open or create file - truncate existing file. - if (!file.open("BENCH.DAT", O_CREAT | O_TRUNC | O_RDWR)) { - error("open failed"); - } - - // fill buf with known data - for (uint16_t i = 0; i < (BUF_SIZE-2); i++) { - buf[i] = 'A' + (i % 26); - } - buf[BUF_SIZE-2] = '\r'; - buf[BUF_SIZE-1] = '\n'; - - PgmPrint("File size "); - Serial.print(FILE_SIZE_MB); - PgmPrintln(" MB"); - PgmPrintln("Starting write test. Please wait up to a minute"); - - // do write test - uint32_t n = FILE_SIZE/sizeof(buf); - uint32_t t = millis(); - for (uint32_t i = 0; i < n; i++) { - if (file.write(buf, sizeof(buf)) != sizeof(buf)) { - error("write failed"); - } - } - t = millis() - t; - file.sync(); - double r = (double)file.fileSize()/t; - PgmPrint("Write "); - Serial.print(r); - PgmPrintln(" KB/sec"); - Serial.println(); - PgmPrintln("Starting read test. Please wait up to a minute"); - - // do read test - file.rewind(); - t = millis(); - for (uint32_t i = 0; i < n; i++) { - if (file.read(buf, sizeof(buf)) != sizeof(buf)) { - error("read failed"); - } - } - t = millis() - t; - r = (double)file.fileSize()/t; - PgmPrint("Read "); - Serial.print(r); - PgmPrintln(" KB/sec"); - PgmPrintln("Done"); -} - -void loop() { } diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatCopy/SdFatCopy.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatCopy/SdFatCopy.pde deleted file mode 100755 index 8b55521..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatCopy/SdFatCopy.pde +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copy Example - only runs on chips with 2K or more RAM - * - * This sketch copies the file APPEND.TXT, created by the - * SdFatAppend.pde example, to the file ACOPY.TXT. - */ -#include -#include // use functions to print strings from flash memory - -// file system -SdFat sd; - -SdFile from; // read file -SdFile copy; // write file - -// large buffer to test for bugs. 512 bytes runs much faster. -char buf[600]; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) -//------------------------------------------------------------------------------ -void setup(void) { - Serial.begin(9600); - Serial.println(); - PgmPrintln("Type any character to start"); - while (!Serial.available()); - - PgmPrint("FreeRam: "); - Serial.println(FreeRam()); - - // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - - strcpy_P(buf, PSTR("APPEND.TXT")); - // open for read - if (!from.open(buf, O_READ)) { - PgmPrint("Can't open "); - Serial.println(buf); - PgmPrintln("Run the append example to create the file."); - error("from.open failed"); - } - strcpy_P(buf, PSTR("ACOPY.TXT")); - // create if needed, truncate to zero length, open for write - if (!copy.open(buf, O_CREAT | O_TRUNC | O_WRITE)) { - error("copy.open failed"); - } - // count for printing periods - uint16_t p = 0; - int16_t n; - while ((n = from.read(buf, sizeof(buf))) > 0) { - if (copy.write(buf, n) != n) error("write failed"); - // print progress periods - if (!(p++ % 25)) Serial.write('.'); - if (!(p % 500)) Serial.println(); - } - Serial.println(); - if (n != 0) error ("read"); - // force write of directory entry and last data - if (!copy.close()) error("copy.close failed"); - PgmPrintln("Copy done."); -} - -void loop(void) {} diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatGPSLogger_v3/SdFatGPSLogger_v3.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatGPSLogger_v3/SdFatGPSLogger_v3.pde deleted file mode 100755 index b4a79a4..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatGPSLogger_v3/SdFatGPSLogger_v3.pde +++ /dev/null @@ -1,326 +0,0 @@ -// Ladyada's logger modified by Bill Greiman to use the SdFat library - -// this is a generic logger that does checksum testing so the data written should be always good -// Assumes a sirf III chipset logger attached to pin 0 and 1 - -#include -#include -#include - -// macros to use PSTR -#define putstring(str) SerialPrint_P(PSTR(str)) -#define putstring_nl(str) SerialPrintln_P(PSTR(str)) - -// power saving modes -#define SLEEPDELAY 0 -#define TURNOFFGPS 0 -#define LOG_RMC_FIXONLY 1 - -SdFat sd; - -SdFile f; - -#define led1Pin 4 -#define led2Pin 3 -#define powerPin 2 - -#define BUFFSIZE 75 -char buffer[BUFFSIZE]; -uint8_t bufferidx = 0; -uint8_t fix = 0; // current fix data -uint8_t i; - -/* EXAMPLE - -$PSRF103,,,,*CKSUM - - 00=GGA,01=GLL,02=GSA,03=GSV,04=RMC,05=VTG - 00=SetRate,01=Query - Output every seconds, off=00,max=255 - 00=disable Checksum,01=Enable checksum for specified message -Note: checksum is required - -Example 1: Query the GGA message with checksum enabled -$PSRF103,00,01,00,01*25 - -Example 2: Enable VTG message for a 1Hz constant output with checksum enabled -$PSRF103,05,00,01,01*20 - -Example 3: Disable VTG message -$PSRF103,05,00,00,01*21 - -*/ - -#define SERIAL_SET "$PSRF100,01,4800,08,01,00*0E\r\n" - -// GGA-Global Positioning System Fixed Data, message 103,00 -#define LOG_GGA 0 -#define GGA_ON "$PSRF103,00,00,01,01*25\r\n" -#define GGA_OFF "$PSRF103,00,00,00,01*24\r\n" - -// GLL-Geographic Position-Latitude/Longitude, message 103,01 -#define LOG_GLL 0 -#define GLL_ON "$PSRF103,01,00,01,01*26\r\n" -#define GLL_OFF "$PSRF103,01,00,00,01*27\r\n" - -// GSA-GNSS DOP and Active Satellites, message 103,02 -#define LOG_GSA 0 -#define GSA_ON "$PSRF103,02,00,01,01*27\r\n" -#define GSA_OFF "$PSRF103,02,00,00,01*26\r\n" - -// GSV-GNSS Satellites in View, message 103,03 -#define LOG_GSV 0 -#define GSV_ON "$PSRF103,03,00,01,01*26\r\n" -#define GSV_OFF "$PSRF103,03,00,00,01*27\r\n" - -// RMC-Recommended Minimum Specific GNSS Data, message 103,04 -#define LOG_RMC 1 -#define RMC_ON "$PSRF103,04,00,01,01*21\r\n" -#define RMC_OFF "$PSRF103,04,00,00,01*20\r\n" - -// VTG-Course Over Ground and Ground Speed, message 103,05 -#define LOG_VTG 0 -#define VTG_ON "$PSRF103,05,00,01,01*20\r\n" -#define VTG_OFF "$PSRF103,05,00,00,01*21\r\n" - -// Switch Development Data Messages On/Off, message 105 -#define LOG_DDM 1 -#define DDM_ON "$PSRF105,01*3E\r\n" -#define DDM_OFF "$PSRF105,00*3F\r\n" - -#define USE_WAAS 0 // useful in US, but slower fix -#define WAAS_ON "$PSRF151,01*3F\r\n" // the command for turning on WAAS -#define WAAS_OFF "$PSRF151,00*3E\r\n" // the command for turning off WAAS - -// read a Hex value and return the decimal equivalent -uint8_t parseHex(char c) { - if (c < '0') - return 0; - if (c <= '9') - return c - '0'; - if (c < 'A') - return 0; - if (c <= 'F') - return (c - 'A')+10; -} - -// blink out an error code -void error(uint8_t errno) { - while(1) { - for (i=0; i -#include -#include - -#define isdigit(x) ( x >= '0' && x <= '9') - -//extern uint16_t _end; - -SdFat sd; - -SdFile f; - -#define led1Pin 4 // LED1 connected to digital pin 4 -#define led2Pin 3 // LED2 connected to digital pin 3 -#define powerpin 2 // GPS power control - -// set the RX_BUFFER_SIZE to 32! -#define BUFFSIZE 73 // we buffer one NMEA sentence at a time, 83 bytes is longer than the max length -char buffer[BUFFSIZE]; // this is the double buffer -char buffer2[12]; - -uint8_t bufferidx = 0; -uint32_t tmp; -#define LOG_RMC 1 // essential location data -#define RMC_ON "$PSRF103,4,0,1,1*21\r\n" // the command we send to turn RMC on (1 hz rate) -#define RMC_OFF "$PSRF103,4,0,0,1*20\r\n" // the command we send to turn RMC off - -#define LOG_GGA 0 // contains fix, hdop & vdop data -#define GGA_ON "$PSRF103,0,0,1,1*25\r\n" // the command we send to turn GGA on (1 hz rate) -#define GGA_OFF "$PSRF103,0,0,0,1*24\r\n" // the command we send to turn GGA off - -#define LOG_GSA 0 // satellite data -#define GSA_ON "$PSRF103,2,0,1,1*27\r\n" // the command we send to turn GSA on (1 hz rate) -#define GSA_OFF "$PSRF103,2,0,0,1*26\r\n" // the command we send to turn GSA off - -#define LOG_GSV 0 // detailed satellite data -#define GSV_ON "$PSRF103,3,0,1,1*26\r\n" // the command we send to turn GSV on (1 hz rate) -#define GSV_OFF "$PSRF103,3,0,0,1*27\r\n" // the command we send to turn GSV off - -#define LOG_GLL 0 // Loran-compatibility data -// this isnt output by default - -#define USE_WAAS 1 // useful in US, but slower fix -#define WAAS_ON "$PSRF151,1*3F\r\n" // the command for turning on WAAS -#define WAAS_OFF "$PSRF151,0*3E\r\n" // the command for turning off WAAS - -#define LOG_RMC_FIXONLY 1 // log only when we get RMC's with fix? -uint8_t fix = 0; // current fix data - -// macros to use PSTR -#define putstring(str) SerialPrint_P(PSTR(str)) -#define putstring_nl(str) SerialPrintln_P(PSTR(str)) - -// read a Hex value and return the decimal equivalent -uint8_t parseHex(char c) { - if (c < '0') - return 0; - if (c <= '9') - return c - '0'; - if (c < 'A') - return 0; - if (c <= 'F') - return (c - 'A')+10; -} - -uint8_t i; - -// blink out an error code -void error(uint8_t errno) { - while(1) { - for (i=0; i 6) sensorCount = 6; - strncpy_P(buffer, PSTR("time,lat,long,speed,date,sens0,sens1,sens2,sens3,sens4,sens5"), 24 + 6*sensorCount); - Serial.println(buffer); - - f.println(buffer); - if (f.writeError || !f.sync()) { - putstring_nl("can't write header!"); - error(3); - } - - delay(1000); - - putstring("\r\n"); -#if USE_WAAS == 1 - putstring(WAAS_ON); // turn on WAAS -#else - putstring(WAAS_OFF); // turn on WAAS -#endif - -#if LOG_RMC == 1 - putstring(RMC_ON); // turn on RMC -#else - putstring(RMC_OFF); // turn off RMC -#endif - -#if LOG_GSV == 1 - putstring(GSV_ON); // turn on GSV -#else - putstring(GSV_OFF); // turn off GSV -#endif - -#if LOG_GSA == 1 - putstring(GSA_ON); // turn on GSA -#else - putstring(GSA_OFF); // turn off GSA -#endif - -#if LOG_GGA == 1 - putstring(GGA_ON); // turn on GGA -#else - putstring(GGA_OFF); // turn off GGA -#endif -} - -void loop() { // run over and over again - - //Serial.println(Serial.available(), DEC); - char c; - uint8_t sum; - - // read one 'line' - if (Serial.available()) { - c = Serial.read(); - //Serial.write(c); - if (bufferidx == 0) { - while (c != '$') - c = Serial.read(); // wait till we get a $ - } - buffer[bufferidx] = c; - - //Serial.write(c); - if (c == '\n') { - //putstring_nl("EOL"); - //Serial.print(buffer); - buffer[bufferidx+1] = 0; // terminate it - - if (buffer[bufferidx-4] != '*') { - // no checksum? - Serial.write('*'); - bufferidx = 0; - return; - } - // get checksum - sum = parseHex(buffer[bufferidx-3]) * 16; - sum += parseHex(buffer[bufferidx-2]); - - // check checksum - for (i=1; i < (bufferidx-4); i++) { - sum ^= buffer[i]; - } - if (sum != 0) { - //putstring_nl("Cxsum mismatch"); - Serial.write('~'); - bufferidx = 0; - return; - } - // got good data! - - if (strstr(buffer, "GPRMC")) { - // find out if we got a fix - char *p = buffer; - p = strchr(p, ',')+1; - p = strchr(p, ',')+1; // skip to 3rd item - - if (p[0] == 'V') { - digitalWrite(led1Pin, LOW); - fix = 0; - } else { - digitalWrite(led1Pin, HIGH); - fix = 1; - } - } else { - // not GPRMC - bufferidx = 0; - return; - } -#if LOG_RMC_FIXONLY - if (!fix) { - Serial.write('_'); - bufferidx = 0; - return; - } -#endif - // rad. lets print it! - - Serial.print(buffer); - - // time to clean up the string - // find time - char *p = buffer; - p = strchr(p, ',')+1; - buffer[0] = p[0]; - buffer[1] = p[1]; - buffer[2] = ':'; - buffer[3] = p[2]; - buffer[4] = p[3]; - buffer[5] = ':'; - buffer[6] = p[4]; - buffer[7] = p[5]; - // we ignore milliseconds - buffer[8] = ','; - - p = strchr(buffer+8, ',')+1; - // skip past 'active' flag - p = strchr(p, ',')+1; - // find lat - p = strchr(p, ',')+1; - - buffer[9] = '+'; - buffer[10] = p[0]; - buffer[11] = p[1]; - buffer[12] = ' '; - strncpy(buffer+13, p+2, 7); - buffer[20] = ','; - - p = strchr(buffer+21, ',')+1; - if (p[0] == 'S') - buffer[9] = '-'; - - // find long - p = strchr(p, ',')+1; - buffer[21] = '+'; - buffer[22] = p[0]; - buffer[23] = p[1]; - buffer[24] = p[2]; - buffer[25] = ' '; - strncpy(buffer+26, p+3, 7); - buffer[33] = ','; - - p = strchr(buffer+34, ',')+1; - if (p[0] == 'W') - buffer[21] = '-'; - - // find speed - p = strchr(p, ',')+1; - tmp = 0; - if (p[0] != ',') { - // ok there is some sort of speed - while (p[0] != '.' && p[0] != ',') { - tmp *= 10; - tmp += p[0] - '0'; - p++; - } - tmp *= 10; - if (isdigit(p[1])) - tmp += p[1] - '0'; // tenths - tmp *= 10; - if (isdigit(p[2])) - tmp += p[2] - '0'; // hundredths - - // tmp is knots * 100 - // convert to mph (1.15 mph = 1 knot) - tmp *= 115; - // -OR- convert km/h - // tmp *= 185 - } - tmp /= 100; - - buffer[34] = (tmp / 10000) + '0'; - tmp %= 10000; - buffer[35] = (tmp / 1000) + '0'; - tmp %= 1000; - buffer[36] = (tmp / 100) + '0'; - tmp %= 100; - buffer[37] = '.'; - buffer[38] = (tmp / 10) + '0'; - tmp %= 10; - buffer[39] = tmp + '0'; - - buffer[40] = ','; - p = strchr(p, ',')+1; - // skip past bearing - p = strchr(p, ',')+1; - //mod for bug when speed,bearing are missing (bill greiman) - uint8_t date[6]; - for (uint8_t id = 0; id < 6; id++) date[id] = p[id]; - // get date into 2001-01-31 style - buffer[41] = '2'; - buffer[42] = '0'; - buffer[43] = date[4]; - buffer[44] = date[5]; - buffer[45] = '-'; - buffer[46] = date[2]; - buffer[47] = date[3]; - buffer[48] = '-'; - buffer[49] = date[0]; - buffer[50] = date[1]; - buffer[51] = 0; - digitalWrite(led2Pin, HIGH); - if(f.write((uint8_t *) buffer, 51) != 51) { - putstring_nl("can't write fix!"); - return; - } - Serial.print(buffer); - - // add sensor data - for (uint8_t ia = 0; ia < sensorCount; ia++) { - Serial.write(','); - f.write(','); - uint16_t data = analogRead(ia); - Serial.print(data); - f.print(data); - } - Serial.println(); - f.println(); - if (f.writeError || !f.sync()) { - putstring_nl("can't write data!"); - error(4); - } - digitalWrite(led2Pin, LOW); - bufferidx = 0; - return; - } - bufferidx++; - if (bufferidx == BUFFSIZE-1) { - Serial.write('!'); - bufferidx = 0; - } - } -} - diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatLs/SdFatLs.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatLs/SdFatLs.pde deleted file mode 100755 index a12c0af..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatLs/SdFatLs.pde +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This sketch will list all files in the root directory and - * then do a recursive list of all directories on the SD card. - * - */ -#include -#include - -SdFat sd; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) - - -void setup() { - Serial.begin(9600); - PgmPrintln("Type any character to start"); - while (!Serial.available()); - - PgmPrint("Free RAM: "); - Serial.println(FreeRam()); - - // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - - PgmPrint("Volume is FAT"); - Serial.println(sd.vol()->fatType(), DEC); - Serial.println(); - - // list file in root with date and size - PgmPrintln("Files found in root:"); - sd.ls(LS_DATE | LS_SIZE); - Serial.println(); - - // Recursive list of all directories - PgmPrintln("Files found in all dirs:"); - sd.ls(LS_R); - - Serial.println(); - PgmPrintln("Done"); -} - -void loop() { } diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatPrint/SdFatPrint.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatPrint/SdFatPrint.pde deleted file mode 100755 index f91f9d8..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatPrint/SdFatPrint.pde +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Print Example - * - * This sketch shows how to use the Arduino Print class with SdFat. - */ -#include -#include // use functions to print strings from flash memory - -SdFat sd; - -SdFile file; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) - -void setup(void) { - Serial.begin(9600); - Serial.println(); - PgmPrintln("Type any character to start"); - while (!Serial.available()); - - // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - - // create a new file - char name[] = "PRINT00.TXT"; - for (uint8_t i = 0; i < 100; i++) { - name[5] = i/10 + '0'; - name[6] = i%10 + '0'; - // only create new file for write - if (file.open(name, O_CREAT | O_EXCL | O_WRITE)) break; - } - if (!file.isOpen()) error ("file.create"); - PgmPrintln("Printing to: "); - Serial.println(name); - - // print 100 line to file - for (uint8_t i = 0; i < 100; i++) { - file.print("line "); - file.print(i, DEC); - file.print(" millis = "); - file.println(millis()); - } - // force write of all data to the SD card - if (file.writeError || !file.sync()) error ("print or sync"); - PgmPrintln("Done"); -} -void loop(void){} diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatRead/SdFatRead.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatRead/SdFatRead.pde deleted file mode 100755 index 8268caf..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatRead/SdFatRead.pde +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This sketch reads and prints the file - * PRINT00.TXT created by SdFatPrint.pde or - * WRITE00.TXT created by SdFatWrite.pde - */ -#include - -SdFat sd; - -SdFile file; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) - -void setup(void) { - Serial.begin(9600); - Serial.println(); - Serial.println("type any character to start"); - while (!Serial.available()); - Serial.println(); - - // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - - // open a file - if (file.open("PRINT00.TXT", O_READ)) { - Serial.println("Opened PRINT00.TXT"); - } - else if (file.open("WRITE00.TXT", O_READ)) { - Serial.println("Opened WRITE00.TXT"); - } - else{ - error("file.open failed"); - } - Serial.println(); - - // copy file to serial port - int16_t n; - uint8_t buf[7];// nothing special about 7, just a lucky number. - while ((n = file.read(buf, sizeof(buf))) > 0) { - for (uint8_t i = 0; i < n; i++) Serial.write(buf[i]); - } - /* easier way - int16_t c; - while ((c = file.read()) > 0) Serial.write((char)c); - */ - Serial.println("\nDone"); -} - -void loop(void) {} diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatRemove/SdFatRemove.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatRemove/SdFatRemove.pde deleted file mode 100755 index 983ac4d..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatRemove/SdFatRemove.pde +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Remove Example - * - * This sketch shows how to use remove() to delete - * the file created by the SdFatAppend.pde example. - */ -#include -#include // use functions to print strings from flash memory - -SdFat sd; - -SdFile file; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) - -void setup(void) { - Serial.begin(9600); - Serial.println(); - PgmPrintln("Type any character to start"); - while (!Serial.available()); - - // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - - char name[] = "APPEND.TXT"; - if (!file.open(name, O_WRITE)) { - PgmPrint("Can't open "); - Serial.println(name); - PgmPrintln("Run the append example to create the file."); - error("file.open failed"); - } - if (!file.remove()) error("file.remove failed"); - Serial.print(name); - PgmPrintln(" deleted."); -} - -void loop(void) {} diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatRewrite/SdFatRewrite.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatRewrite/SdFatRewrite.pde deleted file mode 100755 index b7402b4..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatRewrite/SdFatRewrite.pde +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Rewrite Example - * - * This sketch shows how to rewrite part of a line in the middle - * of the file created by the SdFatAppend.pde example. - * - * Check around line 30 of pass 50 of APPEND.TXT after running this sketch. - */ -#include -#include // use functions to print strings from flash memory - -SdFat sd; - -SdFile file; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) - -void setup(void) { - Serial.begin(9600); - Serial.println(); - PgmPrintln("Type any character to start"); - while (!Serial.available()); - - // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - - char name[] = "APPEND.TXT"; - // open for read and write - if (!file.open(name, O_RDWR)) { - PgmPrint("Can't open "); - Serial.println(name); - PgmPrintln("Run the append example to create the file."); - error("file.open failed"); - } - // seek to middle of file - if (!file.seekSet(file.fileSize()/2)) error("file.seekSet failed"); - // find end of line - int16_t c; - while ((c = file.read()) > 0 && c != '\n'); - if (c < 0) error("file.read failed"); - // clear write error flag - file.writeError = false; - // rewrite the begining of the line at the current position - file.write("**rewrite**"); - if (file.writeError) error("file.write failed"); - if (!file.close()) error("file.close failed"); - Serial.print(name); - PgmPrintln(" rewrite done."); -} - -void loop(void) {} diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatTail/SdFatTail.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatTail/SdFatTail.pde deleted file mode 100755 index 99cf5bf..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatTail/SdFatTail.pde +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This sketch reads and prints the tail of all files - * created by SdFatAppend.pde, SdFatPrint.pde, and - * SdFatWrite.pde. - */ -#include - -SdFat sd; - -SdFile file; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) - -void setup(void) { - Serial.begin(9600); - Serial.println(); - Serial.println("type any character to start"); - while (!Serial.available()); - Serial.println(); - - // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - - // start at beginning of root directory - sd.vwd()->rewind(); -} -/* - * Print tail of all SdFat example files - */ -void loop(void) { - dir_t dir; - char name[13]; - - // read next directory entry in current working directory - if (sd.vwd()->readDir(&dir) != sizeof(dir)) { - Serial.println("End of Directory"); - while(1); - } - - // check for file name "APPEND.TXT", "PRINT*.TXT" - // or "WRITE*.TXT" - // first 8 bytes are blank filled name - // last three bytes are blank filled extension - if ((strncmp((char *)dir.name, "APPEND ", 8) && - strncmp((char *)dir.name, "PRINT", 5) && - strncmp((char *)dir.name, "WRITE", 5)) || - strncmp((char *)&dir.name[8], "TXT", 3)) { - return; - } - // format file name - SdFile::dirName(dir, name); - - // remember position in directory - uint32_t pos = sd.vwd()->curPosition(); - - // open file - if (!file.open(name, O_READ)) error("file.open failed"); - - // restore root position - if (!sd.vwd()->seekSet(pos)) error("seekSet failed"); - - // print file name message - Serial.print("Tail of: "); - Serial.println(name); - - // position to tail of file - if (file.fileSize() > 100) { - if (!file.seekSet(file.fileSize() - 100)) error("file.seekSet failed"); - } - int16_t c; - // find end of line - while ((c = file.read()) > 0 && c != '\n'); - - // print rest of file - while ((c = file.read()) > 0) Serial.write((char)c); - file.close(); - Serial.println(); -} diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatTruncate/SdFatTruncate.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatTruncate/SdFatTruncate.pde deleted file mode 100755 index 6396fa8..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatTruncate/SdFatTruncate.pde +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Truncate Example - * - * This sketch shows how to use truncate() to remove the last - * half of the file created by the SdFatAppend.pde example. - */ -#include -#include // use functions to print strings from flash memory - -SdFat sd; - -SdFile file; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) - -void setup(void) { - Serial.begin(9600); - Serial.println(); - PgmPrintln("Type any character to start"); - while (!Serial.available()); - - // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - - char name[] = "APPEND.TXT"; - // open for read and write - if (!file.open(name, O_RDWR)) { - PgmPrint("Can't open "); - Serial.println(name); - PgmPrintln("Run the append example to create the file."); - error("file.open failed"); - } - // seek to middle of file - if (!file.seekSet(file.fileSize()/2)) error("file.seekSet failed"); - // find end of line - int16_t c; - while ((c = file.read()) > 0 && c != '\n'); - if (c < 0) error("file.read failed"); - // truncate at current position - if (!file.truncate(file.curPosition())) error("file.truncate failed"); - Serial.print(name); - PgmPrintln(" truncated."); -} - -void loop(void) {} diff --git a/libs/SdFatBeta20120108/extra/examplesV1/SdFatWrite/SdFatWrite.pde b/libs/SdFatBeta20120108/extra/examplesV1/SdFatWrite/SdFatWrite.pde deleted file mode 100755 index f24c2d1..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/SdFatWrite/SdFatWrite.pde +++ /dev/null @@ -1,81 +0,0 @@ -// This example is really out of date so best to ignore it -// It is still here to create files for other tests. -/* - * Write Example - * - * This sketch creates a new file and writes 100 lines to the file. - * No error checks on write in this example. - */ - -#include - -SdFat sd; - -SdFile file; - -// store error strings in flash to save RAM -#define error(s) sd.errorHalt_P(PSTR(s)) - -/* - * Write CR LF to a file - */ -void writeCRLF(SdFile& f) { - f.write((uint8_t*)"\r\n", 2); -} -/* - * Write an unsigned number to a file - */ -void writeNumber(SdFile& f, uint32_t n) { - uint8_t buf[10]; - uint8_t i = 0; - do { - i++; - buf[sizeof(buf) - i] = n % 10 + '0'; - n /= 10; - } while (n); - f.write(&buf[sizeof(buf) - i], i); -} -/* - * Write a string to a file - */ -void writeString(SdFile& f, char *str) { - uint8_t n; - for (n = 0; str[n]; n++); - f.write((uint8_t *)str, n); -} - -void setup(void) { - Serial.begin(9600); - Serial.println(); - Serial.println("Type any character to start"); - while (!Serial.available()); - - // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with - // breadboards. use SPI_FULL_SPEED for better performance. - if (!sd.init(SPI_HALF_SPEED)) sd.initErrorHalt(); - - // create a new file - char name[] = "WRITE00.TXT"; - for (uint8_t i = 0; i < 100; i++) { - name[5] = i/10 + '0'; - name[6] = i%10 + '0'; - if (file.open(name, O_CREAT | O_EXCL | O_WRITE)) break; - } - if (!file.isOpen()) error ("file.create"); - Serial.print("Writing to: "); - Serial.println(name); - - // write 100 line to file - for (uint8_t i = 0; i < 100; i++) { - writeString(file, "line "); - writeNumber(file, i); - writeString(file, " millis = "); - writeNumber(file, millis()); - writeCRLF(file); - } - // close file and force write of all data to the SD card - file.close(); - Serial.println("Done"); -} - -void loop(void) {} diff --git a/libs/SdFatBeta20120108/extra/examplesV1/V1readme.txt b/libs/SdFatBeta20120108/extra/examplesV1/V1readme.txt deleted file mode 100755 index bc1d973..0000000 --- a/libs/SdFatBeta20120108/extra/examplesV1/V1readme.txt +++ /dev/null @@ -1,60 +0,0 @@ -These are examples from SdFat V1. - - -These examples have been simplified by using new features of SdFat. - - -SdFatAnalogLogger.pde - A simple data logger for one or more analog - pins. - -SdFatAppend.pde - This sketch creates a large file by successive - open/write/close operations using O_APPEND. - -SdFatBench.pde - A read/write benchmark. - -SdFatCopy.pde - Copy the file created by SdFatAppend.pde to the file - ACOPY.TXT. - -SdFatGPS_CSVSensorLogger.pde - Ladyada's GPS logger modified to use the - SdFat library. - -SdFatGPSLogger_v3.pde - Ladyada's GPS logger modified to use the SdFat - library. - -SdFatLs.pde - A test of the ls() file list function. - -SdFatMakeDir.pde - A debug sketch to verify subdirectory creation and - access. - -SdFatPrint.pde - This sketch shows how to use the Arduino Print class - with SdFat. - -SdFatRawWrite.pde - A test of raw write functions for contiguous files. - -SdFatRead.pde - This sketch reads and prints the file PRINT00.TXT - created by SdFatPrint.pde or WRITE00.TXT created by - SdFatWrite.pde. - -SdFatRemove.pde - This sketch shows how to use remove() to delete the - file created by the SdFatAppend.pde example. - -SdFatRewrite.pde - This sketch shows how to rewrite part of a line in - the middle of the file created by the - SdFatAppend.pde example. - -SdFatRmDir.pde - A sketch to test file and directory deletion. - - -SdFatTail.pde - This sketch reads and prints the tail of all files - created by SdFatAppend.pde, SdFatPrint.pde, and - SdFatWrite.pde. - -SdFAtTimestamp.pde - This sketch shows how to set file access, create, - and write/modify timestamps. - -SdFatTruncate.pde - This sketch shows how to use truncate() to remove - the last half of the file created by the - SdFatAppend.pde example. - -SdFatWrite.pde - This sketch creates a new file and writes 100 lines - to the file. diff --git a/libs/SdFatBeta20120108/extra/extra.txt b/libs/SdFatBeta20120108/extra/extra.txt deleted file mode 100755 index 961a74a..0000000 --- a/libs/SdFatBeta20120108/extra/extra.txt +++ /dev/null @@ -1,7 +0,0 @@ -examplesV1 - Examples from earlier versions of SdFat. - -FridgeLogger - Example versions of Adafruit light temperature logger - -makePinInclude - Sketch used to make Sd2PinMap.h - -SdFatTestSuite - Development tests. \ No newline at end of file diff --git a/libs/SdFatBeta20120108/extra/makePinInclude/makePinInclude.pde b/libs/SdFatBeta20120108/extra/makePinInclude/makePinInclude.pde deleted file mode 100755 index 7911085..0000000 --- a/libs/SdFatBeta20120108/extra/makePinInclude/makePinInclude.pde +++ /dev/null @@ -1,353 +0,0 @@ -#include -#include -SdFat sd; -SdFile file; -#define INCLUDE_GUARD "Sd2PinMap_h" -//------------------------------------------------------------------------------ -// 168 - 328 Arduino -uint8_t i2c328[] = { - 18, // SDA - 19 // SCL -}; -uint8_t spi328[] = { - 10, // SS - 11, // MOSI - 12, // MISO - 13 // SCK -}; -char pins328[][3] PROGMEM = { - // 0 1 2 3 4 5 6 7 8 9 - "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", "B0", "B1", // 0 - 9 - "B2", "B3", "B4", "B5", "C0", "C1", "C2", "C3", "C4", "C5" // 10 - 19 -}; -uint8_t const nPin328 = sizeof(pins328)/sizeof(char[3]); -//------------------------------------------------------------------------------ -// Mega Arduino -uint8_t i2c1280[] = { - 20, // SDA - 21 // SCL -}; -uint8_t spi1280[] = { - 53, // SS - 51, // MOSI - 50, // MISO - 52 // SCK -}; -char pins1280[][3] PROGMEM = { -// 0 1 2 3 4 5 6 7 8 9 - "E0", "E1", "E4", "E5", "G5", "E3", "H3", "H4", "H5", "H6", // 0 - 9 - "B4", "B5", "B6", "B7", "J1", "J0", "H1", "H0", "D3", "D2", // 10 - 19 - "D1", "D0", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", // 20 - 29 - "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0", "D7", "G2", // 30 - 39 - "G1", "G0", "L7", "L6", "L5", "L4", "L3", "L2", "L1", "L0", // 40 - 49 - "B3", "B2", "B1", "B0", "F0", "F1", "F2", "F3", "F4", "F5", // 50 - 59 - "F6", "F7", "K0", "K1", "K2", "K3", "K4", "K5", "K6", "K7", // 60 - 69 -}; -uint8_t const nPin1280 = sizeof(pins1280)/sizeof(char[3]); -//------------------------------------------------------------------------------ -// Sanguino -uint8_t i2c644[] = { - 17, // SDA - 18 // SCL -}; -uint8_t spi644[] = { - 4, // SS - 5, // MOSI - 6, // MISO - 7 // SCK -}; -char pins644[][3] PROGMEM = { // -// 0 1 2 3 4 5 6 7 8 9 - "B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7", "D0", "D1", // 0 - 9 - "D2", "D3", "D4", "D5", "D6", "D7", "C0", "C1", "C2", "C3", // 10 - 19 - "C4", "C5", "C6", "C7", "A7", "A6", "A5", "A4", "A3", "A2", // 20 - 29 - "A1", "A0" // 30 - 31 -}; -uint8_t const nPin644 = sizeof(pins644)/sizeof(char[3]); -//------------------------------------------------------------------------------ -// Teensy 2.0 -uint8_t i2c32U4[] = { - 6, // SDA - 5 // SCL -}; -uint8_t spi32U4[] = { - 0, // SS - 2, // MOSI - 3, // MISO - 1 // SCK -}; -char pins32U4[][3] PROGMEM = { -// 0 1 2 3 4 5 6 7 8 9 - "B0", "B1", "B2", "B3", "B7", "D0", "D1", "D2", "D3", "C6", // 0 - 9 - "C7", "D6", "D7", "B4", "B5", "B6", "F7", "F6", "F5", "F4", // 10 - 19 - "F1", "F0", "D4", "D5", "E6" // 20 - 24 -}; -uint8_t const nPin32U4 = sizeof(pins32U4)/sizeof(char[3]); -//------------------------------------------------------------------------------ -// Teensy++ 1.0 & 2.0 -uint8_t i2c1286[] = { - 1, // SDA - 0 // SCL -}; -uint8_t spi1286[] = { - 20, // SS - 22, // MOSI - 23, // MISO - 21 // SCK -}; -char pins1286[][3] PROGMEM = { -// 0 1 2 3 4 5 6 7 8 9 - "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", "E0", "E1", // 0 - 9 - "C0", "C1", "C2", "C3", "C4", "C5", "C6", "C7", "E6", "E7", // 10 - 19 - "B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7", "A0", "A1", // 20 - 29 - "A2", "A3", "A4", "A5", "A6", "A7", "E4", "E5", "F0", "F1", // 30 - 39 - "F2", "F3", "F4", "F5", "F6", "F7" // 40 - 45 -}; -uint8_t const nPin1286 = sizeof(pins1286)/sizeof(char[3]); -//------------------------------------------------------------------------------ -#define print_P(stream, str) printPGM(stream, PSTR(str)) -#define println_P(stream, str) printlnPGM(stream, PSTR(str)) -//------------------------------------------------------------------------------ -void printPGM(Print* stream, PGM_P str) { - for (uint8_t c; (c = pgm_read_byte(str)); str++) stream->write(c); -} -//------------------------------------------------------------------------------ -void printlnPGM(Print* stream, PGM_P str) { - printPGM(stream, str); - stream->println(); -} -//------------------------------------------------------------------------------ -void printFunctions(Print* stream) { - print_P(stream, - "static const uint8_t digitalPinCount = sizeof(digitalPinMap)/sizeof(pin_map_t);\r\n" - "\r\n" - "uint8_t badPinNumber(void)\r\n" - " __attribute__((error(\"Pin number is too large or not a constant\")));\r\n" - "\r\n" - "static inline __attribute__((always_inline))\r\n" - " bool getPinMode(uint8_t pin) {\r\n" - " if (__builtin_constant_p(pin) && pin < digitalPinCount) {\r\n" - " return (*digitalPinMap[pin].ddr >> digitalPinMap[pin].bit) & 1;\r\n" - " } else {\r\n" - " return badPinNumber();\r\n" - " }\r\n" - "}\r\n" - "static inline __attribute__((always_inline))\r\n" - " void setPinMode(uint8_t pin, uint8_t mode) {\r\n" - " if (__builtin_constant_p(pin) && pin < digitalPinCount) {\r\n" - " if (mode) {\r\n" - " *digitalPinMap[pin].ddr |= 1 << digitalPinMap[pin].bit;\r\n" - " } else {\r\n" - " *digitalPinMap[pin].ddr &= ~(1 << digitalPinMap[pin].bit);\r\n" - " }\r\n" - " } else {\r\n" - " badPinNumber();\r\n" - " }\r\n" - "}\r\n" - "static inline __attribute__((always_inline))\r\n" - " bool fastDigitalRead(uint8_t pin) {\r\n" - " if (__builtin_constant_p(pin) && pin < digitalPinCount) {\r\n" - " return (*digitalPinMap[pin].pin >> digitalPinMap[pin].bit) & 1;\r\n" - " } else {\r\n" - " return badPinNumber();\r\n" - " }\r\n" - "}\r\n" - "static inline __attribute__((always_inline))\r\n" - " void fastDigitalWrite(uint8_t pin, uint8_t value) {\r\n" - " if (__builtin_constant_p(pin) && pin < digitalPinCount) {\r\n" - " if (value) {\r\n" - " *digitalPinMap[pin].port |= 1 << digitalPinMap[pin].bit;\r\n" - " } else {\r\n" - " *digitalPinMap[pin].port &= ~(1 << digitalPinMap[pin].bit);\r\n" - " }\r\n" - " } else {\r\n" - " badPinNumber();\r\n" - " }\r\n" - "}\r\n"); -} -//------------------------------------------------------------------------------ -void printGNU(Print* stream) { - println_P(stream, - "/* Arduino SdFat Library\r\n" - " * Copyright (C) 2010 by William Greiman\r\n" - " *\r\n" - " * This file is part of the Arduino SdFat Library\r\n" - " *\r\n" - " * This Library is free software: you can redistribute it and/or modify\r\n" - " * it under the terms of the GNU General Public License as published by\r\n" - " * the Free Software Foundation, either version 3 of the License, or\r\n" - " * (at your option) any later version.\r\n" - " *\r\n" - " * This Library is distributed in the hope that it will be useful,\r\n" - " * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n" - " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n" - " * GNU General Public License for more details.\r\n" - " *\r\n" - " * You should have received a copy of the GNU General Public License\r\n" - " * along with the Arduino SdFat Library. If not, see\r\n" - " * .\r\n" - " */\r\n" - "// Warning this file was generated by a program."); -} -//---------------------------------------------------------------- -void printMap(Print* stream, char (*list)[3], uint8_t nPin) { - println_P(stream, "static const pin_map_t digitalPinMap[] = {"); - for (uint8_t i = 0; i < nPin; i++) { - char cPort = pgm_read_byte(&list[i][0]); - char cBit = pgm_read_byte(&list[i][1]); - print_P(stream, " {&DDR"); - stream->write(cPort); - print_P(stream, ", &PIN"); - stream->write(cPort); - print_P(stream, ", &PORT"); - stream->write(cPort); - print_P(stream, ", "); - stream->write(cBit); - if ((i+1) != nPin) { - print_P(stream, "}, // "); - } else { - print_P(stream, "} // "); - } - stream->write(cPort); - stream->write(cBit); - stream->write(' '); - if (i < 10) stream->write(' '); - stream->println(i, DEC); - } - println_P(stream, "};"); -} -//------------------------------------------------------------------------------ -void printLine(Print* stream) { - print_P(stream, "//"); - for (uint8_t i = 0; i < 78; i++) stream->write('-'); - stream->println(); -} -//------------------------------------------------------------------------------ -void printI2C(Print* stream, char (*list)[3], uint8_t* i2c) { - println_P(stream, "// Two Wire (aka I2C) ports"); - print_P(stream, "uint8_t const SDA_PIN = "); - stream->print(i2c[0], DEC); - print_P(stream, "; // "); - printlnPGM(stream, list[i2c[0]]); - print_P(stream, "uint8_t const SCL_PIN = "); - stream->print(i2c[1], DEC); - print_P(stream, "; // "); - printlnPGM(stream, list[i2c[1]]); - stream->println(); -} -//------------------------------------------------------------------------------ -void printSPI(Print* stream, char (*list)[3], uint8_t* spi) { - println_P(stream, "// SPI port"); - print_P(stream, "uint8_t const SS_PIN = "); - stream->print(spi[0], DEC); - print_P(stream, "; // "); - printlnPGM(stream, list[spi[0]]); - print_P(stream, "uint8_t const MOSI_PIN = "); - stream->print(spi[1], DEC); - print_P(stream, "; // "); - printlnPGM(stream, list[spi[1]]); - print_P(stream, "uint8_t const MISO_PIN = "); - stream->print(spi[2], DEC); - print_P(stream, "; // "); - printlnPGM(stream, list[spi[2]]); - print_P(stream, "uint8_t const SCK_PIN = "); - stream->print(spi[3], DEC); - print_P(stream, "; // "); - printlnPGM(stream, list[spi[3]]); - stream->println(); -} -//----------------------------------------------- -void printType(Print* stream) { - printLine(stream); - print_P(stream, - "/** struct for mapping digital pins */\r\n" - "struct pin_map_t {\r\n" - " volatile uint8_t* ddr;\r\n" - " volatile uint8_t* pin;\r\n" - " volatile uint8_t* port;\r\n" - " uint8_t bit;\r\n" - "};\r\n"); -} -//------------------------------------------------------------------------------ -void printSection(Print* stream, uint8_t* i2c, - uint8_t* spi, char (*list)[3], uint8_t digitalPinCount) { - stream->println(); - printI2C(stream, list, i2c); - printSPI(stream, list, spi); - printMap(stream, list, digitalPinCount); -} -//------------------------------------------------------------------------------ -void printFile(Print* stream) { - printGNU(stream); - println_P(stream, "#ifndef " INCLUDE_GUARD); - println_P(stream, "#define " INCLUDE_GUARD); - println_P(stream, "#include "); - - printType(stream); - printLine(stream); - print_P(stream, - "#if defined(__AVR_ATmega1280__)\\\r\n" - "|| defined(__AVR_ATmega2560__)\r\n"); - println_P(stream, "// Mega"); - printSection(stream, i2c1280, spi1280, pins1280, nPin1280); - - printLine(stream); - print_P(stream, - "#elif defined(__AVR_ATmega644P__)\\\r\n" - "|| defined(__AVR_ATmega644__)\\\r\n" - "|| defined(__AVR_ATmega1284P__)\r\n"); - println_P(stream, "// Sanguino"); - printSection(stream, i2c644, spi644, pins644, nPin644); - - printLine(stream); - println_P(stream, "#elif defined(__AVR_ATmega32U4__)"); - println_P(stream, "// Teensy 2.0"); - printSection(stream, i2c32U4, spi32U4, pins32U4, nPin32U4); - - printLine(stream); - print_P(stream, - "#elif defined(__AVR_AT90USB646__)\\\r\n" - "|| defined(__AVR_AT90USB1286__)\r\n"); - println_P(stream, "// Teensy++ 1.0 & 2.0"); - printSection(stream, i2c1286, spi1286, pins1286, nPin1286); - - printLine(stream); - print_P(stream, - "#elif defined(__AVR_ATmega168__)\\\r\n" - "||defined(__AVR_ATmega168P__)\\\r\n" - "||defined(__AVR_ATmega328P__)\r\n"); - println_P(stream, "// 168 and 328 Arduinos"); - printSection(stream, i2c328, spi328, pins328, nPin328); - - print_P(stream, - "#else // defined(__AVR_ATmega1280__)\r\n" - "#error unknown chip\r\n" - "#endif // defined(__AVR_ATmega1280__)\r\n"); - printLine(stream); - printFunctions(stream); - println_P(stream, "#endif // " INCLUDE_GUARD); -} -//------------------------------------------------------------------------------ -#define error(x) errorPGM(PSTR(x)) -void errorPGM(PGM_P msg) { - print_P(&Serial, "Error: "); - printlnPGM(&Serial, msg); - while (1); -} -//------------------------------------------------------------------------------ -void setup(void) { - Serial.begin(9600); - Serial.println(FreeRam()); -// printFile(&Serial); - println_P(&Serial, "Type any character to make PIN_MAP.H"); - while (!Serial.available()); - if (!sd.init()) sd.initErrorHalt(); - if (!file.open("PIN_MAP.H", O_WRITE | O_CREAT | O_TRUNC)) { - error("file.open"); - } - printFile(&file); - file.close(); - println_P(&Serial, "Done"); -} -//------------------------------------------------------------------------------ -void loop(void) {} diff --git a/libs/SdFatBeta20120108/extra/makePinInclude/readme.txt b/libs/SdFatBeta20120108/extra/makePinInclude/readme.txt deleted file mode 100755 index c62f291..0000000 --- a/libs/SdFatBeta20120108/extra/makePinInclude/readme.txt +++ /dev/null @@ -1 +0,0 @@ -This sketch is used to make Sd2PinMap.h \ No newline at end of file diff --git a/libs/SdFatBeta20120108/html/_arduino_stream_8h.html b/libs/SdFatBeta20120108/html/_arduino_stream_8h.html deleted file mode 100755 index 6a30729..0000000 --- a/libs/SdFatBeta20120108/html/_arduino_stream_8h.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/ArduinoStream.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/ArduinoStream.h File Reference
-
-
- -

ArduinoInStream and ArduinoOutStream classes. -More...

-
#include <bufstream.h>
-
-Include dependency graph for ArduinoStream.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - - - -

-Classes

class  ArduinoInStream
 Input stream for Arduino Stream objects. More...
class  ArduinoOutStream
 Output stream for Arduino Print objects. More...
-

Detailed Description

-
- - - diff --git a/libs/SdFatBeta20120108/html/_arduino_stream_8h__dep__incl.png b/libs/SdFatBeta20120108/html/_arduino_stream_8h__dep__incl.png deleted file mode 100755 index ae149db..0000000 Binary files a/libs/SdFatBeta20120108/html/_arduino_stream_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_arduino_stream_8h__incl.png b/libs/SdFatBeta20120108/html/_arduino_stream_8h__incl.png deleted file mode 100755 index 3f1b8b6..0000000 Binary files a/libs/SdFatBeta20120108/html/_arduino_stream_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd2_card_8h.html b/libs/SdFatBeta20120108/html/_sd2_card_8h.html deleted file mode 100755 index 4eb69f8..0000000 --- a/libs/SdFatBeta20120108/html/_sd2_card_8h.html +++ /dev/null @@ -1,696 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/Sd2Card.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/Sd2Card.h File Reference
-
-
- -

Sd2Card class for V2 SD/SDHC cards. -More...

-
#include <SdFatConfig.h>
-#include <SdInfo.h>
-#include <Sd2PinMap.h>
-
-Include dependency graph for Sd2Card.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Classes

class  Sd2Card
 Raw access to SD and SDHC flash memory cards. More...

-Variables

uint8_t const SD_CARD_ERROR_ACMD23 = 0X9
uint8_t const SD_CARD_ERROR_ACMD41 = 0XA
uint8_t const SD_CARD_ERROR_BAD_CSD = 0XB
uint8_t const SD_CARD_ERROR_CMD0 = 0X1
uint8_t const SD_CARD_ERROR_CMD12 = 0X3
uint8_t const SD_CARD_ERROR_CMD17 = 0X4
uint8_t const SD_CARD_ERROR_CMD18 = 0X5
uint8_t const SD_CARD_ERROR_CMD24 = 0X6
uint8_t const SD_CARD_ERROR_CMD25 = 0X7
uint8_t const SD_CARD_ERROR_CMD58 = 0X8
uint8_t const SD_CARD_ERROR_CMD8 = 0X2
uint8_t const SD_CARD_ERROR_ERASE = 0XC
uint8_t const SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD
uint8_t const SD_CARD_ERROR_ERASE_TIMEOUT = 0XE
uint8_t const SD_CARD_ERROR_INIT_NOT_CALLED = 0X19
uint8_t const SD_CARD_ERROR_READ = 0XF
uint8_t const SD_CARD_ERROR_READ_REG = 0X10
uint8_t const SD_CARD_ERROR_READ_TIMEOUT = 0X11
uint8_t const SD_CARD_ERROR_SCK_RATE = 0X18
uint8_t const SD_CARD_ERROR_STOP_TRAN = 0X12
uint8_t const SD_CARD_ERROR_WRITE = 0X13
uint8_t const SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0X14
uint8_t const SD_CARD_ERROR_WRITE_MULTIPLE = 0X15
uint8_t const SD_CARD_ERROR_WRITE_PROGRAMMING = 0X16
uint8_t const SD_CARD_ERROR_WRITE_TIMEOUT = 0X17
uint8_t const SD_CARD_TYPE_SD1 = 1
uint8_t const SD_CARD_TYPE_SD2 = 2
uint8_t const SD_CARD_TYPE_SDHC = 3
uint8_t const SD_CHIP_SELECT_PIN = SS_PIN
uint16_t const SD_ERASE_TIMEOUT = 10000
uint16_t const SD_INIT_TIMEOUT = 2000
uint16_t const SD_READ_TIMEOUT = 300
uint16_t const SD_WRITE_TIMEOUT = 600
uint8_t const SPI_EIGHTH_SPEED = 3
uint8_t const SPI_FULL_SPEED = 0
uint8_t const SPI_HALF_SPEED = 1
uint8_t const SPI_MISO_PIN = MISO_PIN
uint8_t const SPI_MOSI_PIN = MOSI_PIN
uint8_t const SPI_QUARTER_SPEED = 2
uint8_t const SPI_SCK_PIN = SCK_PIN
uint8_t const SPI_SIXTEENTH_SPEED = 4
-

Detailed Description

-

Sd2Card class for V2 SD/SDHC cards.

-

Variable Documentation

- -
-
- - - - -
uint8_t const SD_CARD_ERROR_ACMD23 = 0X9
-
-
-

SET_WR_BLK_ERASE_COUNT failed

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_ACMD41 = 0XA
-
-
-

ACMD41 initialization process timeout

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_BAD_CSD = 0XB
-
-
-

card returned a bad CSR version field

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_CMD0 = 0X1
-
-
-

timeout error for command CMD0 (initialize card in SPI mode)

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_CMD12 = 0X3
-
-
-

card returned an error response for CMD12 (write stop)

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_CMD17 = 0X4
-
-
-

card returned an error response for CMD17 (read block)

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_CMD18 = 0X5
-
-
-

card returned an error response for CMD18 (read multiple block)

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_CMD24 = 0X6
-
-
-

card returned an error response for CMD24 (write block)

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_CMD25 = 0X7
-
-
-

WRITE_MULTIPLE_BLOCKS command failed

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_CMD58 = 0X8
-
-
-

card returned an error response for CMD58 (read OCR)

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_CMD8 = 0X2
-
-
-

CMD8 was not accepted - not a valid SD card

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_ERASE = 0XC
-
-
-

erase block group command failed

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD
-
-
-

card not capable of single block erase

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_ERASE_TIMEOUT = 0XE
-
-
-

Erase sequence timed out

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_INIT_NOT_CALLED = 0X19
-
-
-

init() not called

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_READ = 0XF
-
-
-

card returned an error token instead of read data

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_READ_REG = 0X10
-
-
-

read CID or CSD failed

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_READ_TIMEOUT = 0X11
-
-
-

timeout while waiting for start of read data

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_SCK_RATE = 0X18
-
-
-

incorrect rate selected

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_STOP_TRAN = 0X12
-
-
-

card did not accept STOP_TRAN_TOKEN

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_WRITE = 0X13
-
-
-

card returned an error token as a response to a write operation

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0X14
-
-
-

attempt to write protected block zero

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_WRITE_MULTIPLE = 0X15
-
-
-

card did not go ready for a multiple block write

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_WRITE_PROGRAMMING = 0X16
-
-
-

card returned an error to a CMD13 status check after a write

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_ERROR_WRITE_TIMEOUT = 0X17
-
-
-

timeout occurred during write programming

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_TYPE_SD1 = 1
-
-
-

Standard capacity V1 SD card

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_TYPE_SD2 = 2
-
-
-

Standard capacity V2 SD card

- -
-
- -
-
- - - - -
uint8_t const SD_CARD_TYPE_SDHC = 3
-
-
-

High Capacity SD card

- -
-
- -
-
- - - - -
uint8_t const SD_CHIP_SELECT_PIN = SS_PIN
-
-
-

define SOFTWARE_SPI to use bit-bang SPI The default chip select pin for the SD card is SS.

- -
-
- -
-
- - - - -
uint16_t const SD_ERASE_TIMEOUT = 10000
-
-
-

erase timeout ms

- -
-
- -
-
- - - - -
uint16_t const SD_INIT_TIMEOUT = 2000
-
-
-

init timeout ms

- -
-
- -
-
- - - - -
uint16_t const SD_READ_TIMEOUT = 300
-
-
-

read timeout ms

- -
-
- -
-
- - - - -
uint16_t const SD_WRITE_TIMEOUT = 600
-
-
-

write time out ms

- -
-
- -
-
- - - - -
uint8_t const SPI_EIGHTH_SPEED = 3
-
-
-

Set SCK rate to F_CPU/16. See Sd2Card::setSckRate().

- -
-
- -
-
- - - - -
uint8_t const SPI_FULL_SPEED = 0
-
-
-

Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate().

- -
-
- -
-
- - - - -
uint8_t const SPI_HALF_SPEED = 1
-
-
-

Set SCK rate to F_CPU/4. See Sd2Card::setSckRate().

- -
-
- -
-
- - - - -
uint8_t const SPI_MISO_PIN = MISO_PIN
-
-
-

SPI Master In Slave Out pin

- -
-
- -
-
- - - - -
uint8_t const SPI_MOSI_PIN = MOSI_PIN
-
-
-

SPI Master Out Slave In pin

- -
-
- -
-
- - - - -
uint8_t const SPI_QUARTER_SPEED = 2
-
-
-

Set SCK rate to F_CPU/8. See Sd2Card::setSckRate().

- -
-
- -
-
- - - - -
uint8_t const SPI_SCK_PIN = SCK_PIN
-
-
-

SPI Clock pin

- -
-
- -
-
- - - - -
uint8_t const SPI_SIXTEENTH_SPEED = 4
-
-
-

Set SCK rate to F_CPU/32. See Sd2Card::setSckRate().

- -
-
-
- - - diff --git a/libs/SdFatBeta20120108/html/_sd2_card_8h__dep__incl.png b/libs/SdFatBeta20120108/html/_sd2_card_8h__dep__incl.png deleted file mode 100755 index 586a59a..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd2_card_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd2_card_8h__incl.png b/libs/SdFatBeta20120108/html/_sd2_card_8h__incl.png deleted file mode 100755 index b5e7cbe..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd2_card_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_base_file_8h.html b/libs/SdFatBeta20120108/html/_sd_base_file_8h.html deleted file mode 100755 index 10bd151..0000000 --- a/libs/SdFatBeta20120108/html/_sd_base_file_8h.html +++ /dev/null @@ -1,722 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/SdBaseFile.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/SdBaseFile.h File Reference
-
-
- -

SdBaseFile class. -More...

-
#include <avr/pgmspace.h>
-#include <WProgram.h>
-#include <SdFatConfig.h>
-#include <SdVolume.h>
-
-Include dependency graph for SdBaseFile.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Classes

struct  fpos_t
 internal type for istream do not use in user apps More...
class  SdBaseFile
 Base class for SdFile with Print and C++ streams. More...

-Functions

static uint16_t FAT_DATE (uint16_t year, uint8_t month, uint8_t day)
static uint8_t FAT_DAY (uint16_t fatDate)
static uint8_t FAT_HOUR (uint16_t fatTime)
static uint8_t FAT_MINUTE (uint16_t fatTime)
static uint8_t FAT_MONTH (uint16_t fatDate)
static uint8_t FAT_SECOND (uint16_t fatTime)
static uint16_t FAT_TIME (uint8_t hour, uint8_t minute, uint8_t second)
static uint16_t FAT_YEAR (uint16_t fatDate)

-Variables

uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1
uint16_t const FAT_DEFAULT_TIME = (1 << 11)
uint8_t const FAT_FILE_TYPE_CLOSED = 0
uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED
uint8_t const FAT_FILE_TYPE_NORMAL = 1
uint8_t const FAT_FILE_TYPE_ROOT32 = 3
uint8_t const FAT_FILE_TYPE_ROOT_FIXED = 2
uint8_t const FAT_FILE_TYPE_SUBDIR = 4
uint8_t const LS_DATE = 1
uint8_t const LS_R = 4
uint8_t const LS_SIZE = 2
uint8_t const O_ACCMODE = (O_READ | O_WRITE)
uint8_t const O_APPEND = 0X04
uint8_t const O_AT_END = 0X20
uint8_t const O_CREAT = 0X40
uint8_t const O_EXCL = 0X80
uint8_t const O_RDONLY = O_READ
uint8_t const O_RDWR = (O_READ | O_WRITE)
uint8_t const O_READ = 0X01
uint8_t const O_SYNC = 0X08
uint8_t const O_TRUNC = 0X10
uint8_t const O_WRITE = 0X02
uint8_t const O_WRONLY = O_WRITE
uint8_t const T_ACCESS = 1
uint8_t const T_CREATE = 2
uint8_t const T_WRITE = 4
-

Detailed Description

-

SdBaseFile class.

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
static uint16_t FAT_DATE (uint16_t year,
uint8_t month,
uint8_t day 
) [inline, static]
-
-
-

date field for FAT directory entry

-
Parameters:
- - - - -
[in]year[1980,2107]
[in]month[1,12]
[in]day[1,31]
-
-
-
Returns:
Packed date for dir_t entry.
- -
-
- -
-
- - - - - - - - -
static uint8_t FAT_DAY (uint16_t fatDate) [inline, static]
-
-
-

day part of FAT directory date field

-
Parameters:
- - -
[in]fatDateDate in packed dir format.
-
-
-
Returns:
Extracted day [1,31]
- -
-
- -
-
- - - - - - - - -
static uint8_t FAT_HOUR (uint16_t fatTime) [inline, static]
-
-
-

hour part of FAT directory time field

-
Parameters:
- - -
[in]fatTimeTime in packed dir format.
-
-
-
Returns:
Extracted hour [0,23]
- -
-
- -
-
- - - - - - - - -
static uint8_t FAT_MINUTE (uint16_t fatTime) [inline, static]
-
-
-

minute part of FAT directory time field

-
Parameters:
- - -
[in]fatTimeTime in packed dir format.
-
-
-
Returns:
Extracted minute [0,59]
- -
-
- -
-
- - - - - - - - -
static uint8_t FAT_MONTH (uint16_t fatDate) [inline, static]
-
-
-

month part of FAT directory date field

-
Parameters:
- - -
[in]fatDateDate in packed dir format.
-
-
-
Returns:
Extracted month [1,12]
- -
-
- -
-
- - - - - - - - -
static uint8_t FAT_SECOND (uint16_t fatTime) [inline, static]
-
-
-

second part of FAT directory time field Note second/2 is stored in packed time.

-
Parameters:
- - -
[in]fatTimeTime in packed dir format.
-
-
-
Returns:
Extracted second [0,58]
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
static uint16_t FAT_TIME (uint8_t hour,
uint8_t minute,
uint8_t second 
) [inline, static]
-
-
-

time field for FAT directory entry

-
Parameters:
- - - - -
[in]hour[0,23]
[in]minute[0,59]
[in]second[0,59]
-
-
-
Returns:
Packed time for dir_t entry.
- -
-
- -
-
- - - - - - - - -
static uint16_t FAT_YEAR (uint16_t fatDate) [inline, static]
-
-
-

year part of FAT directory date field

-
Parameters:
- - -
[in]fatDateDate in packed dir format.
-
-
-
Returns:
Extracted year [1980,2107]
- -
-
-

Variable Documentation

- -
-
- - - - -
uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1
-
-
-

Default date for file timestamps is 1 Jan 2000

- -
-
- -
-
- - - - -
uint16_t const FAT_DEFAULT_TIME = (1 << 11)
-
-
-

Default time for file timestamp is 1 am

- -
-
- -
-
- - - - -
uint8_t const FAT_FILE_TYPE_CLOSED = 0
-
-
-

This file has not been opened.

- -
-
- -
-
- - - - -
uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED
-
-
-

Test value for directory type

- -
-
- -
-
- - - - -
uint8_t const FAT_FILE_TYPE_NORMAL = 1
-
-
-

A normal file

- -
-
- -
-
- - - - -
uint8_t const FAT_FILE_TYPE_ROOT32 = 3
-
-
-

A FAT32 root directory

- -
-
- -
-
- - - - -
uint8_t const FAT_FILE_TYPE_ROOT_FIXED = 2
-
-
-

A FAT12 or FAT16 root directory

- -
-
- -
-
- - - - -
uint8_t const FAT_FILE_TYPE_SUBDIR = 4
-
-
-

A subdirectory file

- -
-
- -
-
- - - - -
uint8_t const LS_DATE = 1
-
-
-

ls() flag to print modify date

- -
-
- -
-
- - - - -
uint8_t const LS_R = 4
-
-
-

ls() flag for recursive list of subdirectories

- -
-
- -
-
- - - - -
uint8_t const LS_SIZE = 2
-
-
-

ls() flag to print file size

- -
-
- -
-
- - - - -
uint8_t const O_ACCMODE = (O_READ | O_WRITE)
-
-
-

open() oflag mask for access modes

- -
-
- -
-
- - - - -
uint8_t const O_APPEND = 0X04
-
-
-

The file offset shall be set to the end of the file prior to each write.

- -
-
- -
-
- - - - -
uint8_t const O_AT_END = 0X20
-
-
-

set the initial position at the end of the file

- -
-
- -
-
- - - - -
uint8_t const O_CREAT = 0X40
-
-
-

create the file if nonexistent

- -
-
- -
-
- - - - -
uint8_t const O_EXCL = 0X80
-
-
-

If O_CREAT and O_EXCL are set, open() shall fail if the file exists

- -
-
- -
-
- - - - -
uint8_t const O_RDONLY = O_READ
-
-
-

open() oflag - same as O_IN

- -
-
- -
-
- - - - -
uint8_t const O_RDWR = (O_READ | O_WRITE)
-
-
-

open() oflag for reading and writing

- -
-
- -
-
- - - - -
uint8_t const O_READ = 0X01
-
-
-

open() oflag for reading

- -
-
- -
-
- - - - -
uint8_t const O_SYNC = 0X08
-
-
-

synchronous writes - call sync() after each write

- -
-
- -
-
- - - - -
uint8_t const O_TRUNC = 0X10
-
-
-

truncate the file to zero length

- -
-
- -
-
- - - - -
uint8_t const O_WRITE = 0X02
-
-
-

open() oflag for write

- -
-
- -
-
- - - - -
uint8_t const O_WRONLY = O_WRITE
-
-
-

open() oflag - same as O_WRITE

- -
-
- -
-
- - - - -
uint8_t const T_ACCESS = 1
-
-
-

set the file's last access date

- -
-
- -
-
- - - - -
uint8_t const T_CREATE = 2
-
-
-

set the file's creation date and time

- -
-
- -
-
- - - - -
uint8_t const T_WRITE = 4
-
-
-

Set the file's write date and time

- -
-
-
- - - diff --git a/libs/SdFatBeta20120108/html/_sd_base_file_8h__dep__incl.png b/libs/SdFatBeta20120108/html/_sd_base_file_8h__dep__incl.png deleted file mode 100755 index 1a0a56f..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_base_file_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_base_file_8h__incl.png b/libs/SdFatBeta20120108/html/_sd_base_file_8h__incl.png deleted file mode 100755 index dea7d07..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_base_file_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_fat_8h.html b/libs/SdFatBeta20120108/html/_sd_fat_8h.html deleted file mode 100755 index 47a0405..0000000 --- a/libs/SdFatBeta20120108/html/_sd_fat_8h.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/SdFat.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/SdFat.h File Reference
-
-
- -

SdFat class. -More...

-
#include <SdFile.h>
-#include <SdStream.h>
-#include <ArduinoStream.h>
-
-Include dependency graph for SdFat.h:
-
-
- - -
-
- - - - - -

-Classes

class  SdFat
 Integration class for the SdFat library. More...

-Defines

#define SD_FAT_VERSION   20120108
-

Detailed Description

-

SdFat class.

-

Define Documentation

- -
-
- - - - -
#define SD_FAT_VERSION   20120108
-
-
-

SdFat version YYYYMMDD

- -
-
-
- - - diff --git a/libs/SdFatBeta20120108/html/_sd_fat_8h__incl.png b/libs/SdFatBeta20120108/html/_sd_fat_8h__incl.png deleted file mode 100755 index a1cd04a..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_fat_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_fat_config_8h.html b/libs/SdFatBeta20120108/html/_sd_fat_config_8h.html deleted file mode 100755 index 5ad1916..0000000 --- a/libs/SdFatBeta20120108/html/_sd_fat_config_8h.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/SdFatConfig.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/SdFatConfig.h File Reference
-
-
- -

configuration definitions -More...

-
#include <stdint.h>
-
-Include dependency graph for SdFatConfig.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - - - - - - - - - - - - - - -

-Defines

#define ALLOW_DEPRECATED_FUNCTIONS   1
#define ENDL_CALLS_FLUSH   0
#define FAT12_SUPPORT   0
#define MEGA_SOFT_SPI   1
#define SET_SPI_SS_HIGH   1
#define SPI_SD_INIT_RATE   5
#define USE_CXA_PURE_VIRTUAL   1
#define USE_MULTIPLE_CARDS   0
#define USE_SERIAL_FOR_STD_OUT   0
#define USE_SOFTWARE_SPI   0

-Variables

uint8_t const SOFT_SPI_CS_PIN = 10
uint8_t const SOFT_SPI_MISO_PIN = 12
uint8_t const SOFT_SPI_MOSI_PIN = 11
uint8_t const SOFT_SPI_SCK_PIN = 13
-

Detailed Description

-

configuration definitions

-

Define Documentation

- -
-
- - - - -
#define ALLOW_DEPRECATED_FUNCTIONS   1
-
-
-

Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero

- -
-
- -
-
- - - - -
#define ENDL_CALLS_FLUSH   0
-
-
-

Call flush for endl if ENDL_CALLS_FLUSH is nonzero

-

The standard for iostreams is to call flush. This is very costly for SdFat. Each call to flush causes 2048 bytes of I/O to the SD.

-

SdFat has a single 512 byte buffer for SD I/O so it must write the current data block to the SD, read the directory block from the SD, update the directory entry, write the directory block to the SD and read the data block back into the buffer.

-

The SD flash memory controller is not designed for this many rewrites so performance may be reduced by more than a factor of 100.

-

If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force all data to be written to the SD.

- -
-
- -
-
- - - - -
#define FAT12_SUPPORT   0
-
-
-

Allow FAT12 volumes if FAT12_SUPPORT is nonzero. FAT12 has not been well tested.

- -
-
- -
-
- - - - -
#define MEGA_SOFT_SPI   1
-
-
-

Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos. Pins used are SS 10, MOSI 11, MISO 12, and SCK 13.

-

MEGA_SOFT_SPI allows an unmodified Adafruit GPS Shield to be used on Mega Arduinos. Software SPI works well with GPS Shield V1.1 but many SD cards will fail with GPS Shield V1.0.

- -
-
- -
-
- - - - -
#define SET_SPI_SS_HIGH   1
-
-
-

Set the SS pin high for hardware SPI. If SS is chip select for another SPI device this will disable that device during the SD init phase.

- -
-
- -
-
- - - - -
#define SPI_SD_INIT_RATE   5
-
-
-

SPI init rate for SD initialization commands. Must be 5 (F_CPU/64) or 6 (F_CPU/128).

- -
-
- -
-
- - - - -
#define USE_CXA_PURE_VIRTUAL   1
-
-
-

The __cxa_pure_virtual function is an error handler that is invoked when a pure virtual function is called.

- -
-
- -
-
- - - - -
#define USE_MULTIPLE_CARDS   0
-
-
-

To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.

-

Using multiple cards costs 400 - 500 bytes of flash.

-

Each card requires about 550 bytes of SRAM so use of a Mega is recommended.

- -
-
- -
-
- - - - -
#define USE_SERIAL_FOR_STD_OUT   0
-
-
-

Set nonzero to use Serial (the HardwareSerial class) for error messages and output from print functions like ls().

-

If USE_SERIAL_FOR_STD_OUT is zero, a small non-interrupt driven class is used to output messages to serial port zero. This allows an alternate Serial library like SerialPort to be used with SdFat.

-

You can redirect stdOut with SdFat::setStdOut(Print* stream) and get the current stream with SdFat::stdOut().

- -
-
- -
-
- - - - -
#define USE_SOFTWARE_SPI   0
-
-
-

Set USE_SOFTWARE_SPI nonzero to always use software SPI.

- -
-
-

Variable Documentation

- -
-
- - - - -
uint8_t const SOFT_SPI_CS_PIN = 10
-
-
-

Software SPI chip select pin for the SD

- -
-
- -
-
- - - - -
uint8_t const SOFT_SPI_MISO_PIN = 12
-
-
-

Software SPI Master In Slave Out pin

- -
-
- -
-
- - - - -
uint8_t const SOFT_SPI_MOSI_PIN = 11
-
-
-

Software SPI Master Out Slave In pin

- -
-
- -
-
- - - - -
uint8_t const SOFT_SPI_SCK_PIN = 13
-
-
-

Software SPI Clock pin

- -
-
-
- - - diff --git a/libs/SdFatBeta20120108/html/_sd_fat_config_8h__dep__incl.png b/libs/SdFatBeta20120108/html/_sd_fat_config_8h__dep__incl.png deleted file mode 100755 index 83f7060..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_fat_config_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_fat_config_8h__incl.png b/libs/SdFatBeta20120108/html/_sd_fat_config_8h__incl.png deleted file mode 100755 index 7d2ac66..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_fat_config_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_fat_structs_8h.html b/libs/SdFatBeta20120108/html/_sd_fat_structs_8h.html deleted file mode 100755 index 1471306..0000000 --- a/libs/SdFatBeta20120108/html/_sd_fat_structs_8h.html +++ /dev/null @@ -1,658 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/SdFatStructs.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/SdFatStructs.h File Reference
-
-
- -

FAT file structures. -More...

-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Classes

struct  directoryEntry
 FAT short directory entry. More...
struct  fat32_boot
 Boot sector for a FAT32 volume. More...
struct  fat32_fsinfo
 FSINFO sector for a FAT32 volume. More...
struct  fat_boot
 Boot sector for a FAT12/FAT16 volume. More...
struct  masterBootRecord
 Master Boot Record. More...
struct  partitionTable
 MBR partition table entry. More...

-Typedefs

typedef struct directoryEntry dir_t
typedef struct fat32_boot fat32_boot_t
typedef struct fat32_fsinfo fat32_fsinfo_t
typedef struct fat_boot fat_boot_t
typedef struct masterBootRecord mbr_t
typedef struct partitionTable part_t

-Functions

static uint8_t DIR_IS_FILE (const dir_t *dir)
static uint8_t DIR_IS_FILE_OR_SUBDIR (const dir_t *dir)
static uint8_t DIR_IS_LONG_NAME (const dir_t *dir)
static uint8_t DIR_IS_SUBDIR (const dir_t *dir)

-Variables

uint8_t const BOOTSIG0 = 0X55
uint8_t const BOOTSIG1 = 0XAA
uint8_t const DIR_ATT_ARCHIVE = 0X20
uint8_t const DIR_ATT_DEFINED_BITS = 0X3F
uint8_t const DIR_ATT_DIRECTORY = 0X10
uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY)
uint8_t const DIR_ATT_HIDDEN = 0X02
uint8_t const DIR_ATT_LONG_NAME = 0X0F
uint8_t const DIR_ATT_LONG_NAME_MASK = 0X3F
uint8_t const DIR_ATT_READ_ONLY = 0X01
uint8_t const DIR_ATT_SYSTEM = 0X04
uint8_t const DIR_ATT_VOLUME_ID = 0X08
uint8_t const DIR_NAME_0XE5 = 0X05
uint8_t const DIR_NAME_DELETED = 0XE5
uint8_t const DIR_NAME_FREE = 0X00
uint8_t const EXTENDED_BOOT_SIG = 0X29
uint16_t const FAT12EOC = 0XFFF
uint16_t const FAT12EOC_MIN = 0XFF8
uint16_t const FAT16EOC = 0XFFFF
uint16_t const FAT16EOC_MIN = 0XFFF8
uint32_t const FAT32EOC = 0X0FFFFFFF
uint32_t const FAT32EOC_MIN = 0X0FFFFFF8
uint32_t const FAT32MASK = 0X0FFFFFFF
uint32_t const FSINFO_LEAD_SIG = 0x41615252
uint32_t const FSINFO_STRUCT_SIG = 0x61417272
-

Detailed Description

-

FAT file structures.

-

Typedef Documentation

- -
-
- - - - -
typedef struct directoryEntry dir_t
-
-
-

Type name for directoryEntry

- -
-
- -
-
- - - - -
typedef struct fat32_boot fat32_boot_t
-
-
-

Type name for FAT32 Boot Sector

- -
-
- -
-
- - - - -
typedef struct fat32_fsinfo fat32_fsinfo_t
-
-
-

Type name for FAT32 FSINFO Sector

- -
-
- -
-
- - - - -
typedef struct fat_boot fat_boot_t
-
-
-

Type name for FAT Boot Sector

- -
-
- -
-
- - - - -
typedef struct masterBootRecord mbr_t
-
-
-

Type name for masterBootRecord

- -
-
- -
-
- - - - -
typedef struct partitionTable part_t
-
-
-

Type name for partitionTable

- -
-
-

Function Documentation

- -
-
- - - - - - - - -
static uint8_t DIR_IS_FILE (const dir_tdir) [inline, static]
-
-
-

Directory entry is for a file

-
Parameters:
- - -
[in]dirPointer to a directory entry.
-
-
-
Returns:
true if the entry is for a normal file else false.
- -
-
- -
-
- - - - - - - - -
static uint8_t DIR_IS_FILE_OR_SUBDIR (const dir_tdir) [inline, static]
-
-
-

Directory entry is for a file or subdirectory

-
Parameters:
- - -
[in]dirPointer to a directory entry.
-
-
-
Returns:
true if the entry is for a normal file or subdirectory else false.
- -
-
- -
-
- - - - - - - - -
static uint8_t DIR_IS_LONG_NAME (const dir_tdir) [inline, static]
-
-
-

Directory entry is part of a long name

-
Parameters:
- - -
[in]dirPointer to a directory entry.
-
-
-
Returns:
true if the entry is for part of a long name else false.
- -
-
- -
-
- - - - - - - - -
static uint8_t DIR_IS_SUBDIR (const dir_tdir) [inline, static]
-
-
-

Directory entry is for a subdirectory

-
Parameters:
- - -
[in]dirPointer to a directory entry.
-
-
-
Returns:
true if the entry is for a subdirectory else false.
- -
-
-

Variable Documentation

- -
-
- - - - -
uint8_t const BOOTSIG0 = 0X55
-
-
-

Value for byte 510 of boot block or MBR

- -
-
- -
-
- - - - -
uint8_t const BOOTSIG1 = 0XAA
-
-
-

Value for byte 511 of boot block or MBR

- -
-
- -
-
- - - - -
uint8_t const DIR_ATT_ARCHIVE = 0X20
-
-
-

Old DOS archive bit for backup support

- -
-
- -
-
- - - - -
uint8_t const DIR_ATT_DEFINED_BITS = 0X3F
-
-
-

defined attribute bits

- -
-
- -
-
- - - - -
uint8_t const DIR_ATT_DIRECTORY = 0X10
-
-
-

Entry is for a directory

- -
-
- -
- -
-

Mask for file/subdirectory tests

- -
-
- -
-
- - - - -
uint8_t const DIR_ATT_HIDDEN = 0X02
-
-
-

File should hidden in directory listings

- -
-
- -
-
- - - - -
uint8_t const DIR_ATT_LONG_NAME = 0X0F
-
-
-

Test value for long name entry. Test is (d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME.

- -
-
- -
-
- - - - -
uint8_t const DIR_ATT_LONG_NAME_MASK = 0X3F
-
-
-

Test mask for long name entry

- -
-
- -
-
- - - - -
uint8_t const DIR_ATT_READ_ONLY = 0X01
-
-
-

file is read-only

- -
-
- -
-
- - - - -
uint8_t const DIR_ATT_SYSTEM = 0X04
-
-
-

Entry is for a system file

- -
-
- -
-
- - - - -
uint8_t const DIR_ATT_VOLUME_ID = 0X08
-
-
-

Directory entry contains the volume label

- -
-
- -
-
- - - - -
uint8_t const DIR_NAME_0XE5 = 0X05
-
-
-

escape for name[0] = 0XE5

- -
-
- -
-
- - - - -
uint8_t const DIR_NAME_DELETED = 0XE5
-
-
-

name[0] value for entry that is free after being "deleted"

- -
-
- -
-
- - - - -
uint8_t const DIR_NAME_FREE = 0X00
-
-
-

name[0] value for entry that is free and no allocated entries follow

- -
-
- -
-
- - - - -
uint8_t const EXTENDED_BOOT_SIG = 0X29
-
-
-

Value for bootSignature field int FAT/FAT32 boot sector

- -
-
- -
-
- - - - -
uint16_t const FAT12EOC = 0XFFF
-
-
-

FAT12 end of chain value used by Microsoft.

- -
-
- -
-
- - - - -
uint16_t const FAT12EOC_MIN = 0XFF8
-
-
-

Minimum value for FAT12 EOC. Use to test for EOC.

- -
-
- -
-
- - - - -
uint16_t const FAT16EOC = 0XFFFF
-
-
-

FAT16 end of chain value used by Microsoft.

- -
-
- -
-
- - - - -
uint16_t const FAT16EOC_MIN = 0XFFF8
-
-
-

Minimum value for FAT16 EOC. Use to test for EOC.

- -
-
- -
-
- - - - -
uint32_t const FAT32EOC = 0X0FFFFFFF
-
-
-

FAT32 end of chain value used by Microsoft.

- -
-
- -
-
- - - - -
uint32_t const FAT32EOC_MIN = 0X0FFFFFF8
-
-
-

Minimum value for FAT32 EOC. Use to test for EOC.

- -
-
- -
-
- - - - -
uint32_t const FAT32MASK = 0X0FFFFFFF
-
-
-

Mask a for FAT32 entry. Entries are 28 bits.

- -
-
- -
-
- - - - -
uint32_t const FSINFO_LEAD_SIG = 0x41615252
-
-
-

Lead signature for a FSINFO sector

- -
-
- -
-
- - - - -
uint32_t const FSINFO_STRUCT_SIG = 0x61417272
-
-
-

Struct signature for a FSINFO sector

- -
-
-
- - - diff --git a/libs/SdFatBeta20120108/html/_sd_fat_structs_8h__dep__incl.png b/libs/SdFatBeta20120108/html/_sd_fat_structs_8h__dep__incl.png deleted file mode 100755 index c36cd1b..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_fat_structs_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_fat_util_8h.html b/libs/SdFatBeta20120108/html/_sd_fat_util_8h.html deleted file mode 100755 index 6eb7aaa..0000000 --- a/libs/SdFatBeta20120108/html/_sd_fat_util_8h.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/SdFatUtil.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/SdFatUtil.h File Reference
-
-
- -

Useful utility functions. -More...

-
#include <avr/pgmspace.h>
-#include <WProgram.h>
-
-Include dependency graph for SdFatUtil.h:
-
-
- - -
-
- - - - - - - - - -

-Defines

#define PgmPrint(x)   SerialPrint_P(PSTR(x))
#define PgmPrintln(x)   SerialPrintln_P(PSTR(x))

-Functions

int SdFatUtil::FreeRam ()
void SdFatUtil::print_P (Print *pr, PGM_P str)
void SdFatUtil::println_P (Print *pr, PGM_P str)
void SdFatUtil::SerialPrint_P (PGM_P str)
void SdFatUtil::SerialPrintln_P (PGM_P str)
-

Detailed Description

-

Useful utility functions.

-

Define Documentation

- -
-
- - - - - - - - -
#define PgmPrint( x)   SerialPrint_P(PSTR(x))
-
-
-

Store and print a string in flash memory.

- -
-
- -
-
- - - - - - - - -
#define PgmPrintln( x)   SerialPrintln_P(PSTR(x))
-
-
-

Store and print a string in flash memory followed by a CR/LF.

- -
-
-
- - - diff --git a/libs/SdFatBeta20120108/html/_sd_fat_util_8h__incl.png b/libs/SdFatBeta20120108/html/_sd_fat_util_8h__incl.png deleted file mode 100755 index f948a84..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_fat_util_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_file_8h.html b/libs/SdFatBeta20120108/html/_sd_file_8h.html deleted file mode 100755 index 1272d84..0000000 --- a/libs/SdFatBeta20120108/html/_sd_file_8h.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/SdFile.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/SdFile.h File Reference
-
-
- -

SdFile class. -More...

-
#include <SdBaseFile.h>
-
-Include dependency graph for SdFile.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - -

-Classes

class  SdFile
 SdBaseFile with Print. More...
-

Detailed Description

-

SdFile class.

-
- - - diff --git a/libs/SdFatBeta20120108/html/_sd_file_8h__dep__incl.png b/libs/SdFatBeta20120108/html/_sd_file_8h__dep__incl.png deleted file mode 100755 index d154486..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_file_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_file_8h__incl.png b/libs/SdFatBeta20120108/html/_sd_file_8h__incl.png deleted file mode 100755 index ab72f20..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_file_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_stream_8h.html b/libs/SdFatBeta20120108/html/_sd_stream_8h.html deleted file mode 100755 index 6db25f6..0000000 --- a/libs/SdFatBeta20120108/html/_sd_stream_8h.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/SdStream.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/SdStream.h File Reference
-
-
- -

fstream, ifstream, and ofstream classes -More...

-
#include <SdBaseFile.h>
-#include <iostream.h>
-
-Include dependency graph for SdStream.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - - - - - - - -

-Classes

class  fstream
 SD file input/output stream. More...
class  ifstream
 SD file input stream. More...
class  ofstream
 SD card output stream. More...
class  SdStreamBase
 Base class for SD streams. More...
-

Detailed Description

-

fstream, ifstream, and ofstream classes

-
- - - diff --git a/libs/SdFatBeta20120108/html/_sd_stream_8h__dep__incl.png b/libs/SdFatBeta20120108/html/_sd_stream_8h__dep__incl.png deleted file mode 100755 index c203ea7..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_stream_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_stream_8h__incl.png b/libs/SdFatBeta20120108/html/_sd_stream_8h__incl.png deleted file mode 100755 index 51c7b93..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_stream_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_volume_8h.html b/libs/SdFatBeta20120108/html/_sd_volume_8h.html deleted file mode 100755 index 3e00b17..0000000 --- a/libs/SdFatBeta20120108/html/_sd_volume_8h.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/SdVolume.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/SdVolume.h File Reference
-
-
- -

SdVolume class. -More...

-
#include <SdFatConfig.h>
-#include <Sd2Card.h>
-#include <SdFatStructs.h>
-
-Include dependency graph for SdVolume.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - - - -

-Classes

union  cache_t
 Cache for an SD data block. More...
class  SdVolume
 Access FAT16 and FAT32 volumes on SD and SDHC cards. More...
-

Detailed Description

-

SdVolume class.

-
- - - diff --git a/libs/SdFatBeta20120108/html/_sd_volume_8h__dep__incl.png b/libs/SdFatBeta20120108/html/_sd_volume_8h__dep__incl.png deleted file mode 100755 index 85b0ee4..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_volume_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/_sd_volume_8h__incl.png b/libs/SdFatBeta20120108/html/_sd_volume_8h__incl.png deleted file mode 100755 index 7bbc630..0000000 Binary files a/libs/SdFatBeta20120108/html/_sd_volume_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/annotated.html b/libs/SdFatBeta20120108/html/annotated.html deleted file mode 100755 index f2a684c..0000000 --- a/libs/SdFatBeta20120108/html/annotated.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -SdFat: Class List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
Class List
-
-
-
Here are the classes, structs, unions and interfaces with brief descriptions:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArduinoInStreamInput stream for Arduino Stream objects
ArduinoOutStreamOutput stream for Arduino Print objects
cache_tCache for an SD data block
directoryEntryFAT short directory entry
fat32_bootBoot sector for a FAT32 volume
fat32_fsinfoFSINFO sector for a FAT32 volume
fat_bootBoot sector for a FAT12/FAT16 volume
fpos_tInternal type for istream do not use in user apps
fstreamSD file input/output stream
ibufstreamParse a char string
ifstreamSD file input stream
iosError and state information for all streams
ios_baseBase class for all streams
iostreamInput/Output stream
istreamInput Stream
masterBootRecordMaster Boot Record
obufstreamFormat a char string
ofstreamSD card output stream
ostreamOutput Stream
partitionTableMBR partition table entry
pgmType for string in flash
PrintThe Arduino core Print class
Sd2CardRaw access to SD and SDHC flash memory cards
SdBaseFileBase class for SdFile with Print and C++ streams
SdFatIntegration class for the SdFat library
SdFileSdBaseFile with Print
SdStreamBaseBase class for SD streams
SdVolumeAccess FAT16 and FAT32 volumes on SD and SDHC cards
setfillType for setfill manipulator
setprecisionType for setprecision manipulator
setwType for setw manipulator
-
- - - diff --git a/libs/SdFatBeta20120108/html/bufstream_8h.html b/libs/SdFatBeta20120108/html/bufstream_8h.html deleted file mode 100755 index ad271f7..0000000 --- a/libs/SdFatBeta20120108/html/bufstream_8h.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/bufstream.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/bufstream.h File Reference
-
-
- -

ibufstream and obufstream classes -More...

-
#include <iostream.h>
-
-Include dependency graph for bufstream.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - - - -

-Classes

class  ibufstream
 parse a char string More...
class  obufstream
 format a char string More...
-

Detailed Description

-

ibufstream and obufstream classes

-
- - - diff --git a/libs/SdFatBeta20120108/html/bufstream_8h__dep__incl.png b/libs/SdFatBeta20120108/html/bufstream_8h__dep__incl.png deleted file mode 100755 index 52feee9..0000000 Binary files a/libs/SdFatBeta20120108/html/bufstream_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/bufstream_8h__incl.png b/libs/SdFatBeta20120108/html/bufstream_8h__incl.png deleted file mode 100755 index a791cc7..0000000 Binary files a/libs/SdFatBeta20120108/html/bufstream_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_arduino_in_stream-members.html b/libs/SdFatBeta20120108/html/class_arduino_in_stream-members.html deleted file mode 100755 index 71de780..0000000 --- a/libs/SdFatBeta20120108/html/class_arduino_in_stream-members.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
ArduinoInStream Member List
-
-
-This is the complete list of members for ArduinoInStream, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ArduinoInStream(Stream &hws, char *buf, uint16_t size)ArduinoInStream [inline]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
clear(iostate state=goodbit)ios [inline]
cur enum valueios_base
decios_base [static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
fail() const ios [inline]
failbitios_base [static]
fill()ios_base [inline]
fill(char c)ios_base [inline]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
fmtflags typedefios_base
gcount() const istream [inline]
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getline(char *str, streamsize count, char delim= '\n')istream
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
ibufstream()ibufstream [inline]
ibufstream(const char *str)ibufstream [inline, explicit]
ignore(streamsize n=1, int delim=-1)istream
inios_base [static]
init(const char *str)ibufstream [inline]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
istream() (defined in istream)istream [inline]
leftios_base [static]
octios_base [static]
off_type typedefios_base
openmode typedefios_base
operator const void *() const ios [inline]
operator!() const ios [inline]
operator>>(istream &(*pf)(istream &str))istream [inline]
operator>>(ios_base &(*pf)(ios_base &str))istream [inline]
operator>>(ios &(*pf)(ios &str))istream [inline]
operator>>(char *str)istream [inline]
operator>>(char &ch)istream [inline]
operator>>(signed char *str)istream [inline]
operator>>(signed char &ch)istream [inline]
operator>>(unsigned char *str)istream [inline]
operator>>(unsigned char &ch)istream [inline]
operator>>(bool &arg)istream [inline]
operator>>(short &arg)istream [inline]
operator>>(unsigned short &arg)istream [inline]
operator>>(int16_t &arg)istream [inline]
operator>>(uint16_t &arg)istream [inline]
operator>>(int32_t &arg)istream [inline]
operator>>(uint32_t &arg)istream [inline]
operator>>(double &arg)istream [inline]
operator>>(float &arg)istream [inline]
operator>>(void *&arg)istream [inline]
outios_base [static]
peek()istream
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
rdstate() const ios [inline]
readline()ArduinoInStream [inline]
rightios_base [static]
seekdir enum nameios_base
seekg(pos_type pos)istream [inline]
seekg(off_type off, seekdir way)istream [inline]
seekoff(off_type off, seekdir way)ArduinoInStream [inline, protected]
seekpos(pos_type pos)ArduinoInStream [inline, protected]
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipWhite()istream
skipwsios_base [static]
streamsize typedefios_base
tellg()istream [inline]
truncios_base [static]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/class_arduino_in_stream.html b/libs/SdFatBeta20120108/html/class_arduino_in_stream.html deleted file mode 100755 index b2fda64..0000000 --- a/libs/SdFatBeta20120108/html/class_arduino_in_stream.html +++ /dev/null @@ -1,1992 +0,0 @@ - - - - -SdFat: ArduinoInStream Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

Input stream for Arduino Stream objects. - More...

- -

#include <ArduinoStream.h>

-
-Inheritance diagram for ArduinoInStream:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for ArduinoInStream:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

 ArduinoInStream (Stream &hws, char *buf, uint16_t size)
bool bad () const
void clear (iostate state=goodbit)
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
streamsize gcount () const
int get ()
istreamget (char &ch)
istreamget (char *str, streamsize n, char delim= '\n')
istreamgetline (char *str, streamsize count, char delim= '\n')
bool good () const
istreamignore (streamsize n=1, int delim=-1)
void init (const char *str)
 operator const void * () const
bool operator! () const
istreamoperator>> (char &ch)
istreamoperator>> (uint16_t &arg)
istreamoperator>> (int16_t &arg)
istreamoperator>> (signed char *str)
istreamoperator>> (int32_t &arg)
istreamoperator>> (uint32_t &arg)
istreamoperator>> (istream &(*pf)(istream &str))
istreamoperator>> (double &arg)
istreamoperator>> (signed char &ch)
istreamoperator>> (float &arg)
istreamoperator>> (void *&arg)
istreamoperator>> (ios_base &(*pf)(ios_base &str))
istreamoperator>> (unsigned char *str)
istreamoperator>> (unsigned char &ch)
istreamoperator>> (ios &(*pf)(ios &str))
istreamoperator>> (bool &arg)
istreamoperator>> (char *str)
istreamoperator>> (short &arg)
istreamoperator>> (unsigned short &arg)
int peek ()
int precision (unsigned int n)
int precision () const
iostate rdstate () const
void readline ()
istreamseekg (off_type off, seekdir way)
istreamseekg (pos_type pos)
fmtflags setf (fmtflags fl, fmtflags mask)
fmtflags setf (fmtflags fl)
void setstate (iostate state)
void skipWhite ()
pos_type tellg ()
void unsetf (fmtflags fl)
unsigned width ()
unsigned width (unsigned n)

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()
bool seekoff (off_type off, seekdir way)
bool seekpos (pos_type pos)
-

Detailed Description

-

Input stream for Arduino Stream objects.

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
ArduinoInStream::ArduinoInStream (Stream & hws,
char * buf,
uint16_t size 
) [inline]
-
-
-

Constructor

-
Parameters:
- - - - -
[in]hwshardware stream
[in]bufbuffer for input line
[in]sizesize of input buffer
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline, inherited]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - - -
void ios::clear (iostate state = goodbit) [inline, inherited]
-
-
-

Clear iostate bits.

-
Parameters:
- - -
[in]stateThe flags you want to set after clearing all flags.
-
-
- -

Reimplemented in fstream, and ofstream.

- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline, inherited]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline, inherited]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - -
streamsize istream::gcount () const [inline, inherited]
-
-
-
Returns:
The number of characters extracted by the last unformatted input function.
- -
-
- -
-
- - - - - - - -
int istream::get () [inherited]
-
-
-

Extract a character if one is available.

-
Returns:
The character or -1 if a failure occurs. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - -
istream & istream::get (char & c) [inherited]
-
-
-

Extract a character if one is available.

-
Parameters:
- - -
[out]clocation to receive the extracted character.
-
-
-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
) [inherited]
-
-
-

Extract characters.

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
) [inherited]
-
-
-

Extract characters

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

-

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline, inherited]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream & istream::ignore (streamsize n = 1,
int delim = -1 
) [inherited]
-
-
-

Extract characters and discard them.

-
Parameters:
- - - -
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
-
-
-

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

-

Failures are indicated by the state of the stream.

-
Returns:
*this
- -
-
- -
-
- - - - - - - - -
void ibufstream::init (const char * str) [inline, inherited]
-
-
-

Initialize an ibufstream

-
Parameters:
- - -
[in]strpointer to string to be parsed Warning: The string will not be copied so must stay in scope.
-
-
- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline, inherited]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline, inherited]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (istream &(*)(istream &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned short & arg) [inline, inherited]
-
-
-

Extract a value of type unsigned short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int16_t & arg) [inline, inherited]
-
-
-

Extract a value of type int16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint16_t & arg) [inline, inherited]
-
-
-

Extract a value of type uint16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int32_t & arg) [inline, inherited]
-
-
-

Extract a value of type int32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint32_t & arg) [inline, inherited]
-
-
-

Extract a value of type uint32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (double & arg) [inline, inherited]
-
-
-

Extract a value of type double.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (float & arg) [inline, inherited]
-
-
-

Extract a value of type float.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (void *& arg) [inline, inherited]
-
-
-

Extract a value of type void*.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (bool & arg) [inline, inherited]
-
-
-

Extract a value of type bool.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios &(*)(ios &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (short & arg) [inline, inherited]
-
-
-

Extract a value of type short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - -
int istream::peek () [inherited]
-
-
-

Return the next available character without consuming it.

-
Returns:
The character if the stream state is good else -1;
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline, inherited]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - -
void ArduinoInStream::readline () [inline]
-
-
-

read a line.

- -
-
- -
-
- - - - - - - - -
istream& istream::seekg (pos_type pos) [inline, inherited]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the read pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream& istream::seekg (off_type off,
seekdir way 
) [inline, inherited]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool ArduinoInStream::seekoff (off_type off,
seekdir way 
) [inline, protected]
-
-
-

Internal - do not use.

-
Parameters:
- - - -
[in]off
[in]way
-
-
-
Returns:
true/false.
- -
-
- -
-
- - - - - - - - -
bool ArduinoInStream::seekpos (pos_type pos) [inline, protected]
-
-
-

Internal - do not use.

-
Parameters:
- - -
[in]pos
-
-
-
Returns:
true/false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline, inherited]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - -
void istream::skipWhite () [inherited]
-
-
-

used to implement ws()

- -
-
- -
-
- - - - - - - -
pos_type istream::tellg () [inline, inherited]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/class_arduino_in_stream__coll__graph.png b/libs/SdFatBeta20120108/html/class_arduino_in_stream__coll__graph.png deleted file mode 100755 index 3fdb2d3..0000000 Binary files a/libs/SdFatBeta20120108/html/class_arduino_in_stream__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_arduino_in_stream__inherit__graph.png b/libs/SdFatBeta20120108/html/class_arduino_in_stream__inherit__graph.png deleted file mode 100755 index 3fdb2d3..0000000 Binary files a/libs/SdFatBeta20120108/html/class_arduino_in_stream__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_arduino_out_stream-members.html b/libs/SdFatBeta20120108/html/class_arduino_out_stream-members.html deleted file mode 100755 index 731d2cb..0000000 --- a/libs/SdFatBeta20120108/html/class_arduino_out_stream-members.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
ArduinoOutStream Member List
-
-
-This is the complete list of members for ArduinoOutStream, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ArduinoOutStream(Print &pr)ArduinoOutStream [inline, explicit]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
clear(iostate state=goodbit)ios [inline]
cur enum valueios_base
decios_base [static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
fail() const ios [inline]
failbitios_base [static]
fill()ios_base [inline]
fill(char c)ios_base [inline]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
flush()ostream [inline]
fmtflags typedefios_base
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
inios_base [static]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
leftios_base [static]
octios_base [static]
off_type typedefios_base
openmode typedefios_base
operator const void *() const ios [inline]
operator!() const ios [inline]
operator<<(ostream &(*pf)(ostream &str))ostream [inline]
operator<<(ios_base &(*pf)(ios_base &str))ostream [inline]
operator<<(bool arg)ostream [inline]
operator<<(const char *arg)ostream [inline]
operator<<(const signed char *arg)ostream [inline]
operator<<(const unsigned char *arg)ostream [inline]
operator<<(char arg)ostream [inline]
operator<<(signed char arg)ostream [inline]
operator<<(unsigned char arg)ostream [inline]
operator<<(double arg)ostream [inline]
operator<<(int16_t arg)ostream [inline]
operator<<(uint16_t arg)ostream [inline]
operator<<(int32_t arg)ostream [inline]
operator<<(uint32_t arg)ostream [inline]
operator<<(const void *arg)ostream [inline]
operator<<(pgm arg)ostream [inline]
ostream() (defined in ostream)ostream [inline]
outios_base [static]
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
put(char ch)ostream [inline]
rdstate() const ios [inline]
rightios_base [static]
seekdir enum nameios_base
seekp(pos_type pos)ostream [inline]
seekp(off_type off, seekdir way)ostream [inline]
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipwsios_base [static]
streamsize typedefios_base
tellp()ostream [inline]
truncios_base [static]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/class_arduino_out_stream.html b/libs/SdFatBeta20120108/html/class_arduino_out_stream.html deleted file mode 100755 index 2683bfb..0000000 --- a/libs/SdFatBeta20120108/html/class_arduino_out_stream.html +++ /dev/null @@ -1,1606 +0,0 @@ - - - - -SdFat: ArduinoOutStream Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

Output stream for Arduino Print objects. - More...

- -

#include <ArduinoStream.h>

-
-Inheritance diagram for ArduinoOutStream:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for ArduinoOutStream:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

 ArduinoOutStream (Print &pr)
bool bad () const
void clear (iostate state=goodbit)
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
ostreamflush ()
bool good () const
 operator const void * () const
bool operator! () const
ostreamoperator<< (ostream &(*pf)(ostream &str))
ostreamoperator<< (const void *arg)
ostreamoperator<< (char arg)
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
ostreamoperator<< (pgm arg)
ostreamoperator<< (bool arg)
ostreamoperator<< (signed char arg)
ostreamoperator<< (unsigned char arg)
ostreamoperator<< (const char *arg)
ostreamoperator<< (double arg)
ostreamoperator<< (const signed char *arg)
ostreamoperator<< (int16_t arg)
ostreamoperator<< (uint16_t arg)
ostreamoperator<< (int32_t arg)
ostreamoperator<< (const unsigned char *arg)
ostreamoperator<< (uint32_t arg)
int precision () const
int precision (unsigned int n)
ostreamput (char ch)
iostate rdstate () const
ostreamseekp (pos_type pos)
ostreamseekp (off_type off, seekdir way)
fmtflags setf (fmtflags fl, fmtflags mask)
fmtflags setf (fmtflags fl)
void setstate (iostate state)
pos_type tellp ()
void unsetf (fmtflags fl)
unsigned width ()
unsigned width (unsigned n)

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()
-

Detailed Description

-

Output stream for Arduino Print objects.

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - -
ArduinoOutStream::ArduinoOutStream (Printpr) [inline, explicit]
-
-
-

constructor

-
Parameters:
- - -
[in]prPrint object for this ArduinoOutStream.
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline, inherited]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - - -
void ios::clear (iostate state = goodbit) [inline, inherited]
-
-
-

Clear iostate bits.

-
Parameters:
- - -
[in]stateThe flags you want to set after clearing all flags.
-
-
- -

Reimplemented in fstream, and ofstream.

- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline, inherited]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline, inherited]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - -
ostream& ostream::flush () [inline, inherited]
-
-
-

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline, inherited]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline, inherited]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline, inherited]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (pgm arg) [inline, inherited]
-
-
-

Output a string from flash

-
Parameters:
- - -
[in]argpgm struct pointing to string
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (signed char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (bool arg) [inline, inherited]
-
-
-

Output bool

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (unsigned char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (double arg) [inline, inherited]
-
-
-

Output double

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int16_t arg) [inline, inherited]
-
-
-

Output signed int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const signed char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const unsigned char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint16_t arg) [inline, inherited]
-
-
-

Output unsigned int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int32_t arg) [inline, inherited]
-
-
-

Output signed long

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint32_t arg) [inline, inherited]
-
-
-

Output uint32_t

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const void * arg) [inline, inherited]
-
-
-

Output pointer

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - - -
ostream& ostream::put (char ch) [inline, inherited]
-
-
-

Puts a character in a stream.

-

The unformatted output function inserts the element ch. It returns *this.

-
Parameters:
- - -
[in]chThe character
-
-
-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline, inherited]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
ostream& ostream::seekp (off_type off,
seekdir way 
) [inline, inherited]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::seekp (pos_type pos) [inline, inherited]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the write pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline, inherited]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - -
pos_type ostream::tellp () [inline, inherited]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/class_arduino_out_stream__coll__graph.png b/libs/SdFatBeta20120108/html/class_arduino_out_stream__coll__graph.png deleted file mode 100755 index 25187ae..0000000 Binary files a/libs/SdFatBeta20120108/html/class_arduino_out_stream__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_arduino_out_stream__inherit__graph.png b/libs/SdFatBeta20120108/html/class_arduino_out_stream__inherit__graph.png deleted file mode 100755 index 4430779..0000000 Binary files a/libs/SdFatBeta20120108/html/class_arduino_out_stream__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_print-members.html b/libs/SdFatBeta20120108/html/class_print-members.html deleted file mode 100755 index 7516395..0000000 --- a/libs/SdFatBeta20120108/html/class_print-members.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
Print Member List
-
-
-This is the complete list of members for Print, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - -
print(const String &)Print
print(const char[])Print
print(char, int=BYTE)Print
print(unsigned char, int=BYTE)Print
print(int, int=DEC)Print
print(unsigned int, int=DEC)Print
print(long, int=DEC)Print
print(unsigned long, int=DEC)Print
print(double, int=2)Print
println(const String &s)Print
println(const char[])Print
println(char, int=BYTE)Print
println(unsigned char, int=BYTE)Print
println(int, int=DEC)Print
println(unsigned int, int=DEC)Print
println(long, int=DEC)Print
println(unsigned long, int=DEC)Print
println(double, int=2)Print
println(void)Print
write(uint8_t b)=0Print [pure virtual]
write(const char *str)Print [virtual]
write(const uint8_t *buffer, size_t size)Print [virtual]
- - - diff --git a/libs/SdFatBeta20120108/html/class_print.html b/libs/SdFatBeta20120108/html/class_print.html deleted file mode 100755 index 49a70d6..0000000 --- a/libs/SdFatBeta20120108/html/class_print.html +++ /dev/null @@ -1,788 +0,0 @@ - - - - -SdFat: Print Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Print Class Reference
-
-
- -

The Arduino core Print class. - More...

- -

#include <Print.h>

-
-Inheritance diagram for Print:
-
-
Inheritance graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

void print (const String &)
void print (const char[])
void print (int, int=DEC)
void print (unsigned int, int=DEC)
void print (long, int=DEC)
void print (unsigned long, int=DEC)
void print (char, int=BYTE)
void print (double, int=2)
void print (unsigned char, int=BYTE)
void println (unsigned int, int=DEC)
void println (const String &s)
void println (double, int=2)
void println (unsigned char, int=BYTE)
void println (unsigned long, int=DEC)
void println (void)
void println (long, int=DEC)
void println (const char[])
void println (int, int=DEC)
void println (char, int=BYTE)
virtual void write (uint8_t b)=0
virtual void write (const uint8_t *buffer, size_t size)
virtual void write (const char *str)
-

Detailed Description

-

The Arduino core Print class.

-

Member Function Documentation

- -
-
- - - - - - - - -
void Print::print (const String & s)
-
-
-

Write a string to the associated device.

-
Parameters:
- - -
[in]sthe string to be printed
-
-
- -
-
- -
-
- - - - - - - - -
void Print::print (const char str[])
-
-
-

Write a string to the associated device.

-
Parameters:
- - -
[in]strthe string to be printed
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (int n,
int base = DEC 
)
-
-
-

Write an signed number to the associated device in ASCII.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (unsigned int n,
int base = DEC 
)
-
-
-

Write an unsigned number to the associated device in ASCII.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (long n,
int base = DEC 
)
-
-
-

Write an signed number to the associated device in ASCII.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (unsigned long n,
int base = DEC 
)
-
-
-

Write an unsigned number to the associated device in ASCII.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (char c,
int base = BYTE 
)
-
-
-

Write an signed byte to the associated device in ASCII.

-
Parameters:
- - - -
[in]cthe byte to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (double n,
int digits = 2 
)
-
-
-

Write the decimal representation of an float or double to the associated device in ASCII.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]digitsthe digits in ftraction to be printed
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (unsigned char b,
int base = BYTE 
)
-
-
-

Write an unsigned byte to the associated device in ASCII.

-
Parameters:
- - - -
[in]bthe byte to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (unsigned int n,
int base = DEC 
)
-
-
-

Write an unsigned number to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - -
void Print::println (const String & s)
-
-
-

Write a string to the associated device followed by CR LF.

-
Parameters:
- - -
[in]sthe string to be printed
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (double n,
int digits = 2 
)
-
-
-

Write the decimal representation of an float or double to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]digitsthe digits in ftraction to be printed
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (unsigned char b,
int base = BYTE 
)
-
-
-

Write an unsigned byte to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]bthe byte to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (unsigned long n,
int base = DEC 
)
-
-
-

Write an unsigned number to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - -
void Print::println (void )
-
-
-

Print CR LF

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (long n,
int base = DEC 
)
-
-
-

Write an signed number to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - -
void Print::println (const char c[])
-
-
-

Write a string to the associated device followed by CR LF.

-
Parameters:
- - -
[in]cthe string to be printed
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (int n,
int base = DEC 
)
-
-
-

Write an signed number to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (char c,
int base = BYTE 
)
-
-
-

Write an signed byte to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]cthe byte to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - -
virtual void Print::write (uint8_t b) [pure virtual]
-
-
-

Virtual function to be implemented by the derived class for the hardware device.

-
Parameters:
- - -
[in]bThe byte to be sent to the device.
-
-
- -

Implemented in SdFile.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::write (const uint8_t * buffer,
size_t size 
) [virtual]
-
-
-

default implementation: may be overridden

-
Parameters:
- - - -
[in]bufferpointer to data
[in]sizecount of bytes to be written
-
-
- -
-
- -
-
- - - - - - - - -
void Print::write (const char * str) [virtual]
-
-
-

default implementation: may be overridden

-
Parameters:
- - -
[in]strstring to be written
-
-
- -

Reimplemented in SdFile.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • SdFatDoc/Print/Print.h
  • -
  • SdFatDoc/Print/Print.cpp
  • -
-
- - - diff --git a/libs/SdFatBeta20120108/html/class_print__inherit__graph.png b/libs/SdFatBeta20120108/html/class_print__inherit__graph.png deleted file mode 100755 index 4825be2..0000000 Binary files a/libs/SdFatBeta20120108/html/class_print__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_sd2_card-members.html b/libs/SdFatBeta20120108/html/class_sd2_card-members.html deleted file mode 100755 index feae245..0000000 --- a/libs/SdFatBeta20120108/html/class_sd2_card-members.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
Sd2Card Member List
-
-
-This is the complete list of members for Sd2Card, including all inherited members. - - - - - - - - - - - - - - - - - - - - -
cardSize()Sd2Card
erase(uint32_t firstBlock, uint32_t lastBlock)Sd2Card
eraseSingleBlockEnable()Sd2Card
error(uint8_t code)Sd2Card [inline]
errorCode() const Sd2Card [inline]
errorData() const Sd2Card [inline]
init(uint8_t sckRateID=SPI_FULL_SPEED, uint8_t chipSelectPin=SD_CHIP_SELECT_PIN)Sd2Card
readBlock(uint32_t block, uint8_t *dst)Sd2Card
readCID(cid_t *cid)Sd2Card [inline]
readCSD(csd_t *csd)Sd2Card [inline]
readData(uint8_t *dst)Sd2Card
readStart(uint32_t blockNumber)Sd2Card
readStop()Sd2Card
Sd2Card()Sd2Card [inline]
setSckRate(uint8_t sckRateID)Sd2Card
type() const Sd2Card [inline]
writeBlock(uint32_t blockNumber, const uint8_t *src)Sd2Card
writeData(const uint8_t *src)Sd2Card
writeStart(uint32_t blockNumber, uint32_t eraseCount)Sd2Card
writeStop()Sd2Card
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd2_card.html b/libs/SdFatBeta20120108/html/class_sd2_card.html deleted file mode 100755 index b34d807..0000000 --- a/libs/SdFatBeta20120108/html/class_sd2_card.html +++ /dev/null @@ -1,590 +0,0 @@ - - - - -SdFat: Sd2Card Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Sd2Card Class Reference
-
-
- -

Raw access to SD and SDHC flash memory cards. - More...

- -

#include <Sd2Card.h>

- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

uint32_t cardSize ()
bool erase (uint32_t firstBlock, uint32_t lastBlock)
bool eraseSingleBlockEnable ()
void error (uint8_t code)
int errorCode () const
int errorData () const
bool init (uint8_t sckRateID=SPI_FULL_SPEED, uint8_t chipSelectPin=SD_CHIP_SELECT_PIN)
bool readBlock (uint32_t block, uint8_t *dst)
bool readCID (cid_t *cid)
bool readCSD (csd_t *csd)
bool readData (uint8_t *dst)
bool readStart (uint32_t blockNumber)
bool readStop ()
 Sd2Card ()
bool setSckRate (uint8_t sckRateID)
int type () const
bool writeBlock (uint32_t blockNumber, const uint8_t *src)
bool writeData (const uint8_t *src)
bool writeStart (uint32_t blockNumber, uint32_t eraseCount)
bool writeStop ()
-

Detailed Description

-

Raw access to SD and SDHC flash memory cards.

-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
Sd2Card::Sd2Card () [inline]
-
-
-

Construct an instance of Sd2Card.

- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
uint32_t Sd2Card::cardSize ()
-
-
-

Determine the size of an SD flash memory card.

-
Returns:
The number of 512 byte data blocks in the card or zero if an error occurs.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool Sd2Card::erase (uint32_t firstBlock,
uint32_t lastBlock 
)
-
-
-

Erase a range of blocks.

-
Parameters:
- - - -
[in]firstBlockThe address of the first block in the range.
[in]lastBlockThe address of the last block in the range.
-
-
-
Note:
This function requests the SD card to do a flash erase for a range of blocks. The data on the card after an erase operation is either 0 or 1, depends on the card vendor. The card must support single block erase.
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - -
bool Sd2Card::eraseSingleBlockEnable ()
-
-
-

Determine if card supports single block erase.

-
Returns:
The value one, true, is returned if single block erase is supported. The value zero, false, is returned if single block erase is not supported.
- -
-
- -
-
- - - - - - - - -
void Sd2Card::error (uint8_t code) [inline]
-
-
-

Set SD error code.

-
Parameters:
- - -
[in]codevalue for error code.
-
-
- -
-
- -
-
- - - - - - - -
int Sd2Card::errorCode () const [inline]
-
-
-
Returns:
error code for last error. See Sd2Card.h for a list of error codes.
- -
-
- -
-
- - - - - - - -
int Sd2Card::errorData () const [inline]
-
-
-
Returns:
error data for last error.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool Sd2Card::init (uint8_t sckRateID = SPI_FULL_SPEED,
uint8_t chipSelectPin = SD_CHIP_SELECT_PIN 
)
-
-
-

Initialize an SD flash memory card with default clock rate and chip select pin. See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin).

-
Returns:
true for success or false for failure.
-

Initialize an SD flash memory card.

-
Parameters:
- - - -
[in]sckRateIDSPI clock rate selector. See setSckRate().
[in]chipSelectPinSD chip select pin number.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. The reason for failure can be determined by calling errorCode() and errorData().
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool Sd2Card::readBlock (uint32_t blockNumber,
uint8_t * dst 
)
-
-
-

Read a 512 byte block from an SD card.

-
Parameters:
- - - -
[in]blockNumberLogical block to be read.
[out]dstPointer to the location that will receive the data.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool Sd2Card::readCID (cid_t * cid) [inline]
-
-
-

Read a card's CID register. The CID contains card identification information such as Manufacturer ID, Product name, Product serial number and Manufacturing date.

-
Parameters:
- - -
[out]cidpointer to area for returned data.
-
-
-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - -
bool Sd2Card::readCSD (csd_t * csd) [inline]
-
-
-

Read a card's CSD register. The CSD contains Card-Specific Data that provides information regarding access to the card's contents.

-
Parameters:
- - -
[out]csdpointer to area for returned data.
-
-
-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - -
bool Sd2Card::readData (uint8_t * dst)
-
-
-

Read one data block in a multiple block read sequence

-
Parameters:
- - -
[in]dstPointer to the location for the data to be read.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool Sd2Card::readStart (uint32_t blockNumber)
-
-
-

Start a read multiple blocks sequence.

-
Parameters:
- - -
[in]blockNumberAddress of first block in sequence.
-
-
-
Note:
This function is used with readData() and readStop() for optimized multiple block reads. SPI chipSelect must be low for the entire sequence.
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - -
bool Sd2Card::readStop ()
-
-
-

End a read multiple blocks sequence.

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool Sd2Card::setSckRate (uint8_t sckRateID)
-
-
-

Set the SPI clock rate.

-
Parameters:
- - -
[in]sckRateIDA value in the range [0, 6].
-
-
-

The SPI clock will be set to F_CPU/pow(2, 1 + sckRateID). The maximum SPI rate is F_CPU/2 for sckRateID = 0 and the minimum rate is F_CPU/128 for scsRateID = 6.

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for an invalid value of sckRateID.
- -
-
- -
-
- - - - - - - -
int Sd2Card::type () const [inline]
-
-
-

Return the card type: SD V1, SD V2 or SDHC

-
Returns:
0 - SD V1, 1 - SD V2, or 3 - SDHC.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool Sd2Card::writeBlock (uint32_t blockNumber,
const uint8_t * src 
)
-
-
-

Writes a 512 byte block to an SD card.

-
Parameters:
- - - -
[in]blockNumberLogical block to be written.
[in]srcPointer to the location of the data to be written.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool Sd2Card::writeData (const uint8_t * src)
-
-
-

Write one data block in a multiple block write sequence

-
Parameters:
- - -
[in]srcPointer to the location of the data to be written.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool Sd2Card::writeStart (uint32_t blockNumber,
uint32_t eraseCount 
)
-
-
-

Start a write multiple blocks sequence.

-
Parameters:
- - - -
[in]blockNumberAddress of first block in sequence.
[in]eraseCountThe number of blocks to be pre-erased.
-
-
-
Note:
This function is used with writeData() and writeStop() for optimized multiple block writes.
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - -
bool Sd2Card::writeStop ()
-
-
-

End a write multiple blocks sequence.

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
-
The documentation for this class was generated from the following files:
    -
  • Arduino/libraries/SdFat/Sd2Card.h
  • -
  • Arduino/libraries/SdFat/Sd2Card.cpp
  • -
-
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd_base_file-members.html b/libs/SdFatBeta20120108/html/class_sd_base_file-members.html deleted file mode 100755 index af46f87..0000000 --- a/libs/SdFatBeta20120108/html/class_sd_base_file-members.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
SdBaseFile Member List
-
-
-This is the complete list of members for SdBaseFile, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
close()SdBaseFile
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFile
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFile
curCluster() const SdBaseFile [inline]
curPosition() const SdBaseFile [inline]
cwd()SdBaseFile [inline, static]
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFile [inline, static]
dateTimeCallbackCancel()SdBaseFile [inline, static]
dirEntry(dir_t *dir)SdBaseFile
dirName(const dir_t &dir, char *name)SdBaseFile [static]
exists(const char *name)SdBaseFile
fgets(char *str, int16_t num, char *delim=0)SdBaseFile
fileSize() const SdBaseFile [inline]
firstCluster() const SdBaseFile [inline]
getFilename(char *name)SdBaseFile
getpos(fpos_t *pos)SdBaseFile
isDir() const SdBaseFile [inline]
isFile() const SdBaseFile [inline]
isOpen() const SdBaseFile [inline]
isRoot() const SdBaseFile [inline]
isSubDir() const SdBaseFile [inline]
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFile
ls(uint8_t flags=0)SdBaseFile
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFile
open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFile
open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFile
open(const char *path, uint8_t oflag=O_READ)SdBaseFile
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFile
openRoot(SdVolume *vol)SdBaseFile
peek()SdBaseFile
printFatDate(uint16_t fatDate)SdBaseFile [static]
printFatDate(Print *pr, uint16_t fatDate)SdBaseFile [static]
printFatTime(uint16_t fatTime)SdBaseFile [static]
printFatTime(Print *pr, uint16_t fatTime)SdBaseFile [static]
printName()SdBaseFile
read()SdBaseFile
read(void *buf, uint16_t nbyte)SdBaseFile
readDir(dir_t *dir)SdBaseFile
remove(SdBaseFile *dirFile, const char *path)SdBaseFile [static]
remove()SdBaseFile
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFile
rewind()SdBaseFile [inline]
rmdir()SdBaseFile
rmRfStar()SdBaseFile
SdBaseFile()SdBaseFile [inline]
SdBaseFile(const char *path, uint8_t oflag)SdBaseFile
SdFat (defined in SdBaseFile)SdBaseFile [friend]
seekCur(int32_t offset)SdBaseFile [inline]
seekEnd(int32_t offset=0)SdBaseFile [inline]
seekSet(uint32_t pos)SdBaseFile
setpos(fpos_t *pos)SdBaseFile
sync()SdBaseFile
timestamp(SdBaseFile *file)SdBaseFile
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFile
truncate(uint32_t size)SdBaseFile
type() const SdBaseFile [inline]
volume() const SdBaseFile [inline]
write(const void *buf, uint16_t nbyte)SdBaseFile
writeErrorSdBaseFile
~SdBaseFile() (defined in SdBaseFile)SdBaseFile [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd_base_file.html b/libs/SdFatBeta20120108/html/class_sd_base_file.html deleted file mode 100755 index be6027f..0000000 --- a/libs/SdFatBeta20120108/html/class_sd_base_file.html +++ /dev/null @@ -1,1758 +0,0 @@ - - - - -SdFat: SdBaseFile Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

Base class for SdFile with Print and C++ streams. - More...

- -

#include <SdBaseFile.h>

-
-Inheritance diagram for SdBaseFile:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for SdBaseFile:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

bool close ()
bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
uint32_t curCluster () const
uint32_t curPosition () const
bool dirEntry (dir_t *dir)
bool exists (const char *name)
int16_t fgets (char *str, int16_t num, char *delim=0)
uint32_t fileSize () const
uint32_t firstCluster () const
bool getFilename (char *name)
void getpos (fpos_t *pos)
bool isDir () const
bool isFile () const
bool isOpen () const
bool isRoot () const
bool isSubDir () const
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
void ls (uint8_t flags=0)
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
bool open (const char *path, uint8_t oflag=O_READ)
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
bool openRoot (SdVolume *vol)
int peek ()
bool printName ()
int16_t read ()
int16_t read (void *buf, uint16_t nbyte)
int8_t readDir (dir_t *dir)
bool remove ()
bool rename (SdBaseFile *dirFile, const char *newPath)
void rewind ()
bool rmdir ()
bool rmRfStar ()
 SdBaseFile (const char *path, uint8_t oflag)
 SdBaseFile ()
bool seekCur (int32_t offset)
bool seekEnd (int32_t offset=0)
bool seekSet (uint32_t pos)
void setpos (fpos_t *pos)
bool sync ()
bool timestamp (SdBaseFile *file)
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
bool truncate (uint32_t size)
uint8_t type () const
SdVolumevolume () const
int16_t write (const void *buf, uint16_t nbyte)

-Static Public Member Functions

static SdBaseFilecwd ()
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
static void dateTimeCallbackCancel ()
static void dirName (const dir_t &dir, char *name)
static void printFatDate (uint16_t fatDate)
static void printFatDate (Print *pr, uint16_t fatDate)
static void printFatTime (Print *pr, uint16_t fatTime)
static void printFatTime (uint16_t fatTime)
static bool remove (SdBaseFile *dirFile, const char *path)

-Public Attributes

bool writeError

-Friends

-class SdFat
-

Detailed Description

-

Base class for SdFile with Print and C++ streams.

-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
SdBaseFile::SdBaseFile () [inline]
-
-
-

Create an instance.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
SdBaseFile::SdBaseFile (const char * path,
uint8_t oflag 
)
-
-
-

Create a file object and open it in the current working directory.

-
Parameters:
- - - -
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool SdBaseFile::close ()
-
-
-

Close a file and force cached data and directory information to be written to the storage device.

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include no file is open or an I/O error.
- -

Reimplemented in fstream, ifstream, and ofstream.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::contiguousRange (uint32_t * bgnBlock,
uint32_t * endBlock 
)
-
-
-

Check for contiguous file and return its raw block range.

-
Parameters:
- - - -
[out]bgnBlockthe first block address for the file.
[out]endBlockthe last block address for the file.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is not contiguous, file has zero length or an I/O error occurred.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::createContiguous (SdBaseFiledirFile,
const char * path,
uint32_t size 
)
-
-
-

Create and open a new contiguous file of a specified size.

-
Note:
This function only supports short DOS 8.3 names. See open() for more information.
-
Parameters:
- - - - -
[in]dirFileThe directory where the file will be created.
[in]pathA path with a valid DOS 8.3 file name.
[in]sizeThe desired file size.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include path contains an invalid DOS 8.3 file name, the FAT volume has not been initialized, a file is already open, the file already exists, the root directory is full or an I/O error.
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::curCluster () const [inline]
-
-
-
Returns:
The current cluster number for a file or directory.
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::curPosition () const [inline]
-
-
-
Returns:
The current position for a file or directory.
- -
-
- -
-
- - - - - - - -
static SdBaseFile* SdBaseFile::cwd () [inline, static]
-
-
-
Returns:
Current working directory
- -
-
- -
-
- - - - - - - - -
static void SdBaseFile::dateTimeCallback (void(*)(uint16_t *date, uint16_t *time) dateTime) [inline, static]
-
-
-

Set the date/time callback function

-
Parameters:
- - -
[in]dateTimeThe user's call back function. The callback function is of the form:
-
-
-
 void dateTime(uint16_t* date, uint16_t* time) {
-   uint16_t year;
-   uint8_t month, day, hour, minute, second;
-
-   // User gets date and time from GPS or real-time clock here
-
-   // return date using FAT_DATE macro to format fields
-   *date = FAT_DATE(year, month, day);
-
-   // return time using FAT_TIME macro to format fields
-   *time = FAT_TIME(hour, minute, second);
- }
-

Sets the function that is called when a file is created or when a file's directory entry is modified by sync(). All timestamps, access, creation, and modify, are set when a file is created. sync() maintains the last access date and last modify date/time.

-

See the timestamp() function.

- -
-
- -
-
- - - - - - - -
static void SdBaseFile::dateTimeCallbackCancel () [inline, static]
-
-
-

Cancel the date/time callback function.

- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::dirEntry (dir_tdir)
-
-
-

Return a file's directory entry.

-
Parameters:
- - -
[out]dirLocation for return of the file's directory entry.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void SdBaseFile::dirName (const dir_tdir,
char * name 
) [static]
-
-
-

Format the name field of dir into the 13 byte array name in standard 8.3 short name format.

-
Parameters:
- - - -
[in]dirThe directory structure containing the name.
[out]nameA 13 byte char array for the formatted name.
-
-
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::exists (const char * name)
-
-
-

Test for the existence of a file in a directory

-
Parameters:
- - -
[in]nameName of the file to be tested for.
-
-
-

The calling instance must be an open directory file.

-

dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory dirFile.

-
Returns:
true if the file exists else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int16_t SdBaseFile::fgets (char * str,
int16_t num,
char * delim = 0 
)
-
-
-

Get a string from a file.

-

fgets() reads bytes from a file into the array pointed to by str, until num - 1 bytes are read, or a delimiter is read and transferred to str, or end-of-file is encountered. The string is then terminated with a null byte.

-

fgets() deletes CR, '\r', from the string. This insures only a '\n' terminates the string for Windows text files which use CRLF for newline.

-
Parameters:
- - - - -
[out]strPointer to the array where the string is stored.
[in]numMaximum number of characters to be read (including the final null byte). Usually the length of the array str is used.
[in]delimOptional set of delimiters. The default is "\n".
-
-
-
Returns:
For success fgets() returns the length of the string in str. If no data is read, fgets() returns zero for EOF or -1 if an error occurred.
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::fileSize () const [inline]
-
-
-
Returns:
The total number of bytes in a file or directory.
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::firstCluster () const [inline]
-
-
-
Returns:
The first cluster number for a file or directory.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::getFilename (char * name)
-
-
-

Get a file's name

-
Parameters:
- - -
[out]nameAn array of 13 characters for the file's name.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::getpos (fpos_tpos)
-
-
-

get position for streams

-
Parameters:
- - -
[out]posstruct to receive position
-
-
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isDir () const [inline]
-
-
-
Returns:
True if this is a directory else false.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isFile () const [inline]
-
-
-
Returns:
True if this is a normal file else false.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isOpen () const [inline]
-
-
-
Returns:
True if this is an open file/directory else false.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isRoot () const [inline]
-
-
-
Returns:
True if this is the root directory.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isSubDir () const [inline]
-
-
-
Returns:
True if this is a subdirectory else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void SdBaseFile::ls (Printpr,
uint8_t flags = 0,
uint8_t indent = 0 
)
-
-
-

List directory contents.

-
Parameters:
- - - -
[in]prPrint stream for list.
[in]flagsThe inclusive OR of
-
-
-

LS_DATE - Print file modification date

-

LS_SIZE - Print file size.

-

LS_R - Recursive list of subdirectories.

-
Parameters:
- - -
[in]indentAmount of space before file name. Used for recursive list to indicate subdirectory level.
-
-
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::ls (uint8_t flags = 0)
-
-
-

List directory contents to stdOut.

-
Parameters:
- - -
[in]flagsThe inclusive OR of
-
-
-

LS_DATE - Print file modification date

-

LS_SIZE - Print file size.

-

LS_R - Recursive list of subdirectories.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::mkdir (SdBaseFileparent,
const char * path,
bool pFlag = true 
)
-
-
-

Make a new directory.

-
Parameters:
- - - - -
[in]parentAn open SdFat instance for the directory that will contain the new directory.
[in]pathA path with a valid 8.3 DOS name for the new directory.
[in]pFlagCreate missing parent directories if true.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, parent is not a directory, path is invalid or already exists in parent.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::open (SdBaseFiledirFile,
uint16_t index,
uint8_t oflag 
)
-
-
-

Open a file by index.

-
Parameters:
- - - - -
[in]dirFileAn open SdFat instance for the directory.
[in]indexThe index of the directory entry for the file to be opened. The value for index is (directory file position)/32.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
-
-
-

See open() by path for definition of flags.

-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::open (SdBaseFiledirFile,
const char * path,
uint8_t oflag 
)
-
-
-

Open a file or directory by name.

-
Parameters:
- - - - -
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags from the following list
-
-
-

O_READ - Open for reading.

-

O_RDONLY - Same as O_READ.

-

O_WRITE - Open for writing.

-

O_WRONLY - Same as O_WRITE.

-

O_RDWR - Open for reading and writing.

-

O_APPEND - If set, the file offset shall be set to the end of the file prior to each write.

-

O_AT_END - Set the initial position at the end of the file.

-

O_CREAT - If the file exists, this flag has no effect except as noted under O_EXCL below. Otherwise, the file shall be created

-

O_EXCL - If O_CREAT and O_EXCL are set, open() shall fail if the file exists.

-

O_SYNC - Call sync() after each write. This flag should not be used with write(uint8_t), write_P(PGM_P), writeln_P(PGM_P), or the Arduino Print class. These functions do character at a time writes so sync() will be called after each byte.

-

O_TRUNC - If the file exists and is a regular file, and the file is successfully opened and is not read only, its length shall be truncated to 0.

-

WARNING: A given file must not be opened by more than one SdBaseFile object of file corruption may occur.

-
Note:
Directory files must be opened read only. Write and truncation is not allowed for directory files.
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, dirFile is not a directory, path is invalid, the file does not exist or can't be opened in the access mode specified by oflag.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::open (const char * path,
uint8_t oflag = O_READ 
)
-
-
-

Open a file in the current working directory.

-
Parameters:
- - - -
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -

Reimplemented in fstream, ifstream, and ofstream.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::openNext (SdBaseFiledirFile,
uint8_t oflag 
)
-
-
-

Open the next file or subdirectory in a directory.

-
Parameters:
- - - -
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
-
-
-

See open() by path for definition of flags.

-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::openRoot (SdVolumevol)
-
-
-

Open a volume's root directory.

-
Parameters:
- - -
[in]volThe FAT volume containing the root directory to be opened.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is already open, the FAT volume has not been initialized or it a FAT12 volume.
- -
-
- -
-
- - - - - - - -
int SdBaseFile::peek ()
-
-
-

Return the next available byte without consuming it.

-
Returns:
The byte if no error and not at eof else -1;
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::printFatDate (uint16_t fatDate) [static]
-
-
-

Print a directory date field to stdOut.

-

Format is yyyy-mm-dd.

-
Parameters:
- - -
[in]fatDateThe date field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void SdBaseFile::printFatDate (Printpr,
uint16_t fatDate 
) [static]
-
-
-

Print a directory date field.

-

Format is yyyy-mm-dd.

-
Parameters:
- - - -
[in]prPrint stream for output.
[in]fatDateThe date field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void SdBaseFile::printFatTime (Printpr,
uint16_t fatTime 
) [static]
-
-
-

Print a directory time field.

-

Format is hh:mm:ss.

-
Parameters:
- - - -
[in]prPrint stream for output.
[in]fatTimeThe time field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::printFatTime (uint16_t fatTime) [static]
-
-
-

Print a directory time field to stdOut.

-

Format is hh:mm:ss.

-
Parameters:
- - -
[in]fatTimeThe time field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::printName ()
-
-
-

Print a file's name to stdOut

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - -
int16_t SdBaseFile::read ()
-
-
-

Read the next byte from a file.

-
Returns:
For success read returns the next byte in the file as an int. If an error occurs or end of file is reached -1 is returned.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int16_t SdBaseFile::read (void * buf,
uint16_t nbyte 
)
-
-
-

Read data from a file starting at the current position.

-
Parameters:
- - - -
[out]bufPointer to the location that will receive the data.
[in]nbyteMaximum number of bytes to read.
-
-
-
Returns:
For success read() returns the number of bytes read. A value less than nbyte, including zero, will be returned if end of file is reached. If an error occurs, read() returns -1. Possible errors include read() called before a file has been opened, corrupt file system or an I/O error occurred.
- -
-
- -
-
- - - - - - - - -
int8_t SdBaseFile::readDir (dir_tdir)
-
-
-

Read the next directory entry from a directory file.

-
Parameters:
- - -
[out]dirThe dir_t struct that will receive the data.
-
-
-
Returns:
For success readDir() returns the number of bytes read. A value of zero will be returned if end of file is reached. If an error occurs, readDir() returns -1. Possible errors include readDir() called before a directory has been opened, this is not a directory file or an I/O error occurred.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::remove (SdBaseFiledirFile,
const char * path 
) [static]
-
-
-

Remove a file.

-

The directory entry and all data for the file are deleted.

-
Parameters:
- - - -
[in]dirFileThe directory that contains the file.
[in]pathPath for the file to be removed.
-
-
-
Note:
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is a directory, is read only, dirFile is not a directory, path is not found or an I/O error occurred.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::remove ()
-
-
-

Remove a file.

-

The directory entry and all data for the file are deleted.

-
Note:
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file read-only, is a directory, or an I/O error occurred.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::rename (SdBaseFiledirFile,
const char * newPath 
)
-
-
-

Rename a file or subdirectory.

-
Parameters:
- - - -
[in]dirFileDirectory for the new path.
[in]newPathNew path name for the file/directory.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include dirFile is not open or is not a directory file, newPath is invalid or already exists, or an I/O error occurs.
- -
-
- -
-
- - - - - - - -
void SdBaseFile::rewind () [inline]
-
-
-

Set the file's current position to zero.

- -
-
- -
-
- - - - - - - -
bool SdBaseFile::rmdir ()
-
-
-

Remove a directory file.

-

The directory file will be removed only if it is empty and is not the root directory. rmdir() follows DOS and Windows and ignores the read-only attribute for the directory.

-
Note:
This function should not be used to delete the 8.3 version of a directory that has a long name. For example if a directory has the long name "New folder" you should not delete the 8.3 name "NEWFOL~1".
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is not a directory, is the root directory, is not empty, or an I/O error occurred.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::rmRfStar ()
-
-
-

Recursively delete a directory and all contained files.

-

This is like the Unix/Linux 'rm -rf *' if called with the root directory hence the name.

-

Warning - This will remove all contents of the directory including subdirectories. The directory will then be removed if it is not root. The read-only attribute for files will be ignored.

-
Note:
This function should not be used to delete the 8.3 version of a directory that has a long name. See remove() and rmdir().
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::seekCur (int32_t offset) [inline]
-
-
-

Set the files position to current position + pos. See seekSet().

-
Parameters:
- - -
[in]offsetThe new position in bytes from the current position.
-
-
-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::seekEnd (int32_t offset = 0) [inline]
-
-
-

Set the files position to end-of-file + offset. See seekSet().

-
Parameters:
- - -
[in]offsetThe new position in bytes from end-of-file.
-
-
-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::seekSet (uint32_t pos)
-
-
-

Sets a file's position.

-
Parameters:
- - -
[in]posThe new position in bytes from the beginning of the file.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::setpos (fpos_tpos)
-
-
-

set position for streams

-
Parameters:
- - -
[out]posstruct with value for new position
-
-
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::sync ()
-
-
-

The sync() call causes all modified data and directory fields to be written to the storage device.

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include a call to sync() before a file has been opened or an I/O error.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::timestamp (SdBaseFilefile)
-
-
-

Copy a file's timestamps

-
Parameters:
- - -
[in]fileFile to copy timestamps from.
-
-
-
Note:
Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::timestamp (uint8_t flags,
uint16_t year,
uint8_t month,
uint8_t day,
uint8_t hour,
uint8_t minute,
uint8_t second 
)
-
-
-

Set a file's timestamps in its directory entry.

-
Parameters:
- - -
[in]flagsValues for flags are constructed by a bitwise-inclusive OR of flags from the following list
-
-
-

T_ACCESS - Set the file's last access date.

-

T_CREATE - Set the file's creation date and time.

-

T_WRITE - Set the file's last write/modification date and time.

-
Parameters:
- - - - - - - -
[in]yearValid range 1980 - 2107 inclusive.
[in]monthValid range 1 - 12 inclusive.
[in]dayValid range 1 - 31 inclusive.
[in]hourValid range 0 - 23 inclusive.
[in]minuteValid range 0 - 59 inclusive.
[in]secondValid range 0 - 59 inclusive
-
-
-
Note:
It is possible to set an invalid date since there is no check for the number of days in a month.
-
-Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::truncate (uint32_t length)
-
-
-

Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to length otherwise it will be set to end of file.

-
Parameters:
- - -
[in]lengthThe desired length for the file.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is read only, file is a directory, length is greater than the current file size or an I/O error occurs.
- -
-
- -
-
- - - - - - - -
uint8_t SdBaseFile::type () const [inline]
-
-
-

Type of file. You should use isFile() or isDir() instead of type() if possible.

-
Returns:
The file or directory type.
- -
-
- -
-
- - - - - - - -
SdVolume* SdBaseFile::volume () const [inline]
-
-
-
Returns:
SdVolume that contains this file.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int16_t SdBaseFile::write (const void * buf,
uint16_t nbyte 
)
-
-
-

Write data to an open file.

-
Note:
Data is moved to the cache but may not be written to the storage device until sync() is called.
-
Parameters:
- - - -
[in]bufPointer to the location of the data to be written.
[in]nbyteNumber of bytes to write.
-
-
-
Returns:
For success write() returns the number of bytes written, always nbyte. If an error occurs, write() returns -1. Possible errors include write() is called before a file has been opened, write is called for a read-only file, device is full, a corrupt file system or an I/O error.
- -

Reimplemented in SdFile.

- -
-
-

Member Data Documentation

- -
-
- - - - -
bool SdBaseFile::writeError
-
-
-

writeError is set to true if an error occurs during a write(). Set writeError to false before calling print() and/or write() and check for true after calls to print() and/or write().

- -
-
-
The documentation for this class was generated from the following files:
    -
  • Arduino/libraries/SdFat/SdBaseFile.h
  • -
  • Arduino/libraries/SdFat/SdBaseFile.cpp
  • -
-
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd_base_file__coll__graph.png b/libs/SdFatBeta20120108/html/class_sd_base_file__coll__graph.png deleted file mode 100755 index 98312f9..0000000 Binary files a/libs/SdFatBeta20120108/html/class_sd_base_file__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_sd_base_file__inherit__graph.png b/libs/SdFatBeta20120108/html/class_sd_base_file__inherit__graph.png deleted file mode 100755 index db2f5cb..0000000 Binary files a/libs/SdFatBeta20120108/html/class_sd_base_file__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_sd_fat-members.html b/libs/SdFatBeta20120108/html/class_sd_fat-members.html deleted file mode 100755 index 999fe77..0000000 --- a/libs/SdFatBeta20120108/html/class_sd_fat-members.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
SdFat Member List
-
-
-This is the complete list of members for SdFat, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
card()SdFat [inline]
chdir(bool set_cwd=false)SdFat
chdir(const char *path, bool set_cwd=false)SdFat
chvol()SdFat
errorHalt()SdFat
errorHalt(char const *msg)SdFat
errorHalt_P(PGM_P msg)SdFat
errorPrint()SdFat
errorPrint(char const *msg)SdFat
errorPrint_P(PGM_P msg)SdFat
exists(const char *name)SdFat
init(uint8_t sckRateID=SPI_FULL_SPEED, uint8_t chipSelectPin=SD_CHIP_SELECT_PIN)SdFat
initErrorHalt()SdFat
initErrorHalt(char const *msg)SdFat
initErrorHalt_P(PGM_P msg)SdFat
initErrorPrint()SdFat
initErrorPrint(char const *msg)SdFat
initErrorPrint_P(PGM_P msg)SdFat
ls(uint8_t flags=0)SdFat
ls(Print *pr, uint8_t flags=0)SdFat
mkdir(const char *path, bool pFlag=true)SdFat
remove(const char *path)SdFat
rename(const char *oldPath, const char *newPath)SdFat
rmdir(const char *path)SdFat
SdFat() (defined in SdFat)SdFat [inline]
setStdOut(Print *stream)SdFat [inline, static]
stdOut()SdFat [inline, static]
truncate(const char *path, uint32_t length)SdFat
vol()SdFat [inline]
vwd()SdFat [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd_fat.html b/libs/SdFatBeta20120108/html/class_sd_fat.html deleted file mode 100755 index 46cbbdb..0000000 --- a/libs/SdFatBeta20120108/html/class_sd_fat.html +++ /dev/null @@ -1,832 +0,0 @@ - - - - -SdFat: SdFat Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

Integration class for the SdFat library. - More...

- -

#include <SdFat.h>

-
-Collaboration diagram for SdFat:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

Sd2Cardcard ()
bool chdir (const char *path, bool set_cwd=false)
bool chdir (bool set_cwd=false)
void chvol ()
void errorHalt (char const *msg)
void errorHalt ()
void errorHalt_P (PGM_P msg)
void errorPrint ()
void errorPrint (char const *msg)
void errorPrint_P (PGM_P msg)
bool exists (const char *name)
bool init (uint8_t sckRateID=SPI_FULL_SPEED, uint8_t chipSelectPin=SD_CHIP_SELECT_PIN)
void initErrorHalt ()
void initErrorHalt (char const *msg)
void initErrorHalt_P (PGM_P msg)
void initErrorPrint ()
void initErrorPrint (char const *msg)
void initErrorPrint_P (PGM_P msg)
void ls (Print *pr, uint8_t flags=0)
void ls (uint8_t flags=0)
bool mkdir (const char *path, bool pFlag=true)
bool remove (const char *path)
bool rename (const char *oldPath, const char *newPath)
bool rmdir (const char *path)
bool truncate (const char *path, uint32_t length)
SdVolumevol ()
SdBaseFilevwd ()

-Static Public Member Functions

static void setStdOut (Print *stream)
static PrintstdOut ()
-

Detailed Description

-

Integration class for the SdFat library.

-

Member Function Documentation

- -
-
- - - - - - - -
Sd2Card* SdFat::card () [inline]
-
-
-
Returns:
a pointer to the Sd2Card object.
- -
-
- -
-
- - - - - - - - -
bool SdFat::chdir (bool set_cwd = false)
-
-
-

Change a volume's working directory to root

-

Changes the volume's working directory to the SD's root directory. Optionally set the current working directory to the volume's working directory.

-
Parameters:
- - -
[in]set_cwdSet the current working directory to this volume's working directory if true.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdFat::chdir (const char * path,
bool set_cwd = false 
)
-
-
-

Change a volume's working directory

-

Changes the volume working directory to the path subdirectory. Optionally set the current working directory to the volume's working directory.

-

Example: If the volume's working directory is "/DIR", chdir("SUB") will change the volume's working directory from "/DIR" to "/DIR/SUB".

-

If path is "/", the volume's working directory will be changed to the root directory

-
Parameters:
- - - -
[in]pathThe name of the subdirectory.
[in]set_cwdSet the current working directory to this volume's working directory if true.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - -
void SdFat::chvol ()
-
-
-

Set the current working directory to a volume's working directory.

-

This is useful with multiple SD cards.

-

The current working directory is changed to this volume's working directory.

-

This is like the Windows/DOS <drive letter>: command.

- -
-
- -
-
- - - - - - - -
void SdFat::errorHalt ()
-
-
-

Print any SD error code and halt.

- -
-
- -
-
- - - - - - - - -
void SdFat::errorHalt (char const * msg)
-
-
-

Print msg, any SD error code, and halt.

-
Parameters:
- - -
[in]msgMessage to print.
-
-
- -
-
- -
-
- - - - - - - - -
void SdFat::errorHalt_P (PGM_P msg)
-
-
-

Print msg, any SD error code, and halt.

-
Parameters:
- - -
[in]msgMessage in program space (flash memory) to print.
-
-
- -
-
- -
-
- - - - - - - -
void SdFat::errorPrint ()
-
-
-

Print any SD error code.

- -
-
- -
-
- - - - - - - - -
void SdFat::errorPrint (char const * msg)
-
-
-

Print msg, any SD error code.

-
Parameters:
- - -
[in]msgMessage to print.
-
-
- -
-
- -
-
- - - - - - - - -
void SdFat::errorPrint_P (PGM_P msg)
-
-
-

Print msg, any SD error code.

-
Parameters:
- - -
[in]msgMessage in program space (flash memory) to print.
-
-
- -
-
- -
-
- - - - - - - - -
bool SdFat::exists (const char * name)
-
-
-

Test for the existence of a file.

-
Parameters:
- - -
[in]nameName of the file to be tested for.
-
-
-
Returns:
true if the file exists else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdFat::init (uint8_t sckRateID = SPI_FULL_SPEED,
uint8_t chipSelectPin = SD_CHIP_SELECT_PIN 
)
-
-
-

Initialize an SdFat object.

-

Initializes the SD card, SD volume, and root directory.

-
Parameters:
- - - -
[in]sckRateIDvalue for SPI SCK rate. See Sd2Card::init().
[in]chipSelectPinSD chip select pin. See Sd2Card::init().
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - -
void SdFat::initErrorHalt ()
-
-
-

Print error details and halt after SdFat::init() fails.

- -
-
- -
-
- - - - - - - - -
void SdFat::initErrorHalt (char const * msg)
-
-
-

Print message, error details, and halt after SdFat::init() fails.

-
Parameters:
- - -
[in]msgMessage to print.
-
-
- -
-
- -
-
- - - - - - - - -
void SdFat::initErrorHalt_P (PGM_P msg)
-
-
-

Print message, error details, and halt after SdFat::init() fails.

-
Parameters:
- - -
[in]msgMessage in program space (flash memory) to print.
-
-
- -
-
- -
-
- - - - - - - -
void SdFat::initErrorPrint ()
-
-
-

Print error details after SdFat::init() fails.

- -
-
- -
-
- - - - - - - - -
void SdFat::initErrorPrint (char const * msg)
-
-
-

Print message and error details and halt after SdFat::init() fails.

-
Parameters:
- - -
[in]msgMessage to print.
-
-
- -
-
- -
-
- - - - - - - - -
void SdFat::initErrorPrint_P (PGM_P msg)
-
-
-

Print message and error details after SdFat::init() fails.

-
Parameters:
- - -
[in]msgMessage in program space (flash memory) to print.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void SdFat::ls (Printpr,
uint8_t flags = 0 
)
-
-
-

List the directory contents of the volume working directory.

-
Parameters:
- - - -
[in]prPrint stream for list.
[in]flagsThe inclusive OR of
-
-
-

LS_DATE - Print file modification date

-

LS_SIZE - Print file size.

-

LS_R - Recursive list of subdirectories.

- -
-
- -
-
- - - - - - - - -
void SdFat::ls (uint8_t flags = 0)
-
-
-

List the directory contents of the volume working directory to stdOut.

-
Parameters:
- - -
[in]flagsThe inclusive OR of
-
-
-

LS_DATE - Print file modification date

-

LS_SIZE - Print file size.

-

LS_R - Recursive list of subdirectories.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdFat::mkdir (const char * path,
bool pFlag = true 
)
-
-
-

Make a subdirectory in the volume working directory.

-
Parameters:
- - - -
[in]pathA path with a valid 8.3 DOS name for the subdirectory.
[in]pFlagCreate missing parent directories if true.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool SdFat::remove (const char * path)
-
-
-

Remove a file from the volume working directory.

-
Parameters:
- - -
[in]pathA path with a valid 8.3 DOS name for the file.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdFat::rename (const char * oldPath,
const char * newPath 
)
-
-
-

Rename a file or subdirectory.

-
Parameters:
- - - -
[in]oldPathPath name to the file or subdirectory to be renamed.
[in]newPathNew path name of the file or subdirectory.
-
-
-

The newPath object must not exist before the rename call.

-

The file to be renamed must not be open. The directory entry may be moved and file system corruption could occur if the file is accessed by a file object that was opened before the rename() call.

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool SdFat::rmdir (const char * path)
-
-
-

Remove a subdirectory from the volume's working directory.

-
Parameters:
- - -
[in]pathA path with a valid 8.3 DOS name for the subdirectory.
-
-
-

The subdirectory file will be removed only if it is empty.

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
static void SdFat::setStdOut (Printstream) [inline, static]
-
-
-

Set stdOut Print stream for messages.

-
Parameters:
- - -
[in]streamThe new Print stream.
-
-
- -
-
- -
-
- - - - - - - -
static Print* SdFat::stdOut () [inline, static]
-
-
-
Returns:
Print stream for messages.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdFat::truncate (const char * path,
uint32_t length 
)
-
-
-

Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to length otherwise it will be set to end of file.

-
Parameters:
- - - -
[in]pathA path with a valid 8.3 DOS name for the file.
[in]lengthThe desired length for the file.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is read only, file is a directory, length is greater than the current file size or an I/O error occurs.
- -
-
- -
-
- - - - - - - -
SdVolume* SdFat::vol () [inline]
-
-
-
Returns:
a pointer to the SdVolume object.
- -
-
- -
-
- - - - - - - -
SdBaseFile* SdFat::vwd () [inline]
-
-
-
Returns:
a pointer to the volume working directory.
- -
-
-
The documentation for this class was generated from the following files:
    -
  • Arduino/libraries/SdFat/SdFat.h
  • -
  • Arduino/libraries/SdFat/SdFat.cpp
  • -
-
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd_fat__coll__graph.png b/libs/SdFatBeta20120108/html/class_sd_fat__coll__graph.png deleted file mode 100755 index 248d3af..0000000 Binary files a/libs/SdFatBeta20120108/html/class_sd_fat__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_sd_file-members.html b/libs/SdFatBeta20120108/html/class_sd_file-members.html deleted file mode 100755 index 57d9db6..0000000 --- a/libs/SdFatBeta20120108/html/class_sd_file-members.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
SdFile Member List
-
-
-This is the complete list of members for SdFile, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
close()SdBaseFile
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFile
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFile
curCluster() const SdBaseFile [inline]
curPosition() const SdBaseFile [inline]
cwd()SdBaseFile [inline, static]
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFile [inline, static]
dateTimeCallbackCancel()SdBaseFile [inline, static]
dirEntry(dir_t *dir)SdBaseFile
dirName(const dir_t &dir, char *name)SdBaseFile [static]
exists(const char *name)SdBaseFile
fgets(char *str, int16_t num, char *delim=0)SdBaseFile
fileSize() const SdBaseFile [inline]
firstCluster() const SdBaseFile [inline]
getFilename(char *name)SdBaseFile
getpos(fpos_t *pos)SdBaseFile
isDir() const SdBaseFile [inline]
isFile() const SdBaseFile [inline]
isOpen() const SdBaseFile [inline]
isRoot() const SdBaseFile [inline]
isSubDir() const SdBaseFile [inline]
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFile
ls(uint8_t flags=0)SdBaseFile
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFile
open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFile
open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFile
open(const char *path, uint8_t oflag=O_READ)SdBaseFile
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFile
openRoot(SdVolume *vol)SdBaseFile
peek()SdBaseFile
print(const String &)Print
print(const char[])Print
print(char, int=BYTE)Print
print(unsigned char, int=BYTE)Print
print(int, int=DEC)Print
print(unsigned int, int=DEC)Print
print(long, int=DEC)Print
print(unsigned long, int=DEC)Print
print(double, int=2)Print
printFatDate(uint16_t fatDate)SdBaseFile [static]
printFatDate(Print *pr, uint16_t fatDate)SdBaseFile [static]
printFatTime(uint16_t fatTime)SdBaseFile [static]
printFatTime(Print *pr, uint16_t fatTime)SdBaseFile [static]
println(const String &s)Print
println(const char[])Print
println(char, int=BYTE)Print
println(unsigned char, int=BYTE)Print
println(int, int=DEC)Print
println(unsigned int, int=DEC)Print
println(long, int=DEC)Print
println(unsigned long, int=DEC)Print
println(double, int=2)Print
println(void)Print
printName()SdBaseFile
read()SdBaseFile
read(void *buf, uint16_t nbyte)SdBaseFile
readDir(dir_t *dir)SdBaseFile
remove(SdBaseFile *dirFile, const char *path)SdBaseFile [static]
remove()SdBaseFile
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFile
rewind()SdBaseFile [inline]
rmdir()SdBaseFile
rmRfStar()SdBaseFile
SdBaseFile()SdBaseFile [inline]
SdBaseFile(const char *path, uint8_t oflag)SdBaseFile
SdFile() (defined in SdFile)SdFile [inline]
SdFile(const char *name, uint8_t oflag)SdFile
seekCur(int32_t offset)SdBaseFile [inline]
seekEnd(int32_t offset=0)SdBaseFile [inline]
seekSet(uint32_t pos)SdBaseFile
setpos(fpos_t *pos)SdBaseFile
sync()SdBaseFile
timestamp(SdBaseFile *file)SdBaseFile
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFile
truncate(uint32_t size)SdBaseFile
type() const SdBaseFile [inline]
volume() const SdBaseFile [inline]
write(uint8_t b)SdFile [virtual]
write(const char *str)SdFile [virtual]
write(const void *buf, uint16_t nbyte)SdFile
Print::write(const uint8_t *buffer, size_t size)Print [virtual]
write_P(PGM_P str)SdFile
writeErrorSdBaseFile
writeln_P(PGM_P str)SdFile
~SdBaseFile() (defined in SdBaseFile)SdBaseFile [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd_file.html b/libs/SdFatBeta20120108/html/class_sd_file.html deleted file mode 100755 index bf3bc55..0000000 --- a/libs/SdFatBeta20120108/html/class_sd_file.html +++ /dev/null @@ -1,2498 +0,0 @@ - - - - -SdFat: SdFile Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

SdBaseFile with Print. - More...

- -

#include <SdFile.h>

-
-Inheritance diagram for SdFile:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for SdFile:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

bool close ()
bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
uint32_t curCluster () const
uint32_t curPosition () const
bool dirEntry (dir_t *dir)
bool exists (const char *name)
int16_t fgets (char *str, int16_t num, char *delim=0)
uint32_t fileSize () const
uint32_t firstCluster () const
bool getFilename (char *name)
void getpos (fpos_t *pos)
bool isDir () const
bool isFile () const
bool isOpen () const
bool isRoot () const
bool isSubDir () const
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
void ls (uint8_t flags=0)
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
bool open (const char *path, uint8_t oflag=O_READ)
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
bool openRoot (SdVolume *vol)
int peek ()
void print (unsigned int, int=DEC)
void print (unsigned long, int=DEC)
void print (double, int=2)
void print (unsigned char, int=BYTE)
void print (const String &)
void print (const char[])
void print (char, int=BYTE)
void print (int, int=DEC)
void print (long, int=DEC)
void println (char, int=BYTE)
void println (const char[])
void println (unsigned char, int=BYTE)
void println (unsigned int, int=DEC)
void println (unsigned long, int=DEC)
void println (void)
void println (int, int=DEC)
void println (const String &s)
void println (double, int=2)
void println (long, int=DEC)
bool printName ()
int16_t read (void *buf, uint16_t nbyte)
int16_t read ()
int8_t readDir (dir_t *dir)
bool remove ()
bool rename (SdBaseFile *dirFile, const char *newPath)
void rewind ()
bool rmdir ()
bool rmRfStar ()
 SdFile (const char *name, uint8_t oflag)
bool seekCur (int32_t offset)
bool seekEnd (int32_t offset=0)
bool seekSet (uint32_t pos)
void setpos (fpos_t *pos)
bool sync ()
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
bool timestamp (SdBaseFile *file)
bool truncate (uint32_t size)
uint8_t type () const
SdVolumevolume () const
void write (const char *str)
virtual void write (const uint8_t *buffer, size_t size)
void write (uint8_t b)
int16_t write (const void *buf, uint16_t nbyte)
void write_P (PGM_P str)
void writeln_P (PGM_P str)

-Static Public Member Functions

static SdBaseFilecwd ()
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
static void dateTimeCallbackCancel ()
static void dirName (const dir_t &dir, char *name)
static void printFatDate (uint16_t fatDate)
static void printFatDate (Print *pr, uint16_t fatDate)
static void printFatTime (Print *pr, uint16_t fatTime)
static void printFatTime (uint16_t fatTime)
static bool remove (SdBaseFile *dirFile, const char *path)

-Public Attributes

bool writeError
-

Detailed Description

-

Constructor & Destructor Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
SdFile::SdFile (const char * path,
uint8_t oflag 
)
-
-
-

Create a file object and open it in the current working directory.

-
Parameters:
- - - -
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool SdBaseFile::close () [inherited]
-
-
-

Close a file and force cached data and directory information to be written to the storage device.

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include no file is open or an I/O error.
- -

Reimplemented in fstream, ifstream, and ofstream.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::contiguousRange (uint32_t * bgnBlock,
uint32_t * endBlock 
) [inherited]
-
-
-

Check for contiguous file and return its raw block range.

-
Parameters:
- - - -
[out]bgnBlockthe first block address for the file.
[out]endBlockthe last block address for the file.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is not contiguous, file has zero length or an I/O error occurred.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::createContiguous (SdBaseFiledirFile,
const char * path,
uint32_t size 
) [inherited]
-
-
-

Create and open a new contiguous file of a specified size.

-
Note:
This function only supports short DOS 8.3 names. See open() for more information.
-
Parameters:
- - - - -
[in]dirFileThe directory where the file will be created.
[in]pathA path with a valid DOS 8.3 file name.
[in]sizeThe desired file size.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include path contains an invalid DOS 8.3 file name, the FAT volume has not been initialized, a file is already open, the file already exists, the root directory is full or an I/O error.
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::curCluster () const [inline, inherited]
-
-
-
Returns:
The current cluster number for a file or directory.
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::curPosition () const [inline, inherited]
-
-
-
Returns:
The current position for a file or directory.
- -
-
- -
-
- - - - - - - -
static SdBaseFile* SdBaseFile::cwd () [inline, static, inherited]
-
-
-
Returns:
Current working directory
- -
-
- -
-
- - - - - - - - -
static void SdBaseFile::dateTimeCallback (void(*)(uint16_t *date, uint16_t *time) dateTime) [inline, static, inherited]
-
-
-

Set the date/time callback function

-
Parameters:
- - -
[in]dateTimeThe user's call back function. The callback function is of the form:
-
-
-
 void dateTime(uint16_t* date, uint16_t* time) {
-   uint16_t year;
-   uint8_t month, day, hour, minute, second;
-
-   // User gets date and time from GPS or real-time clock here
-
-   // return date using FAT_DATE macro to format fields
-   *date = FAT_DATE(year, month, day);
-
-   // return time using FAT_TIME macro to format fields
-   *time = FAT_TIME(hour, minute, second);
- }
-

Sets the function that is called when a file is created or when a file's directory entry is modified by sync(). All timestamps, access, creation, and modify, are set when a file is created. sync() maintains the last access date and last modify date/time.

-

See the timestamp() function.

- -
-
- -
-
- - - - - - - -
static void SdBaseFile::dateTimeCallbackCancel () [inline, static, inherited]
-
-
-

Cancel the date/time callback function.

- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::dirEntry (dir_tdir) [inherited]
-
-
-

Return a file's directory entry.

-
Parameters:
- - -
[out]dirLocation for return of the file's directory entry.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void SdBaseFile::dirName (const dir_tdir,
char * name 
) [static, inherited]
-
-
-

Format the name field of dir into the 13 byte array name in standard 8.3 short name format.

-
Parameters:
- - - -
[in]dirThe directory structure containing the name.
[out]nameA 13 byte char array for the formatted name.
-
-
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::exists (const char * name) [inherited]
-
-
-

Test for the existence of a file in a directory

-
Parameters:
- - -
[in]nameName of the file to be tested for.
-
-
-

The calling instance must be an open directory file.

-

dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory dirFile.

-
Returns:
true if the file exists else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int16_t SdBaseFile::fgets (char * str,
int16_t num,
char * delim = 0 
) [inherited]
-
-
-

Get a string from a file.

-

fgets() reads bytes from a file into the array pointed to by str, until num - 1 bytes are read, or a delimiter is read and transferred to str, or end-of-file is encountered. The string is then terminated with a null byte.

-

fgets() deletes CR, '\r', from the string. This insures only a '\n' terminates the string for Windows text files which use CRLF for newline.

-
Parameters:
- - - - -
[out]strPointer to the array where the string is stored.
[in]numMaximum number of characters to be read (including the final null byte). Usually the length of the array str is used.
[in]delimOptional set of delimiters. The default is "\n".
-
-
-
Returns:
For success fgets() returns the length of the string in str. If no data is read, fgets() returns zero for EOF or -1 if an error occurred.
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::fileSize () const [inline, inherited]
-
-
-
Returns:
The total number of bytes in a file or directory.
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::firstCluster () const [inline, inherited]
-
-
-
Returns:
The first cluster number for a file or directory.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::getFilename (char * name) [inherited]
-
-
-

Get a file's name

-
Parameters:
- - -
[out]nameAn array of 13 characters for the file's name.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::getpos (fpos_tpos) [inherited]
-
-
-

get position for streams

-
Parameters:
- - -
[out]posstruct to receive position
-
-
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isDir () const [inline, inherited]
-
-
-
Returns:
True if this is a directory else false.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isFile () const [inline, inherited]
-
-
-
Returns:
True if this is a normal file else false.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isOpen () const [inline, inherited]
-
-
-
Returns:
True if this is an open file/directory else false.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isRoot () const [inline, inherited]
-
-
-
Returns:
True if this is the root directory.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isSubDir () const [inline, inherited]
-
-
-
Returns:
True if this is a subdirectory else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void SdBaseFile::ls (Printpr,
uint8_t flags = 0,
uint8_t indent = 0 
) [inherited]
-
-
-

List directory contents.

-
Parameters:
- - - -
[in]prPrint stream for list.
[in]flagsThe inclusive OR of
-
-
-

LS_DATE - Print file modification date

-

LS_SIZE - Print file size.

-

LS_R - Recursive list of subdirectories.

-
Parameters:
- - -
[in]indentAmount of space before file name. Used for recursive list to indicate subdirectory level.
-
-
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::ls (uint8_t flags = 0) [inherited]
-
-
-

List directory contents to stdOut.

-
Parameters:
- - -
[in]flagsThe inclusive OR of
-
-
-

LS_DATE - Print file modification date

-

LS_SIZE - Print file size.

-

LS_R - Recursive list of subdirectories.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::mkdir (SdBaseFileparent,
const char * path,
bool pFlag = true 
) [inherited]
-
-
-

Make a new directory.

-
Parameters:
- - - - -
[in]parentAn open SdFat instance for the directory that will contain the new directory.
[in]pathA path with a valid 8.3 DOS name for the new directory.
[in]pFlagCreate missing parent directories if true.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, parent is not a directory, path is invalid or already exists in parent.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::open (SdBaseFiledirFile,
const char * path,
uint8_t oflag 
) [inherited]
-
-
-

Open a file or directory by name.

-
Parameters:
- - - - -
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags from the following list
-
-
-

O_READ - Open for reading.

-

O_RDONLY - Same as O_READ.

-

O_WRITE - Open for writing.

-

O_WRONLY - Same as O_WRITE.

-

O_RDWR - Open for reading and writing.

-

O_APPEND - If set, the file offset shall be set to the end of the file prior to each write.

-

O_AT_END - Set the initial position at the end of the file.

-

O_CREAT - If the file exists, this flag has no effect except as noted under O_EXCL below. Otherwise, the file shall be created

-

O_EXCL - If O_CREAT and O_EXCL are set, open() shall fail if the file exists.

-

O_SYNC - Call sync() after each write. This flag should not be used with write(uint8_t), write_P(PGM_P), writeln_P(PGM_P), or the Arduino Print class. These functions do character at a time writes so sync() will be called after each byte.

-

O_TRUNC - If the file exists and is a regular file, and the file is successfully opened and is not read only, its length shall be truncated to 0.

-

WARNING: A given file must not be opened by more than one SdBaseFile object of file corruption may occur.

-
Note:
Directory files must be opened read only. Write and truncation is not allowed for directory files.
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, dirFile is not a directory, path is invalid, the file does not exist or can't be opened in the access mode specified by oflag.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::open (const char * path,
uint8_t oflag = O_READ 
) [inherited]
-
-
-

Open a file in the current working directory.

-
Parameters:
- - - -
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -

Reimplemented in fstream, ifstream, and ofstream.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::open (SdBaseFiledirFile,
uint16_t index,
uint8_t oflag 
) [inherited]
-
-
-

Open a file by index.

-
Parameters:
- - - - -
[in]dirFileAn open SdFat instance for the directory.
[in]indexThe index of the directory entry for the file to be opened. The value for index is (directory file position)/32.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
-
-
-

See open() by path for definition of flags.

-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::openNext (SdBaseFiledirFile,
uint8_t oflag 
) [inherited]
-
-
-

Open the next file or subdirectory in a directory.

-
Parameters:
- - - -
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
-
-
-

See open() by path for definition of flags.

-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::openRoot (SdVolumevol) [inherited]
-
-
-

Open a volume's root directory.

-
Parameters:
- - -
[in]volThe FAT volume containing the root directory to be opened.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is already open, the FAT volume has not been initialized or it a FAT12 volume.
- -
-
- -
-
- - - - - - - -
int SdBaseFile::peek () [inherited]
-
-
-

Return the next available byte without consuming it.

-
Returns:
The byte if no error and not at eof else -1;
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (unsigned char b,
int base = BYTE 
) [inherited]
-
-
-

Write an unsigned byte to the associated device in ASCII.

-
Parameters:
- - - -
[in]bthe byte to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (int n,
int base = DEC 
) [inherited]
-
-
-

Write an signed number to the associated device in ASCII.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (unsigned int n,
int base = DEC 
) [inherited]
-
-
-

Write an unsigned number to the associated device in ASCII.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (unsigned long n,
int base = DEC 
) [inherited]
-
-
-

Write an unsigned number to the associated device in ASCII.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (double n,
int digits = 2 
) [inherited]
-
-
-

Write the decimal representation of an float or double to the associated device in ASCII.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]digitsthe digits in ftraction to be printed
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (long n,
int base = DEC 
) [inherited]
-
-
-

Write an signed number to the associated device in ASCII.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - -
void Print::print (const char str[]) [inherited]
-
-
-

Write a string to the associated device.

-
Parameters:
- - -
[in]strthe string to be printed
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::print (char c,
int base = BYTE 
) [inherited]
-
-
-

Write an signed byte to the associated device in ASCII.

-
Parameters:
- - - -
[in]cthe byte to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - -
void Print::print (const String & s) [inherited]
-
-
-

Write a string to the associated device.

-
Parameters:
- - -
[in]sthe string to be printed
-
-
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::printFatDate (uint16_t fatDate) [static, inherited]
-
-
-

Print a directory date field to stdOut.

-

Format is yyyy-mm-dd.

-
Parameters:
- - -
[in]fatDateThe date field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void SdBaseFile::printFatDate (Printpr,
uint16_t fatDate 
) [static, inherited]
-
-
-

Print a directory date field.

-

Format is yyyy-mm-dd.

-
Parameters:
- - - -
[in]prPrint stream for output.
[in]fatDateThe date field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::printFatTime (uint16_t fatTime) [static, inherited]
-
-
-

Print a directory time field to stdOut.

-

Format is hh:mm:ss.

-
Parameters:
- - -
[in]fatTimeThe time field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void SdBaseFile::printFatTime (Printpr,
uint16_t fatTime 
) [static, inherited]
-
-
-

Print a directory time field.

-

Format is hh:mm:ss.

-
Parameters:
- - - -
[in]prPrint stream for output.
[in]fatTimeThe time field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (char c,
int base = BYTE 
) [inherited]
-
-
-

Write an signed byte to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]cthe byte to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - -
void Print::println (const char c[]) [inherited]
-
-
-

Write a string to the associated device followed by CR LF.

-
Parameters:
- - -
[in]cthe string to be printed
-
-
- -
-
- -
-
- - - - - - - - -
void Print::println (const String & s) [inherited]
-
-
-

Write a string to the associated device followed by CR LF.

-
Parameters:
- - -
[in]sthe string to be printed
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (double n,
int digits = 2 
) [inherited]
-
-
-

Write the decimal representation of an float or double to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]digitsthe digits in ftraction to be printed
-
-
- -
-
- -
-
- - - - - - - - -
void Print::println (void ) [inherited]
-
-
-

Print CR LF

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (unsigned long n,
int base = DEC 
) [inherited]
-
-
-

Write an unsigned number to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (unsigned char b,
int base = BYTE 
) [inherited]
-
-
-

Write an unsigned byte to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]bthe byte to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (long n,
int base = DEC 
) [inherited]
-
-
-

Write an signed number to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (unsigned int n,
int base = DEC 
) [inherited]
-
-
-

Write an unsigned number to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::println (int n,
int base = DEC 
) [inherited]
-
-
-

Write an signed number to the associated device in ASCII followed by CR LF.

-
Parameters:
- - - -
[in]nthe number to be printed
[in]baseformat to be used
-
-
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::printName () [inherited]
-
-
-

Print a file's name to stdOut

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - -
int16_t SdBaseFile::read () [inherited]
-
-
-

Read the next byte from a file.

-
Returns:
For success read returns the next byte in the file as an int. If an error occurs or end of file is reached -1 is returned.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int16_t SdBaseFile::read (void * buf,
uint16_t nbyte 
) [inherited]
-
-
-

Read data from a file starting at the current position.

-
Parameters:
- - - -
[out]bufPointer to the location that will receive the data.
[in]nbyteMaximum number of bytes to read.
-
-
-
Returns:
For success read() returns the number of bytes read. A value less than nbyte, including zero, will be returned if end of file is reached. If an error occurs, read() returns -1. Possible errors include read() called before a file has been opened, corrupt file system or an I/O error occurred.
- -
-
- -
-
- - - - - - - - -
int8_t SdBaseFile::readDir (dir_tdir) [inherited]
-
-
-

Read the next directory entry from a directory file.

-
Parameters:
- - -
[out]dirThe dir_t struct that will receive the data.
-
-
-
Returns:
For success readDir() returns the number of bytes read. A value of zero will be returned if end of file is reached. If an error occurs, readDir() returns -1. Possible errors include readDir() called before a directory has been opened, this is not a directory file or an I/O error occurred.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::remove () [inherited]
-
-
-

Remove a file.

-

The directory entry and all data for the file are deleted.

-
Note:
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file read-only, is a directory, or an I/O error occurred.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::remove (SdBaseFiledirFile,
const char * path 
) [static, inherited]
-
-
-

Remove a file.

-

The directory entry and all data for the file are deleted.

-
Parameters:
- - - -
[in]dirFileThe directory that contains the file.
[in]pathPath for the file to be removed.
-
-
-
Note:
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is a directory, is read only, dirFile is not a directory, path is not found or an I/O error occurred.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::rename (SdBaseFiledirFile,
const char * newPath 
) [inherited]
-
-
-

Rename a file or subdirectory.

-
Parameters:
- - - -
[in]dirFileDirectory for the new path.
[in]newPathNew path name for the file/directory.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include dirFile is not open or is not a directory file, newPath is invalid or already exists, or an I/O error occurs.
- -
-
- -
-
- - - - - - - -
void SdBaseFile::rewind () [inline, inherited]
-
-
-

Set the file's current position to zero.

- -
-
- -
-
- - - - - - - -
bool SdBaseFile::rmdir () [inherited]
-
-
-

Remove a directory file.

-

The directory file will be removed only if it is empty and is not the root directory. rmdir() follows DOS and Windows and ignores the read-only attribute for the directory.

-
Note:
This function should not be used to delete the 8.3 version of a directory that has a long name. For example if a directory has the long name "New folder" you should not delete the 8.3 name "NEWFOL~1".
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is not a directory, is the root directory, is not empty, or an I/O error occurred.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::rmRfStar () [inherited]
-
-
-

Recursively delete a directory and all contained files.

-

This is like the Unix/Linux 'rm -rf *' if called with the root directory hence the name.

-

Warning - This will remove all contents of the directory including subdirectories. The directory will then be removed if it is not root. The read-only attribute for files will be ignored.

-
Note:
This function should not be used to delete the 8.3 version of a directory that has a long name. See remove() and rmdir().
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::seekCur (int32_t offset) [inline, inherited]
-
-
-

Set the files position to current position + pos. See seekSet().

-
Parameters:
- - -
[in]offsetThe new position in bytes from the current position.
-
-
-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::seekEnd (int32_t offset = 0) [inline, inherited]
-
-
-

Set the files position to end-of-file + offset. See seekSet().

-
Parameters:
- - -
[in]offsetThe new position in bytes from end-of-file.
-
-
-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::seekSet (uint32_t pos) [inherited]
-
-
-

Sets a file's position.

-
Parameters:
- - -
[in]posThe new position in bytes from the beginning of the file.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::setpos (fpos_tpos) [inherited]
-
-
-

set position for streams

-
Parameters:
- - -
[out]posstruct with value for new position
-
-
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::sync () [inherited]
-
-
-

The sync() call causes all modified data and directory fields to be written to the storage device.

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include a call to sync() before a file has been opened or an I/O error.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::timestamp (SdBaseFilefile) [inherited]
-
-
-

Copy a file's timestamps

-
Parameters:
- - -
[in]fileFile to copy timestamps from.
-
-
-
Note:
Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::timestamp (uint8_t flags,
uint16_t year,
uint8_t month,
uint8_t day,
uint8_t hour,
uint8_t minute,
uint8_t second 
) [inherited]
-
-
-

Set a file's timestamps in its directory entry.

-
Parameters:
- - -
[in]flagsValues for flags are constructed by a bitwise-inclusive OR of flags from the following list
-
-
-

T_ACCESS - Set the file's last access date.

-

T_CREATE - Set the file's creation date and time.

-

T_WRITE - Set the file's last write/modification date and time.

-
Parameters:
- - - - - - - -
[in]yearValid range 1980 - 2107 inclusive.
[in]monthValid range 1 - 12 inclusive.
[in]dayValid range 1 - 31 inclusive.
[in]hourValid range 0 - 23 inclusive.
[in]minuteValid range 0 - 59 inclusive.
[in]secondValid range 0 - 59 inclusive
-
-
-
Note:
It is possible to set an invalid date since there is no check for the number of days in a month.
-
-Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::truncate (uint32_t length) [inherited]
-
-
-

Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to length otherwise it will be set to end of file.

-
Parameters:
- - -
[in]lengthThe desired length for the file.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is read only, file is a directory, length is greater than the current file size or an I/O error occurs.
- -
-
- -
-
- - - - - - - -
uint8_t SdBaseFile::type () const [inline, inherited]
-
-
-

Type of file. You should use isFile() or isDir() instead of type() if possible.

-
Returns:
The file or directory type.
- -
-
- -
-
- - - - - - - -
SdVolume* SdBaseFile::volume () const [inline, inherited]
-
-
-
Returns:
SdVolume that contains this file.
- -
-
- -
-
- - - - - - - - -
void SdFile::write (uint8_t b) [virtual]
-
-
-

Write a byte to a file. Required by the Arduino Print class.

-
Parameters:
- - -
[in]bthe byte to be written. Use writeError to check for errors.
-
-
- -

Implements Print.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int16_t SdFile::write (const void * buf,
uint16_t nbyte 
)
-
-
-

Write data to an open file.

-
Note:
Data is moved to the cache but may not be written to the storage device until sync() is called.
-
Parameters:
- - - -
[in]bufPointer to the location of the data to be written.
[in]nbyteNumber of bytes to write.
-
-
-
Returns:
For success write() returns the number of bytes written, always nbyte. If an error occurs, write() returns -1. Possible errors include write() is called before a file has been opened, write is called for a read-only file, device is full, a corrupt file system or an I/O error.
- -

Reimplemented from SdBaseFile.

- -
-
- -
-
- - - - - - - - -
void SdFile::write (const char * str) [virtual]
-
-
-

Write a string to a file. Used by the Arduino Print class.

-
Parameters:
- - -
[in]strPointer to the string. Use writeError to check for errors.
-
-
- -

Reimplemented from Print.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void Print::write (const uint8_t * buffer,
size_t size 
) [virtual, inherited]
-
-
-

default implementation: may be overridden

-
Parameters:
- - - -
[in]bufferpointer to data
[in]sizecount of bytes to be written
-
-
- -
-
- -
-
- - - - - - - - -
void SdFile::write_P (PGM_P str)
-
-
-

Write a PROGMEM string to a file.

-
Parameters:
- - -
[in]strPointer to the PROGMEM string. Use writeError to check for errors.
-
-
- -
-
- -
-
- - - - - - - - -
void SdFile::writeln_P (PGM_P str)
-
-
-

Write a PROGMEM string followed by CR/LF to a file.

-
Parameters:
- - -
[in]strPointer to the PROGMEM string. Use writeError to check for errors.
-
-
- -
-
-

Member Data Documentation

- -
-
- - - - -
bool SdBaseFile::writeError [inherited]
-
-
-

writeError is set to true if an error occurs during a write(). Set writeError to false before calling print() and/or write() and check for true after calls to print() and/or write().

- -
-
-
The documentation for this class was generated from the following files:
    -
  • Arduino/libraries/SdFat/SdFile.h
  • -
  • Arduino/libraries/SdFat/SdFile.cpp
  • -
-
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd_file__coll__graph.png b/libs/SdFatBeta20120108/html/class_sd_file__coll__graph.png deleted file mode 100755 index c3f6d67..0000000 Binary files a/libs/SdFatBeta20120108/html/class_sd_file__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_sd_file__inherit__graph.png b/libs/SdFatBeta20120108/html/class_sd_file__inherit__graph.png deleted file mode 100755 index 54399b3..0000000 Binary files a/libs/SdFatBeta20120108/html/class_sd_file__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_sd_stream_base-members.html b/libs/SdFatBeta20120108/html/class_sd_stream_base-members.html deleted file mode 100755 index 25eaf5c..0000000 --- a/libs/SdFatBeta20120108/html/class_sd_stream_base-members.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
SdStreamBase Member List
-
-
-This is the complete list of members for SdStreamBase, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
clear(iostate state=goodbit)ios [inline]
close()SdBaseFile [protected]
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFile [protected]
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFile [protected]
cur enum valueios_base
curCluster() const SdBaseFile [inline, protected]
curPosition() const SdBaseFile [inline, protected]
cwd()SdBaseFile [inline, protected, static]
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFile [inline, protected, static]
dateTimeCallbackCancel()SdBaseFile [inline, protected, static]
decios_base [static]
dirEntry(dir_t *dir)SdBaseFile [protected]
dirName(const dir_t &dir, char *name)SdBaseFile [protected, static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
exists(const char *name)SdBaseFile [protected]
fail() const ios [inline]
failbitios_base [static]
fgets(char *str, int16_t num, char *delim=0)SdBaseFile [protected]
fileSize() const SdBaseFile [inline, protected]
fill()ios_base [inline]
fill(char c)ios_base [inline]
firstCluster() const SdBaseFile [inline, protected]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
fmtflags typedefios_base
getFilename(char *name)SdBaseFile [protected]
getpos(fpos_t *pos)SdBaseFile [protected]
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
inios_base [static]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
isDir() const SdBaseFile [inline, protected]
isFile() const SdBaseFile [inline, protected]
isOpen() const SdBaseFile [inline, protected]
isRoot() const SdBaseFile [inline, protected]
isSubDir() const SdBaseFile [inline, protected]
leftios_base [static]
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFile [protected]
ls(uint8_t flags=0)SdBaseFile [protected]
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFile [protected]
octios_base [static]
off_type typedefios_base
open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFile [protected]
open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFile [protected]
open(const char *path, uint8_t oflag=O_READ)SdBaseFile [protected]
openmode typedefios_base
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFile [protected]
openRoot(SdVolume *vol)SdBaseFile [protected]
operator const void *() const ios [inline]
operator!() const ios [inline]
outios_base [static]
peek()SdBaseFile [protected]
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
printFatDate(uint16_t fatDate)SdBaseFile [protected, static]
printFatDate(Print *pr, uint16_t fatDate)SdBaseFile [protected, static]
printFatTime(uint16_t fatTime)SdBaseFile [protected, static]
printFatTime(Print *pr, uint16_t fatTime)SdBaseFile [protected, static]
printName()SdBaseFile [protected]
rdstate() const ios [inline]
read()SdBaseFile [protected]
read(void *buf, uint16_t nbyte)SdBaseFile [protected]
readDir(dir_t *dir)SdBaseFile [protected]
remove(SdBaseFile *dirFile, const char *path)SdBaseFile [protected, static]
remove()SdBaseFile [protected]
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFile [protected]
rewind()SdBaseFile [inline, protected]
rightios_base [static]
rmdir()SdBaseFile [protected]
rmRfStar()SdBaseFile [protected]
SdBaseFile()SdBaseFile [inline, protected]
SdBaseFile(const char *path, uint8_t oflag)SdBaseFile [protected]
seekCur(int32_t offset)SdBaseFile [inline, protected]
seekdir enum nameios_base
seekEnd(int32_t offset=0)SdBaseFile [inline, protected]
seekSet(uint32_t pos)SdBaseFile [protected]
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setpos(fpos_t *pos)SdBaseFile [protected]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipwsios_base [static]
streamsize typedefios_base
sync()SdBaseFile [protected]
timestamp(SdBaseFile *file)SdBaseFile [protected]
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFile [protected]
truncios_base [static]
truncate(uint32_t size)SdBaseFile [protected]
type() const SdBaseFile [inline, protected]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
volume() const SdBaseFile [inline, protected]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
write(const void *buf, uint16_t nbyte)SdBaseFile [protected]
writeErrorSdBaseFile [protected]
~SdBaseFile() (defined in SdBaseFile)SdBaseFile [inline, protected]
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd_stream_base.html b/libs/SdFatBeta20120108/html/class_sd_stream_base.html deleted file mode 100755 index 9dca56b..0000000 --- a/libs/SdFatBeta20120108/html/class_sd_stream_base.html +++ /dev/null @@ -1,2652 +0,0 @@ - - - - -SdFat: SdStreamBase Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

Base class for SD streams. - More...

- -

#include <SdStream.h>

-
-Inheritance diagram for SdStreamBase:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for SdStreamBase:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

bool bad () const
void clear (iostate state=goodbit)
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
bool good () const
 operator const void * () const
bool operator! () const
int precision (unsigned int n)
int precision () const
iostate rdstate () const
fmtflags setf (fmtflags fl)
fmtflags setf (fmtflags fl, fmtflags mask)
void setstate (iostate state)
void unsetf (fmtflags fl)
unsigned width (unsigned n)
unsigned width ()

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

bool close ()
bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
uint32_t curCluster () const
uint32_t curPosition () const
bool dirEntry (dir_t *dir)
bool exists (const char *name)
int16_t fgets (char *str, int16_t num, char *delim=0)
uint32_t fileSize () const
uint32_t firstCluster () const
uint8_t flagsToBase ()
bool getFilename (char *name)
void getpos (fpos_t *pos)
bool isDir () const
bool isFile () const
bool isOpen () const
bool isRoot () const
bool isSubDir () const
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
void ls (uint8_t flags=0)
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
bool open (const char *path, uint8_t oflag=O_READ)
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
bool openRoot (SdVolume *vol)
int peek ()
bool printName ()
int16_t read ()
int16_t read (void *buf, uint16_t nbyte)
int8_t readDir (dir_t *dir)
bool remove ()
bool rename (SdBaseFile *dirFile, const char *newPath)
void rewind ()
bool rmdir ()
bool rmRfStar ()
bool seekCur (int32_t offset)
bool seekEnd (int32_t offset=0)
bool seekSet (uint32_t pos)
void setpos (fpos_t *pos)
bool sync ()
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
bool timestamp (SdBaseFile *file)
bool truncate (uint32_t size)
uint8_t type () const
SdVolumevolume () const
int16_t write (const void *buf, uint16_t nbyte)

-Static Protected Member Functions

static SdBaseFilecwd ()
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
static void dateTimeCallbackCancel ()
static void dirName (const dir_t &dir, char *name)
static void printFatDate (uint16_t fatDate)
static void printFatDate (Print *pr, uint16_t fatDate)
static void printFatTime (Print *pr, uint16_t fatTime)
static void printFatTime (uint16_t fatTime)
static bool remove (SdBaseFile *dirFile, const char *path)

-Protected Attributes

bool writeError
-

Detailed Description

-

Base class for SD streams.

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline, inherited]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - - -
void ios::clear (iostate state = goodbit) [inline, inherited]
-
-
-

Clear iostate bits.

-
Parameters:
- - -
[in]stateThe flags you want to set after clearing all flags.
-
-
- -

Reimplemented in fstream, and ofstream.

- -
-
- -
-
- - - - - - - -
bool SdBaseFile::close () [inherited]
-
-
-

Close a file and force cached data and directory information to be written to the storage device.

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include no file is open or an I/O error.
- -

Reimplemented in fstream, ifstream, and ofstream.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::contiguousRange (uint32_t * bgnBlock,
uint32_t * endBlock 
) [inherited]
-
-
-

Check for contiguous file and return its raw block range.

-
Parameters:
- - - -
[out]bgnBlockthe first block address for the file.
[out]endBlockthe last block address for the file.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is not contiguous, file has zero length or an I/O error occurred.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::createContiguous (SdBaseFiledirFile,
const char * path,
uint32_t size 
) [inherited]
-
-
-

Create and open a new contiguous file of a specified size.

-
Note:
This function only supports short DOS 8.3 names. See open() for more information.
-
Parameters:
- - - - -
[in]dirFileThe directory where the file will be created.
[in]pathA path with a valid DOS 8.3 file name.
[in]sizeThe desired file size.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include path contains an invalid DOS 8.3 file name, the FAT volume has not been initialized, a file is already open, the file already exists, the root directory is full or an I/O error.
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::curCluster () const [inline, inherited]
-
-
-
Returns:
The current cluster number for a file or directory.
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::curPosition () const [inline, inherited]
-
-
-
Returns:
The current position for a file or directory.
- -
-
- -
-
- - - - - - - -
static SdBaseFile* SdBaseFile::cwd () [inline, static, inherited]
-
-
-
Returns:
Current working directory
- -
-
- -
-
- - - - - - - - -
static void SdBaseFile::dateTimeCallback (void(*)(uint16_t *date, uint16_t *time) dateTime) [inline, static, inherited]
-
-
-

Set the date/time callback function

-
Parameters:
- - -
[in]dateTimeThe user's call back function. The callback function is of the form:
-
-
-
 void dateTime(uint16_t* date, uint16_t* time) {
-   uint16_t year;
-   uint8_t month, day, hour, minute, second;
-
-   // User gets date and time from GPS or real-time clock here
-
-   // return date using FAT_DATE macro to format fields
-   *date = FAT_DATE(year, month, day);
-
-   // return time using FAT_TIME macro to format fields
-   *time = FAT_TIME(hour, minute, second);
- }
-

Sets the function that is called when a file is created or when a file's directory entry is modified by sync(). All timestamps, access, creation, and modify, are set when a file is created. sync() maintains the last access date and last modify date/time.

-

See the timestamp() function.

- -
-
- -
-
- - - - - - - -
static void SdBaseFile::dateTimeCallbackCancel () [inline, static, inherited]
-
-
-

Cancel the date/time callback function.

- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::dirEntry (dir_tdir) [inherited]
-
-
-

Return a file's directory entry.

-
Parameters:
- - -
[out]dirLocation for return of the file's directory entry.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void SdBaseFile::dirName (const dir_tdir,
char * name 
) [static, inherited]
-
-
-

Format the name field of dir into the 13 byte array name in standard 8.3 short name format.

-
Parameters:
- - - -
[in]dirThe directory structure containing the name.
[out]nameA 13 byte char array for the formatted name.
-
-
- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline, inherited]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::exists (const char * name) [inherited]
-
-
-

Test for the existence of a file in a directory

-
Parameters:
- - -
[in]nameName of the file to be tested for.
-
-
-

The calling instance must be an open directory file.

-

dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory dirFile.

-
Returns:
true if the file exists else false.
- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline, inherited]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int16_t SdBaseFile::fgets (char * str,
int16_t num,
char * delim = 0 
) [inherited]
-
-
-

Get a string from a file.

-

fgets() reads bytes from a file into the array pointed to by str, until num - 1 bytes are read, or a delimiter is read and transferred to str, or end-of-file is encountered. The string is then terminated with a null byte.

-

fgets() deletes CR, '\r', from the string. This insures only a '\n' terminates the string for Windows text files which use CRLF for newline.

-
Parameters:
- - - - -
[out]strPointer to the array where the string is stored.
[in]numMaximum number of characters to be read (including the final null byte). Usually the length of the array str is used.
[in]delimOptional set of delimiters. The default is "\n".
-
-
-
Returns:
For success fgets() returns the length of the string in str. If no data is read, fgets() returns zero for EOF or -1 if an error occurred.
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::fileSize () const [inline, inherited]
-
-
-
Returns:
The total number of bytes in a file or directory.
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
uint32_t SdBaseFile::firstCluster () const [inline, inherited]
-
-
-
Returns:
The first cluster number for a file or directory.
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::getFilename (char * name) [inherited]
-
-
-

Get a file's name

-
Parameters:
- - -
[out]nameAn array of 13 characters for the file's name.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::getpos (fpos_tpos) [inherited]
-
-
-

get position for streams

-
Parameters:
- - -
[out]posstruct to receive position
-
-
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline, inherited]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isDir () const [inline, inherited]
-
-
-
Returns:
True if this is a directory else false.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isFile () const [inline, inherited]
-
-
-
Returns:
True if this is a normal file else false.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isOpen () const [inline, inherited]
-
-
-
Returns:
True if this is an open file/directory else false.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isRoot () const [inline, inherited]
-
-
-
Returns:
True if this is the root directory.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::isSubDir () const [inline, inherited]
-
-
-
Returns:
True if this is a subdirectory else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void SdBaseFile::ls (Printpr,
uint8_t flags = 0,
uint8_t indent = 0 
) [inherited]
-
-
-

List directory contents.

-
Parameters:
- - - -
[in]prPrint stream for list.
[in]flagsThe inclusive OR of
-
-
-

LS_DATE - Print file modification date

-

LS_SIZE - Print file size.

-

LS_R - Recursive list of subdirectories.

-
Parameters:
- - -
[in]indentAmount of space before file name. Used for recursive list to indicate subdirectory level.
-
-
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::ls (uint8_t flags = 0) [inherited]
-
-
-

List directory contents to stdOut.

-
Parameters:
- - -
[in]flagsThe inclusive OR of
-
-
-

LS_DATE - Print file modification date

-

LS_SIZE - Print file size.

-

LS_R - Recursive list of subdirectories.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::mkdir (SdBaseFileparent,
const char * path,
bool pFlag = true 
) [inherited]
-
-
-

Make a new directory.

-
Parameters:
- - - - -
[in]parentAn open SdFat instance for the directory that will contain the new directory.
[in]pathA path with a valid 8.3 DOS name for the new directory.
[in]pFlagCreate missing parent directories if true.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, parent is not a directory, path is invalid or already exists in parent.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::open (SdBaseFiledirFile,
uint16_t index,
uint8_t oflag 
) [inherited]
-
-
-

Open a file by index.

-
Parameters:
- - - - -
[in]dirFileAn open SdFat instance for the directory.
[in]indexThe index of the directory entry for the file to be opened. The value for index is (directory file position)/32.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
-
-
-

See open() by path for definition of flags.

-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::open (SdBaseFiledirFile,
const char * path,
uint8_t oflag 
) [inherited]
-
-
-

Open a file or directory by name.

-
Parameters:
- - - - -
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags from the following list
-
-
-

O_READ - Open for reading.

-

O_RDONLY - Same as O_READ.

-

O_WRITE - Open for writing.

-

O_WRONLY - Same as O_WRITE.

-

O_RDWR - Open for reading and writing.

-

O_APPEND - If set, the file offset shall be set to the end of the file prior to each write.

-

O_AT_END - Set the initial position at the end of the file.

-

O_CREAT - If the file exists, this flag has no effect except as noted under O_EXCL below. Otherwise, the file shall be created

-

O_EXCL - If O_CREAT and O_EXCL are set, open() shall fail if the file exists.

-

O_SYNC - Call sync() after each write. This flag should not be used with write(uint8_t), write_P(PGM_P), writeln_P(PGM_P), or the Arduino Print class. These functions do character at a time writes so sync() will be called after each byte.

-

O_TRUNC - If the file exists and is a regular file, and the file is successfully opened and is not read only, its length shall be truncated to 0.

-

WARNING: A given file must not be opened by more than one SdBaseFile object of file corruption may occur.

-
Note:
Directory files must be opened read only. Write and truncation is not allowed for directory files.
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include this file is already open, dirFile is not a directory, path is invalid, the file does not exist or can't be opened in the access mode specified by oflag.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::open (const char * path,
uint8_t oflag = O_READ 
) [inherited]
-
-
-

Open a file in the current working directory.

-
Parameters:
- - - -
[in]pathA path with a valid 8.3 DOS name for a file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -

Reimplemented in fstream, ifstream, and ofstream.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::openNext (SdBaseFiledirFile,
uint8_t oflag 
) [inherited]
-
-
-

Open the next file or subdirectory in a directory.

-
Parameters:
- - - -
[in]dirFileAn open SdFat instance for the directory containing the file to be opened.
[in]oflagValues for oflag are constructed by a bitwise-inclusive OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
-
-
-

See open() by path for definition of flags.

-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::openRoot (SdVolumevol) [inherited]
-
-
-

Open a volume's root directory.

-
Parameters:
- - -
[in]volThe FAT volume containing the root directory to be opened.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is already open, the FAT volume has not been initialized or it a FAT12 volume.
- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline, inherited]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline, inherited]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - -
int SdBaseFile::peek () [inherited]
-
-
-

Return the next available byte without consuming it.

-
Returns:
The byte if no error and not at eof else -1;
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::printFatDate (uint16_t fatDate) [static, inherited]
-
-
-

Print a directory date field to stdOut.

-

Format is yyyy-mm-dd.

-
Parameters:
- - -
[in]fatDateThe date field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void SdBaseFile::printFatDate (Printpr,
uint16_t fatDate 
) [static, inherited]
-
-
-

Print a directory date field.

-

Format is yyyy-mm-dd.

-
Parameters:
- - - -
[in]prPrint stream for output.
[in]fatDateThe date field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::printFatTime (uint16_t fatTime) [static, inherited]
-
-
-

Print a directory time field to stdOut.

-

Format is hh:mm:ss.

-
Parameters:
- - -
[in]fatTimeThe time field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void SdBaseFile::printFatTime (Printpr,
uint16_t fatTime 
) [static, inherited]
-
-
-

Print a directory time field.

-

Format is hh:mm:ss.

-
Parameters:
- - - -
[in]prPrint stream for output.
[in]fatTimeThe time field from a directory entry.
-
-
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::printName () [inherited]
-
-
-

Print a file's name to stdOut

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline, inherited]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int16_t SdBaseFile::read (void * buf,
uint16_t nbyte 
) [inherited]
-
-
-

Read data from a file starting at the current position.

-
Parameters:
- - - -
[out]bufPointer to the location that will receive the data.
[in]nbyteMaximum number of bytes to read.
-
-
-
Returns:
For success read() returns the number of bytes read. A value less than nbyte, including zero, will be returned if end of file is reached. If an error occurs, read() returns -1. Possible errors include read() called before a file has been opened, corrupt file system or an I/O error occurred.
- -
-
- -
-
- - - - - - - -
int16_t SdBaseFile::read () [inherited]
-
-
-

Read the next byte from a file.

-
Returns:
For success read returns the next byte in the file as an int. If an error occurs or end of file is reached -1 is returned.
- -
-
- -
-
- - - - - - - - -
int8_t SdBaseFile::readDir (dir_tdir) [inherited]
-
-
-

Read the next directory entry from a directory file.

-
Parameters:
- - -
[out]dirThe dir_t struct that will receive the data.
-
-
-
Returns:
For success readDir() returns the number of bytes read. A value of zero will be returned if end of file is reached. If an error occurs, readDir() returns -1. Possible errors include readDir() called before a directory has been opened, this is not a directory file or an I/O error occurred.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::remove (SdBaseFiledirFile,
const char * path 
) [static, inherited]
-
-
-

Remove a file.

-

The directory entry and all data for the file are deleted.

-
Parameters:
- - - -
[in]dirFileThe directory that contains the file.
[in]pathPath for the file to be removed.
-
-
-
Note:
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is a directory, is read only, dirFile is not a directory, path is not found or an I/O error occurred.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::remove () [inherited]
-
-
-

Remove a file.

-

The directory entry and all data for the file are deleted.

-
Note:
This function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file read-only, is a directory, or an I/O error occurred.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdBaseFile::rename (SdBaseFiledirFile,
const char * newPath 
) [inherited]
-
-
-

Rename a file or subdirectory.

-
Parameters:
- - - -
[in]dirFileDirectory for the new path.
[in]newPathNew path name for the file/directory.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include dirFile is not open or is not a directory file, newPath is invalid or already exists, or an I/O error occurs.
- -
-
- -
-
- - - - - - - -
void SdBaseFile::rewind () [inline, inherited]
-
-
-

Set the file's current position to zero.

- -
-
- -
-
- - - - - - - -
bool SdBaseFile::rmdir () [inherited]
-
-
-

Remove a directory file.

-

The directory file will be removed only if it is empty and is not the root directory. rmdir() follows DOS and Windows and ignores the read-only attribute for the directory.

-
Note:
This function should not be used to delete the 8.3 version of a directory that has a long name. For example if a directory has the long name "New folder" you should not delete the 8.3 name "NEWFOL~1".
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is not a directory, is the root directory, is not empty, or an I/O error occurred.
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::rmRfStar () [inherited]
-
-
-

Recursively delete a directory and all contained files.

-

This is like the Unix/Linux 'rm -rf *' if called with the root directory hence the name.

-

Warning - This will remove all contents of the directory including subdirectories. The directory will then be removed if it is not root. The read-only attribute for files will be ignored.

-
Note:
This function should not be used to delete the 8.3 version of a directory that has a long name. See remove() and rmdir().
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::seekCur (int32_t offset) [inline, inherited]
-
-
-

Set the files position to current position + pos. See seekSet().

-
Parameters:
- - -
[in]offsetThe new position in bytes from the current position.
-
-
-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::seekEnd (int32_t offset = 0) [inline, inherited]
-
-
-

Set the files position to end-of-file + offset. See seekSet().

-
Parameters:
- - -
[in]offsetThe new position in bytes from end-of-file.
-
-
-
Returns:
true for success or false for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::seekSet (uint32_t pos) [inherited]
-
-
-

Sets a file's position.

-
Parameters:
- - -
[in]posThe new position in bytes from the beginning of the file.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void SdBaseFile::setpos (fpos_tpos) [inherited]
-
-
-

set position for streams

-
Parameters:
- - -
[out]posstruct with value for new position
-
-
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline, inherited]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - -
bool SdBaseFile::sync () [inherited]
-
-
-

The sync() call causes all modified data and directory fields to be written to the storage device.

-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include a call to sync() before a file has been opened or an I/O error.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::timestamp (SdBaseFilefile) [inherited]
-
-
-

Copy a file's timestamps

-
Parameters:
- - -
[in]fileFile to copy timestamps from.
-
-
-
Note:
Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool SdBaseFile::timestamp (uint8_t flags,
uint16_t year,
uint8_t month,
uint8_t day,
uint8_t hour,
uint8_t minute,
uint8_t second 
) [inherited]
-
-
-

Set a file's timestamps in its directory entry.

-
Parameters:
- - -
[in]flagsValues for flags are constructed by a bitwise-inclusive OR of flags from the following list
-
-
-

T_ACCESS - Set the file's last access date.

-

T_CREATE - Set the file's creation date and time.

-

T_WRITE - Set the file's last write/modification date and time.

-
Parameters:
- - - - - - - -
[in]yearValid range 1980 - 2107 inclusive.
[in]monthValid range 1 - 12 inclusive.
[in]dayValid range 1 - 31 inclusive.
[in]hourValid range 0 - 23 inclusive.
[in]minuteValid range 0 - 59 inclusive.
[in]secondValid range 0 - 59 inclusive
-
-
-
Note:
It is possible to set an invalid date since there is no check for the number of days in a month.
-
-Modify and access timestamps may be overwritten if a date time callback function has been set by dateTimeCallback().
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.
- -
-
- -
-
- - - - - - - - -
bool SdBaseFile::truncate (uint32_t length) [inherited]
-
-
-

Truncate a file to a specified length. The current file position will be maintained if it is less than or equal to length otherwise it will be set to end of file.

-
Parameters:
- - -
[in]lengthThe desired length for the file.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include file is read only, file is a directory, length is greater than the current file size or an I/O error occurs.
- -
-
- -
-
- - - - - - - -
uint8_t SdBaseFile::type () const [inline, inherited]
-
-
-

Type of file. You should use isFile() or isDir() instead of type() if possible.

-
Returns:
The file or directory type.
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
SdVolume* SdBaseFile::volume () const [inline, inherited]
-
-
-
Returns:
SdVolume that contains this file.
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int16_t SdBaseFile::write (const void * buf,
uint16_t nbyte 
) [inherited]
-
-
-

Write data to an open file.

-
Note:
Data is moved to the cache but may not be written to the storage device until sync() is called.
-
Parameters:
- - - -
[in]bufPointer to the location of the data to be written.
[in]nbyteNumber of bytes to write.
-
-
-
Returns:
For success write() returns the number of bytes written, always nbyte. If an error occurs, write() returns -1. Possible errors include write() is called before a file has been opened, write is called for a read-only file, device is full, a corrupt file system or an I/O error.
- -

Reimplemented in SdFile.

- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
- -
-
- - - - -
bool SdBaseFile::writeError [inherited]
-
-
-

writeError is set to true if an error occurs during a write(). Set writeError to false before calling print() and/or write() and check for true after calls to print() and/or write().

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd_stream_base__coll__graph.png b/libs/SdFatBeta20120108/html/class_sd_stream_base__coll__graph.png deleted file mode 100755 index 03761a3..0000000 Binary files a/libs/SdFatBeta20120108/html/class_sd_stream_base__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_sd_stream_base__inherit__graph.png b/libs/SdFatBeta20120108/html/class_sd_stream_base__inherit__graph.png deleted file mode 100755 index fa32e2b..0000000 Binary files a/libs/SdFatBeta20120108/html/class_sd_stream_base__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/class_sd_volume-members.html b/libs/SdFatBeta20120108/html/class_sd_volume-members.html deleted file mode 100755 index 4784ef6..0000000 --- a/libs/SdFatBeta20120108/html/class_sd_volume-members.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
SdVolume Member List
-
-
-This is the complete list of members for SdVolume, including all inherited members. - - - - - - - - - - - - - - - - - - -
blocksPerCluster() const SdVolume [inline]
blocksPerFat() const SdVolume [inline]
cacheClear()SdVolume [inline]
clusterCount() const SdVolume [inline]
clusterSizeShift() const SdVolume [inline]
dataStartBlock() const SdVolume [inline]
dbgFat(uint32_t n, uint32_t *v)SdVolume [inline]
fatCount() const SdVolume [inline]
fatStartBlock() const SdVolume [inline]
fatType() const SdVolume [inline]
freeClusterCount()SdVolume
init(Sd2Card *dev)SdVolume [inline]
init(Sd2Card *dev, uint8_t part)SdVolume
rootDirEntryCount() const SdVolume [inline]
rootDirStart() const SdVolume [inline]
SdBaseFile (defined in SdVolume)SdVolume [friend]
sdCard()SdVolume [inline]
SdVolume()SdVolume [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd_volume.html b/libs/SdFatBeta20120108/html/class_sd_volume.html deleted file mode 100755 index 386fe2e..0000000 --- a/libs/SdFatBeta20120108/html/class_sd_volume.html +++ /dev/null @@ -1,436 +0,0 @@ - - - - -SdFat: SdVolume Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
SdVolume Class Reference
-
-
- -

Access FAT16 and FAT32 volumes on SD and SDHC cards. - More...

- -

#include <SdVolume.h>

-
-Collaboration diagram for SdVolume:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

uint8_t blocksPerCluster () const
uint32_t blocksPerFat () const
cache_tcacheClear ()
uint32_t clusterCount () const
uint8_t clusterSizeShift () const
uint32_t dataStartBlock () const
bool dbgFat (uint32_t n, uint32_t *v)
uint8_t fatCount () const
uint32_t fatStartBlock () const
uint8_t fatType () const
int32_t freeClusterCount ()
bool init (Sd2Card *dev, uint8_t part)
bool init (Sd2Card *dev)
uint32_t rootDirEntryCount () const
uint32_t rootDirStart () const
Sd2CardsdCard ()
 SdVolume ()

-Friends

-class SdBaseFile
-

Detailed Description

-

Access FAT16 and FAT32 volumes on SD and SDHC cards.

-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
SdVolume::SdVolume () [inline]
-
-
-

Create an instance of SdVolume

- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
uint8_t SdVolume::blocksPerCluster () const [inline]
-
-
-
Returns:
The volume's cluster size in blocks.
- -
-
- -
-
- - - - - - - -
uint32_t SdVolume::blocksPerFat () const [inline]
-
-
-
Returns:
The number of blocks in one FAT.
- -
-
- -
-
- - - - - - - -
cache_t* SdVolume::cacheClear () [inline]
-
-
-

Clear the cache and returns a pointer to the cache. Used by the WaveRP recorder to do raw write to the SD card. Not for normal apps.

-
Returns:
A pointer to the cache buffer or zero if an error occurs.
- -
-
- -
-
- - - - - - - -
uint32_t SdVolume::clusterCount () const [inline]
-
-
-
Returns:
The total number of clusters in the volume.
- -
-
- -
-
- - - - - - - -
uint8_t SdVolume::clusterSizeShift () const [inline]
-
-
-
Returns:
The shift count required to multiply by blocksPerCluster.
- -
-
- -
-
- - - - - - - -
uint32_t SdVolume::dataStartBlock () const [inline]
-
-
-
Returns:
The logical block number for the start of file data.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdVolume::dbgFat (uint32_t n,
uint32_t * v 
) [inline]
-
-
-

Debug access to FAT table

-
Parameters:
- - - -
[in]ncluster number.
[out]vvalue of entry
-
-
-
Returns:
true for success or false for failure
- -
-
- -
-
- - - - - - - -
uint8_t SdVolume::fatCount () const [inline]
-
-
-
Returns:
The number of FAT structures on the volume.
- -
-
- -
-
- - - - - - - -
uint32_t SdVolume::fatStartBlock () const [inline]
-
-
-
Returns:
The logical block number for the start of the first FAT.
- -
-
- -
-
- - - - - - - -
uint8_t SdVolume::fatType () const [inline]
-
-
-
Returns:
The FAT type of the volume. Values are 12, 16 or 32.
- -
-
- -
-
- - - - - - - -
int32_t SdVolume::freeClusterCount ()
-
-
-

Volume free space in clusters.

-
Returns:
Count of free clusters for success or -1 if an error occurs.
- -
-
- -
-
- - - - - - - - -
bool SdVolume::init (Sd2Carddev) [inline]
-
-
-

Initialize a FAT volume. Try partition one first then try super floppy format.

-
Parameters:
- - -
[in]devThe Sd2Card where the volume is located.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include not finding a valid partition, not finding a valid FAT file system or an I/O error.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
bool SdVolume::init (Sd2Carddev,
uint8_t part 
)
-
-
-

Initialize a FAT volume.

-
Parameters:
- - - -
[in]devThe SD card where the volume is located.
[in]partThe partition to be used. Legal values for part are 1-4 to use the corresponding partition on a device formatted with a MBR, Master Boot Record, or zero if the device is formatted as a super floppy with the FAT boot sector in block zero.
-
-
-
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include not finding a valid partition, not finding a valid FAT file system in the specified partition or an I/O error.
- -
-
- -
-
- - - - - - - -
uint32_t SdVolume::rootDirEntryCount () const [inline]
-
-
-
Returns:
The number of entries in the root directory for FAT16 volumes.
- -
-
- -
-
- - - - - - - -
uint32_t SdVolume::rootDirStart () const [inline]
-
-
-
Returns:
The logical block number for the start of the root directory on FAT16 volumes or the first cluster number on FAT32 volumes.
- -
-
- -
-
- - - - - - - -
Sd2Card* SdVolume::sdCard () [inline]
-
-
-

Sd2Card object for this volume

-
Returns:
pointer to Sd2Card object.
- -
-
-
The documentation for this class was generated from the following files:
    -
  • Arduino/libraries/SdFat/SdVolume.h
  • -
  • Arduino/libraries/SdFat/SdVolume.cpp
  • -
-
- - - diff --git a/libs/SdFatBeta20120108/html/class_sd_volume__coll__graph.png b/libs/SdFatBeta20120108/html/class_sd_volume__coll__graph.png deleted file mode 100755 index d4ed1b6..0000000 Binary files a/libs/SdFatBeta20120108/html/class_sd_volume__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classes.html b/libs/SdFatBeta20120108/html/classes.html deleted file mode 100755 index 4bedcf4..0000000 --- a/libs/SdFatBeta20120108/html/classes.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - -SdFat: Class Index - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
Class Index
-
-
-
A | C | D | F | I | M | O | P | S
- -
  A  
-
fat32_boot   ios   ofstream   SdBaseFile   
ArduinoInStream   fat32_fsinfo   ios_base   ostream   SdFat   
ArduinoOutStream   fat_boot   iostream   
  P  
-
SdFile   
  C  
-
fpos_t   istream   partitionTable   SdStreamBase   
cache_t   fstream   
  M  
-
pgm   SdVolume   
  D  
-
  I  
-
masterBootRecord   Print   setfill   
directoryEntry   ibufstream   
  O  
-
  S  
-
setprecision   
  F  
-
ifstream   obufstream   Sd2Card   setw   
A | C | D | F | I | M | O | P | S
-
- - - diff --git a/libs/SdFatBeta20120108/html/classfstream-members.html b/libs/SdFatBeta20120108/html/classfstream-members.html deleted file mode 100755 index 837ff92..0000000 --- a/libs/SdFatBeta20120108/html/classfstream-members.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
fstream Member List
-
-
-This is the complete list of members for fstream, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
clear(iostate state=goodbit)fstream [inline]
close()fstream [inline]
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFile [private]
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFile [private]
cur enum valueios_base
curCluster() const SdBaseFile [inline, private]
curPosition() const SdBaseFile [inline, private]
cwd()SdBaseFile [inline, private, static]
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFile [inline, private, static]
dateTimeCallbackCancel()SdBaseFile [inline, private, static]
decios_base [static]
dirEntry(dir_t *dir)SdBaseFile [private]
dirName(const dir_t &dir, char *name)SdBaseFile [private, static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
exists(const char *name)SdBaseFile [private]
fail() const ios [inline]
failbitios_base [static]
fgets(char *str, int16_t num, char *delim=0)SdBaseFile [private]
fileSize() const SdBaseFile [inline, private]
fill()ios_base [inline]
fill(char c)ios_base [inline]
firstCluster() const SdBaseFile [inline, private]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
flush()ostream [inline]
fmtflags typedefios_base
fstream() (defined in fstream)fstream [inline]
fstream(const char *path, openmode mode=in|out)fstream [inline, explicit]
gcount() const istream [inline]
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getFilename(char *name)SdBaseFile [private]
getline(char *str, streamsize count, char delim= '\n')istream
getpos(fpos_t *pos)SdBaseFile [private]
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
ignore(streamsize n=1, int delim=-1)istream
inios_base [static]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
is_open()fstream [inline]
isDir() const SdBaseFile [inline, private]
isFile() const SdBaseFile [inline, private]
isOpen() const SdBaseFile [inline, private]
isRoot() const SdBaseFile [inline, private]
isSubDir() const SdBaseFile [inline, private]
istream() (defined in istream)istream [inline]
leftios_base [static]
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFile [private]
ls(uint8_t flags=0)SdBaseFile [private]
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFile [private]
octios_base [static]
off_type typedefios_base
open(const char *path, openmode mode=in|out)fstream [inline]
SdStreamBase::open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFile [private]
SdStreamBase::open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFile [private]
openmode typedefios_base
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFile [private]
openRoot(SdVolume *vol)SdBaseFile [private]
operator const void *() const ios [inline]
operator!() const ios [inline]
operator<<(ostream &(*pf)(ostream &str))ostream [inline]
operator<<(ios_base &(*pf)(ios_base &str))ostream [inline]
operator<<(bool arg)ostream [inline]
operator<<(const char *arg)ostream [inline]
operator<<(const signed char *arg)ostream [inline]
operator<<(const unsigned char *arg)ostream [inline]
operator<<(char arg)ostream [inline]
operator<<(signed char arg)ostream [inline]
operator<<(unsigned char arg)ostream [inline]
operator<<(double arg)ostream [inline]
operator<<(int16_t arg)ostream [inline]
operator<<(uint16_t arg)ostream [inline]
operator<<(int32_t arg)ostream [inline]
operator<<(uint32_t arg)ostream [inline]
operator<<(const void *arg)ostream [inline]
operator<<(pgm arg)ostream [inline]
operator>>(istream &(*pf)(istream &str))istream [inline]
operator>>(ios_base &(*pf)(ios_base &str))istream [inline]
operator>>(ios &(*pf)(ios &str))istream [inline]
operator>>(char *str)istream [inline]
operator>>(char &ch)istream [inline]
operator>>(signed char *str)istream [inline]
operator>>(signed char &ch)istream [inline]
operator>>(unsigned char *str)istream [inline]
operator>>(unsigned char &ch)istream [inline]
operator>>(bool &arg)istream [inline]
operator>>(short &arg)istream [inline]
operator>>(unsigned short &arg)istream [inline]
operator>>(int16_t &arg)istream [inline]
operator>>(uint16_t &arg)istream [inline]
operator>>(int32_t &arg)istream [inline]
operator>>(uint32_t &arg)istream [inline]
operator>>(double &arg)istream [inline]
operator>>(float &arg)istream [inline]
operator>>(void *&arg)istream [inline]
ostream() (defined in ostream)ostream [inline]
outios_base [static]
iostream::peek()istream
SdStreamBase::peek()SdBaseFile [private]
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
printFatDate(uint16_t fatDate)SdBaseFile [private, static]
printFatDate(Print *pr, uint16_t fatDate)SdBaseFile [private, static]
printFatTime(uint16_t fatTime)SdBaseFile [private, static]
printFatTime(Print *pr, uint16_t fatTime)SdBaseFile [private, static]
printName()SdBaseFile [private]
put(char ch)ostream [inline]
rdstate() const ios [inline]
read()SdBaseFile [private]
read(void *buf, uint16_t nbyte)SdBaseFile [private]
readDir(dir_t *dir)SdBaseFile [private]
remove(SdBaseFile *dirFile, const char *path)SdBaseFile [private, static]
remove()SdBaseFile [private]
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFile [private]
rewind()SdBaseFile [inline, private]
rightios_base [static]
rmdir()SdBaseFile [private]
rmRfStar()SdBaseFile [private]
SdBaseFile()SdBaseFile [inline, private]
SdBaseFile(const char *path, uint8_t oflag)SdBaseFile [private]
seekCur(int32_t offset)SdBaseFile [inline, private]
seekdir enum nameios_base
seekEnd(int32_t offset=0)SdBaseFile [inline, private]
seekg(pos_type pos)istream [inline]
seekg(off_type off, seekdir way)istream [inline]
seekp(pos_type pos)ostream [inline]
seekp(off_type off, seekdir way)ostream [inline]
seekSet(uint32_t pos)SdBaseFile [private]
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setpos(fpos_t *pos)SdBaseFile [private]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipWhite()istream
skipwsios_base [static]
streamsize typedefios_base
sync()SdBaseFile [private]
tellg()istream [inline]
tellp()ostream [inline]
timestamp(SdBaseFile *file)SdBaseFile [private]
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFile [private]
truncios_base [static]
truncate(uint32_t size)SdBaseFile [private]
type() const SdBaseFile [inline, private]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
volume() const SdBaseFile [inline, private]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
write(const void *buf, uint16_t nbyte)SdBaseFile [private]
writeErrorSdBaseFile [private]
~fstream() (defined in fstream)fstream [inline]
~SdBaseFile() (defined in SdBaseFile)SdBaseFile [inline, private]
- - - diff --git a/libs/SdFatBeta20120108/html/classfstream.html b/libs/SdFatBeta20120108/html/classfstream.html deleted file mode 100755 index 06a83b6..0000000 --- a/libs/SdFatBeta20120108/html/classfstream.html +++ /dev/null @@ -1,2568 +0,0 @@ - - - - -SdFat: fstream Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

SD file input/output stream. - More...

- -

#include <SdStream.h>

-
-Inheritance diagram for fstream:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for fstream:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

bool bad () const
void clear (iostate state=goodbit)
void close ()
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
ostreamflush ()
 fstream (const char *path, openmode mode=in|out)
streamsize gcount () const
int get ()
istreamget (char &ch)
istreamget (char *str, streamsize n, char delim= '\n')
istreamgetline (char *str, streamsize count, char delim= '\n')
bool good () const
istreamignore (streamsize n=1, int delim=-1)
bool is_open ()
void open (const char *path, openmode mode=in|out)
 operator const void * () const
bool operator! () const
ostreamoperator<< (signed char arg)
ostreamoperator<< (unsigned char arg)
ostreamoperator<< (double arg)
ostreamoperator<< (uint16_t arg)
ostreamoperator<< (int32_t arg)
ostreamoperator<< (uint32_t arg)
ostreamoperator<< (pgm arg)
ostreamoperator<< (int16_t arg)
ostreamoperator<< (const void *arg)
ostreamoperator<< (bool arg)
ostreamoperator<< (char arg)
ostreamoperator<< (ostream &(*pf)(ostream &str))
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
ostreamoperator<< (const char *arg)
ostreamoperator<< (const signed char *arg)
ostreamoperator<< (const unsigned char *arg)
istreamoperator>> (ios_base &(*pf)(ios_base &str))
istreamoperator>> (unsigned short &arg)
istreamoperator>> (bool &arg)
istreamoperator>> (signed char &ch)
istreamoperator>> (unsigned char *str)
istreamoperator>> (short &arg)
istreamoperator>> (unsigned char &ch)
istreamoperator>> (ios &(*pf)(ios &str))
istreamoperator>> (int16_t &arg)
istreamoperator>> (uint16_t &arg)
istreamoperator>> (char *str)
istreamoperator>> (int32_t &arg)
istreamoperator>> (signed char *str)
istreamoperator>> (void *&arg)
istreamoperator>> (uint32_t &arg)
istreamoperator>> (istream &(*pf)(istream &str))
istreamoperator>> (double &arg)
istreamoperator>> (float &arg)
istreamoperator>> (char &ch)
int peek ()
int precision () const
int precision (unsigned int n)
ostreamput (char ch)
iostate rdstate () const
istreamseekg (off_type off, seekdir way)
istreamseekg (pos_type pos)
ostreamseekp (off_type off, seekdir way)
ostreamseekp (pos_type pos)
fmtflags setf (fmtflags fl, fmtflags mask)
fmtflags setf (fmtflags fl)
void setstate (iostate state)
void skipWhite ()
pos_type tellg ()
pos_type tellp ()
void unsetf (fmtflags fl)
unsigned width ()
unsigned width (unsigned n)

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()

-Private Member Functions

bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
uint32_t curCluster () const
uint32_t curPosition () const
bool dirEntry (dir_t *dir)
bool exists (const char *name)
int16_t fgets (char *str, int16_t num, char *delim=0)
uint32_t fileSize () const
uint32_t firstCluster () const
bool getFilename (char *name)
void getpos (fpos_t *pos)
bool isDir () const
bool isFile () const
bool isOpen () const
bool isRoot () const
bool isSubDir () const
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
void ls (uint8_t flags=0)
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
bool openRoot (SdVolume *vol)
int peek ()
bool printName ()
int16_t read ()
int16_t read (void *buf, uint16_t nbyte)
int8_t readDir (dir_t *dir)
bool remove ()
bool rename (SdBaseFile *dirFile, const char *newPath)
void rewind ()
bool rmdir ()
bool rmRfStar ()
bool seekCur (int32_t offset)
bool seekEnd (int32_t offset=0)
bool seekSet (uint32_t pos)
void setpos (fpos_t *pos)
bool sync ()
bool timestamp (SdBaseFile *file)
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
bool truncate (uint32_t size)
uint8_t type () const
SdVolumevolume () const
int16_t write (const void *buf, uint16_t nbyte)

-Static Private Member Functions

static SdBaseFilecwd ()
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
static void dateTimeCallbackCancel ()
static void dirName (const dir_t &dir, char *name)
static void printFatDate (uint16_t fatDate)
static void printFatDate (Print *pr, uint16_t fatDate)
static void printFatTime (Print *pr, uint16_t fatTime)
static void printFatTime (uint16_t fatTime)
static bool remove (SdBaseFile *dirFile, const char *path)

-Private Attributes

bool writeError
-

Detailed Description

-

SD file input/output stream.

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
fstream::fstream (const char * path,
openmode mode = in | out 
) [inline, explicit]
-
-
-

Constructor with open

-
Parameters:
- - - -
[in]pathpath to open
[in]modeopen mode
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline, inherited]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - - -
void fstream::clear (iostate state = goodbit) [inline]
-
-
-

Clear state and writeError

-
Parameters:
- - -
[in]statenew state for stream
-
-
- -

Reimplemented from ios.

- -
-
- -
-
- - - - - - - -
void fstream::close () [inline]
-
-
-

Close a file and force cached data and directory information to be written to the storage device.

- -

Reimplemented from SdBaseFile.

- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline, inherited]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline, inherited]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - -
ostream& ostream::flush () [inline, inherited]
-
-
-

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
streamsize istream::gcount () const [inline, inherited]
-
-
-
Returns:
The number of characters extracted by the last unformatted input function.
- -
-
- -
-
- - - - - - - -
int istream::get () [inherited]
-
-
-

Extract a character if one is available.

-
Returns:
The character or -1 if a failure occurs. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - -
istream & istream::get (char & c) [inherited]
-
-
-

Extract a character if one is available.

-
Parameters:
- - -
[out]clocation to receive the extracted character.
-
-
-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
) [inherited]
-
-
-

Extract characters.

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
) [inherited]
-
-
-

Extract characters

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

-

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline, inherited]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream & istream::ignore (streamsize n = 1,
int delim = -1 
) [inherited]
-
-
-

Extract characters and discard them.

-
Parameters:
- - - -
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
-
-
-

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

-

Failures are indicated by the state of the stream.

-
Returns:
*this
- -
-
- -
-
- - - - - - - -
bool fstream::is_open () [inline]
-
-
-
Returns:
True if stream is open else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void fstream::open (const char * path,
openmode mode = in | out 
) [inline]
-
-
-

Open a fstream

-
Parameters:
- - - -
[in]pathfile to open
[in]modeopen mode
-
-
-

Valid open modes are (at end, ios::ate, and/or ios::binary may be added):

-

ios::in - Open file for reading.

-

ios::out or ios::out | ios::trunc - Truncate to 0 length, if existent, or create a file for writing only.

-

ios::app or ios::out | ios::app - Append; open or create file for writing at end-of-file.

-

ios::in | ios::out - Open file for update (reading and writing).

-

ios::in | ios::out | ios::trunc - Truncate to zero length, if existent, or create file for update.

-

ios::in | ios::app or ios::in | ios::out | ios::app - Append; open or create text file for update, writing at end of file.

- -

Reimplemented from SdBaseFile.

- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline, inherited]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline, inherited]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (double arg) [inline, inherited]
-
-
-

Output double

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int16_t arg) [inline, inherited]
-
-
-

Output signed int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint16_t arg) [inline, inherited]
-
-
-

Output unsigned int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint32_t arg) [inline, inherited]
-
-
-

Output uint32_t

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const void * arg) [inline, inherited]
-
-
-

Output pointer

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (pgm arg) [inline, inherited]
-
-
-

Output a string from flash

-
Parameters:
- - -
[in]argpgm struct pointing to string
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const signed char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (unsigned char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int32_t arg) [inline, inherited]
-
-
-

Output signed long

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (bool arg) [inline, inherited]
-
-
-

Output bool

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const unsigned char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (signed char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (bool & arg) [inline, inherited]
-
-
-

Extract a value of type bool.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned short & arg) [inline, inherited]
-
-
-

Extract a value of type unsigned short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios &(*)(ios &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint16_t & arg) [inline, inherited]
-
-
-

Extract a value of type uint16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int32_t & arg) [inline, inherited]
-
-
-

Extract a value of type int32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (istream &(*)(istream &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint32_t & arg) [inline, inherited]
-
-
-

Extract a value of type uint32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (double & arg) [inline, inherited]
-
-
-

Extract a value of type double.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int16_t & arg) [inline, inherited]
-
-
-

Extract a value of type int16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (float & arg) [inline, inherited]
-
-
-

Extract a value of type float.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (void *& arg) [inline, inherited]
-
-
-

Extract a value of type void*.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (short & arg) [inline, inherited]
-
-
-

Extract a value of type short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - -
int istream::peek () [inherited]
-
-
-

Return the next available character without consuming it.

-
Returns:
The character if the stream state is good else -1;
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - - -
ostream& ostream::put (char ch) [inline, inherited]
-
-
-

Puts a character in a stream.

-

The unformatted output function inserts the element ch. It returns *this.

-
Parameters:
- - -
[in]chThe character
-
-
-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline, inherited]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - - -
istream& istream::seekg (pos_type pos) [inline, inherited]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the read pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream& istream::seekg (off_type off,
seekdir way 
) [inline, inherited]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::seekp (pos_type pos) [inline, inherited]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the write pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
ostream& ostream::seekp (off_type off,
seekdir way 
) [inline, inherited]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline, inherited]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - -
void istream::skipWhite () [inherited]
-
-
-

used to implement ws()

- -
-
- -
-
- - - - - - - -
pos_type istream::tellg () [inline, inherited]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - -
pos_type ostream::tellp () [inline, inherited]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/classfstream__coll__graph.png b/libs/SdFatBeta20120108/html/classfstream__coll__graph.png deleted file mode 100755 index 1ce48aa..0000000 Binary files a/libs/SdFatBeta20120108/html/classfstream__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classfstream__inherit__graph.png b/libs/SdFatBeta20120108/html/classfstream__inherit__graph.png deleted file mode 100755 index 972da52..0000000 Binary files a/libs/SdFatBeta20120108/html/classfstream__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classibufstream-members.html b/libs/SdFatBeta20120108/html/classibufstream-members.html deleted file mode 100755 index 2f22d2a..0000000 --- a/libs/SdFatBeta20120108/html/classibufstream-members.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
ibufstream Member List
-
-
-This is the complete list of members for ibufstream, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
clear(iostate state=goodbit)ios [inline]
cur enum valueios_base
decios_base [static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
fail() const ios [inline]
failbitios_base [static]
fill()ios_base [inline]
fill(char c)ios_base [inline]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
fmtflags typedefios_base
gcount() const istream [inline]
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getline(char *str, streamsize count, char delim= '\n')istream
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
ibufstream()ibufstream [inline]
ibufstream(const char *str)ibufstream [inline, explicit]
ignore(streamsize n=1, int delim=-1)istream
inios_base [static]
init(const char *str)ibufstream [inline]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
istream() (defined in istream)istream [inline]
leftios_base [static]
octios_base [static]
off_type typedefios_base
openmode typedefios_base
operator const void *() const ios [inline]
operator!() const ios [inline]
operator>>(istream &(*pf)(istream &str))istream [inline]
operator>>(ios_base &(*pf)(ios_base &str))istream [inline]
operator>>(ios &(*pf)(ios &str))istream [inline]
operator>>(char *str)istream [inline]
operator>>(char &ch)istream [inline]
operator>>(signed char *str)istream [inline]
operator>>(signed char &ch)istream [inline]
operator>>(unsigned char *str)istream [inline]
operator>>(unsigned char &ch)istream [inline]
operator>>(bool &arg)istream [inline]
operator>>(short &arg)istream [inline]
operator>>(unsigned short &arg)istream [inline]
operator>>(int16_t &arg)istream [inline]
operator>>(uint16_t &arg)istream [inline]
operator>>(int32_t &arg)istream [inline]
operator>>(uint32_t &arg)istream [inline]
operator>>(double &arg)istream [inline]
operator>>(float &arg)istream [inline]
operator>>(void *&arg)istream [inline]
outios_base [static]
peek()istream
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
rdstate() const ios [inline]
rightios_base [static]
seekdir enum nameios_base
seekg(pos_type pos)istream [inline]
seekg(off_type off, seekdir way)istream [inline]
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipWhite()istream
skipwsios_base [static]
streamsize typedefios_base
tellg()istream [inline]
truncios_base [static]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/classibufstream.html b/libs/SdFatBeta20120108/html/classibufstream.html deleted file mode 100755 index 750fb28..0000000 --- a/libs/SdFatBeta20120108/html/classibufstream.html +++ /dev/null @@ -1,1911 +0,0 @@ - - - - -SdFat: ibufstream Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

parse a char string - More...

- -

#include <bufstream.h>

-
-Inheritance diagram for ibufstream:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for ibufstream:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

bool bad () const
void clear (iostate state=goodbit)
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
streamsize gcount () const
int get ()
istreamget (char &ch)
istreamget (char *str, streamsize n, char delim= '\n')
istreamgetline (char *str, streamsize count, char delim= '\n')
bool good () const
 ibufstream ()
 ibufstream (const char *str)
istreamignore (streamsize n=1, int delim=-1)
void init (const char *str)
 operator const void * () const
bool operator! () const
istreamoperator>> (char &ch)
istreamoperator>> (int16_t &arg)
istreamoperator>> (istream &(*pf)(istream &str))
istreamoperator>> (uint16_t &arg)
istreamoperator>> (signed char *str)
istreamoperator>> (int32_t &arg)
istreamoperator>> (uint32_t &arg)
istreamoperator>> (double &arg)
istreamoperator>> (signed char &ch)
istreamoperator>> (float &arg)
istreamoperator>> (void *&arg)
istreamoperator>> (ios_base &(*pf)(ios_base &str))
istreamoperator>> (unsigned char *str)
istreamoperator>> (unsigned char &ch)
istreamoperator>> (ios &(*pf)(ios &str))
istreamoperator>> (bool &arg)
istreamoperator>> (char *str)
istreamoperator>> (short &arg)
istreamoperator>> (unsigned short &arg)
int peek ()
int precision () const
int precision (unsigned int n)
iostate rdstate () const
istreamseekg (pos_type pos)
istreamseekg (off_type off, seekdir way)
fmtflags setf (fmtflags fl, fmtflags mask)
fmtflags setf (fmtflags fl)
void setstate (iostate state)
void skipWhite ()
pos_type tellg ()
void unsetf (fmtflags fl)
unsigned width (unsigned n)
unsigned width ()

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()
-

Detailed Description

-

parse a char string

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
ibufstream::ibufstream () [inline]
-
-
-

Constructor

- -
-
- -
-
- - - - - - - - -
ibufstream::ibufstream (const char * str) [inline, explicit]
-
-
-

Constructor

-
Parameters:
- - -
[in]strpointer to string to be parsed Warning: The string will not be copied so must stay in scope.
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline, inherited]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - - -
void ios::clear (iostate state = goodbit) [inline, inherited]
-
-
-

Clear iostate bits.

-
Parameters:
- - -
[in]stateThe flags you want to set after clearing all flags.
-
-
- -

Reimplemented in fstream, and ofstream.

- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline, inherited]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline, inherited]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - -
streamsize istream::gcount () const [inline, inherited]
-
-
-
Returns:
The number of characters extracted by the last unformatted input function.
- -
-
- -
-
- - - - - - - -
int istream::get () [inherited]
-
-
-

Extract a character if one is available.

-
Returns:
The character or -1 if a failure occurs. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - -
istream & istream::get (char & c) [inherited]
-
-
-

Extract a character if one is available.

-
Parameters:
- - -
[out]clocation to receive the extracted character.
-
-
-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
) [inherited]
-
-
-

Extract characters.

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
) [inherited]
-
-
-

Extract characters

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

-

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline, inherited]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream & istream::ignore (streamsize n = 1,
int delim = -1 
) [inherited]
-
-
-

Extract characters and discard them.

-
Parameters:
- - - -
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
-
-
-

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

-

Failures are indicated by the state of the stream.

-
Returns:
*this
- -
-
- -
-
- - - - - - - - -
void ibufstream::init (const char * str) [inline]
-
-
-

Initialize an ibufstream

-
Parameters:
- - -
[in]strpointer to string to be parsed Warning: The string will not be copied so must stay in scope.
-
-
- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline, inherited]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline, inherited]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios &(*)(ios &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int32_t & arg) [inline, inherited]
-
-
-

Extract a value of type int32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint32_t & arg) [inline, inherited]
-
-
-

Extract a value of type uint32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (double & arg) [inline, inherited]
-
-
-

Extract a value of type double.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (float & arg) [inline, inherited]
-
-
-

Extract a value of type float.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned short & arg) [inline, inherited]
-
-
-

Extract a value of type unsigned short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (void *& arg) [inline, inherited]
-
-
-

Extract a value of type void*.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (bool & arg) [inline, inherited]
-
-
-

Extract a value of type bool.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (istream &(*)(istream &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (short & arg) [inline, inherited]
-
-
-

Extract a value of type short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int16_t & arg) [inline, inherited]
-
-
-

Extract a value of type int16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint16_t & arg) [inline, inherited]
-
-
-

Extract a value of type uint16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - -
int istream::peek () [inherited]
-
-
-

Return the next available character without consuming it.

-
Returns:
The character if the stream state is good else -1;
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline, inherited]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - - -
istream& istream::seekg (pos_type pos) [inline, inherited]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the read pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream& istream::seekg (off_type off,
seekdir way 
) [inline, inherited]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline, inherited]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - -
void istream::skipWhite () [inherited]
-
-
-

used to implement ws()

- -
-
- -
-
- - - - - - - -
pos_type istream::tellg () [inline, inherited]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/classibufstream__coll__graph.png b/libs/SdFatBeta20120108/html/classibufstream__coll__graph.png deleted file mode 100755 index b96a31c..0000000 Binary files a/libs/SdFatBeta20120108/html/classibufstream__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classibufstream__inherit__graph.png b/libs/SdFatBeta20120108/html/classibufstream__inherit__graph.png deleted file mode 100755 index bb98e40..0000000 Binary files a/libs/SdFatBeta20120108/html/classibufstream__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classifstream-members.html b/libs/SdFatBeta20120108/html/classifstream-members.html deleted file mode 100755 index 5c29b77..0000000 --- a/libs/SdFatBeta20120108/html/classifstream-members.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
ifstream Member List
-
-
-This is the complete list of members for ifstream, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
clear(iostate state=goodbit)ios [inline]
close()ifstream [inline]
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFile [private]
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFile [private]
cur enum valueios_base
curCluster() const SdBaseFile [inline, private]
curPosition() const SdBaseFile [inline, private]
cwd()SdBaseFile [inline, private, static]
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFile [inline, private, static]
dateTimeCallbackCancel()SdBaseFile [inline, private, static]
decios_base [static]
dirEntry(dir_t *dir)SdBaseFile [private]
dirName(const dir_t &dir, char *name)SdBaseFile [private, static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
exists(const char *name)SdBaseFile [private]
fail() const ios [inline]
failbitios_base [static]
fgets(char *str, int16_t num, char *delim=0)SdBaseFile [private]
fileSize() const SdBaseFile [inline, private]
fill()ios_base [inline]
fill(char c)ios_base [inline]
firstCluster() const SdBaseFile [inline, private]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
fmtflags typedefios_base
gcount() const istream [inline]
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getFilename(char *name)SdBaseFile [private]
getline(char *str, streamsize count, char delim= '\n')istream
getpos(fpos_t *pos)SdBaseFile [private]
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
ifstream() (defined in ifstream)ifstream [inline]
ifstream(const char *path, openmode mode=in)ifstream [inline, explicit]
ignore(streamsize n=1, int delim=-1)istream
inios_base [static]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
is_open()ifstream [inline]
isDir() const SdBaseFile [inline, private]
isFile() const SdBaseFile [inline, private]
isOpen() const SdBaseFile [inline, private]
isRoot() const SdBaseFile [inline, private]
isSubDir() const SdBaseFile [inline, private]
istream() (defined in istream)istream [inline]
leftios_base [static]
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFile [private]
ls(uint8_t flags=0)SdBaseFile [private]
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFile [private]
octios_base [static]
off_type typedefios_base
open(const char *path, openmode mode=in)ifstream [inline]
SdStreamBase::open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFile [private]
SdStreamBase::open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFile [private]
openmode typedefios_base
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFile [private]
openRoot(SdVolume *vol)SdBaseFile [private]
operator const void *() const ios [inline]
operator!() const ios [inline]
operator>>(istream &(*pf)(istream &str))istream [inline]
operator>>(ios_base &(*pf)(ios_base &str))istream [inline]
operator>>(ios &(*pf)(ios &str))istream [inline]
operator>>(char *str)istream [inline]
operator>>(char &ch)istream [inline]
operator>>(signed char *str)istream [inline]
operator>>(signed char &ch)istream [inline]
operator>>(unsigned char *str)istream [inline]
operator>>(unsigned char &ch)istream [inline]
operator>>(bool &arg)istream [inline]
operator>>(short &arg)istream [inline]
operator>>(unsigned short &arg)istream [inline]
operator>>(int16_t &arg)istream [inline]
operator>>(uint16_t &arg)istream [inline]
operator>>(int32_t &arg)istream [inline]
operator>>(uint32_t &arg)istream [inline]
operator>>(double &arg)istream [inline]
operator>>(float &arg)istream [inline]
operator>>(void *&arg)istream [inline]
outios_base [static]
istream::peek()istream
SdStreamBase::peek()SdBaseFile [private]
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
printFatDate(uint16_t fatDate)SdBaseFile [private, static]
printFatDate(Print *pr, uint16_t fatDate)SdBaseFile [private, static]
printFatTime(uint16_t fatTime)SdBaseFile [private, static]
printFatTime(Print *pr, uint16_t fatTime)SdBaseFile [private, static]
printName()SdBaseFile [private]
rdstate() const ios [inline]
read()SdBaseFile [private]
read(void *buf, uint16_t nbyte)SdBaseFile [private]
readDir(dir_t *dir)SdBaseFile [private]
remove(SdBaseFile *dirFile, const char *path)SdBaseFile [private, static]
remove()SdBaseFile [private]
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFile [private]
rewind()SdBaseFile [inline, private]
rightios_base [static]
rmdir()SdBaseFile [private]
rmRfStar()SdBaseFile [private]
SdBaseFile()SdBaseFile [inline, private]
SdBaseFile(const char *path, uint8_t oflag)SdBaseFile [private]
seekCur(int32_t offset)SdBaseFile [inline, private]
seekdir enum nameios_base
seekEnd(int32_t offset=0)SdBaseFile [inline, private]
seekg(pos_type pos)istream [inline]
seekg(off_type off, seekdir way)istream [inline]
seekSet(uint32_t pos)SdBaseFile [private]
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setpos(fpos_t *pos)SdBaseFile [private]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipWhite()istream
skipwsios_base [static]
streamsize typedefios_base
sync()SdBaseFile [private]
tellg()istream [inline]
timestamp(SdBaseFile *file)SdBaseFile [private]
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFile [private]
truncios_base [static]
truncate(uint32_t size)SdBaseFile [private]
type() const SdBaseFile [inline, private]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
volume() const SdBaseFile [inline, private]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
write(const void *buf, uint16_t nbyte)SdBaseFile [private]
writeErrorSdBaseFile [private]
~ifstream() (defined in ifstream)ifstream [inline]
~SdBaseFile() (defined in SdBaseFile)SdBaseFile [inline, private]
- - - diff --git a/libs/SdFatBeta20120108/html/classifstream.html b/libs/SdFatBeta20120108/html/classifstream.html deleted file mode 100755 index e9813a4..0000000 --- a/libs/SdFatBeta20120108/html/classifstream.html +++ /dev/null @@ -1,2019 +0,0 @@ - - - - -SdFat: ifstream Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

SD file input stream. - More...

- -

#include <SdStream.h>

-
-Inheritance diagram for ifstream:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for ifstream:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

bool bad () const
void clear (iostate state=goodbit)
void close ()
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
streamsize gcount () const
int get ()
istreamget (char &ch)
istreamget (char *str, streamsize n, char delim= '\n')
istreamgetline (char *str, streamsize count, char delim= '\n')
bool good () const
 ifstream (const char *path, openmode mode=in)
istreamignore (streamsize n=1, int delim=-1)
bool is_open ()
void open (const char *path, openmode mode=in)
 operator const void * () const
bool operator! () const
istreamoperator>> (ios_base &(*pf)(ios_base &str))
istreamoperator>> (bool &arg)
istreamoperator>> (short &arg)
istreamoperator>> (ios &(*pf)(ios &str))
istreamoperator>> (unsigned short &arg)
istreamoperator>> (int16_t &arg)
istreamoperator>> (uint16_t &arg)
istreamoperator>> (char *str)
istreamoperator>> (signed char *str)
istreamoperator>> (int32_t &arg)
istreamoperator>> (char &ch)
istreamoperator>> (uint32_t &arg)
istreamoperator>> (double &arg)
istreamoperator>> (float &arg)
istreamoperator>> (void *&arg)
istreamoperator>> (signed char &ch)
istreamoperator>> (unsigned char *str)
istreamoperator>> (istream &(*pf)(istream &str))
istreamoperator>> (unsigned char &ch)
int peek ()
int precision (unsigned int n)
int precision () const
iostate rdstate () const
istreamseekg (pos_type pos)
istreamseekg (off_type off, seekdir way)
fmtflags setf (fmtflags fl)
fmtflags setf (fmtflags fl, fmtflags mask)
void setstate (iostate state)
void skipWhite ()
pos_type tellg ()
void unsetf (fmtflags fl)
unsigned width (unsigned n)
unsigned width ()

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()

-Private Member Functions

bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
uint32_t curCluster () const
uint32_t curPosition () const
bool dirEntry (dir_t *dir)
bool exists (const char *name)
int16_t fgets (char *str, int16_t num, char *delim=0)
uint32_t fileSize () const
uint32_t firstCluster () const
bool getFilename (char *name)
void getpos (fpos_t *pos)
bool isDir () const
bool isFile () const
bool isOpen () const
bool isRoot () const
bool isSubDir () const
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
void ls (uint8_t flags=0)
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
bool openRoot (SdVolume *vol)
int peek ()
bool printName ()
int16_t read ()
int16_t read (void *buf, uint16_t nbyte)
int8_t readDir (dir_t *dir)
bool remove ()
bool rename (SdBaseFile *dirFile, const char *newPath)
void rewind ()
bool rmdir ()
bool rmRfStar ()
bool seekCur (int32_t offset)
bool seekEnd (int32_t offset=0)
bool seekSet (uint32_t pos)
void setpos (fpos_t *pos)
bool sync ()
bool timestamp (SdBaseFile *file)
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
bool truncate (uint32_t size)
uint8_t type () const
SdVolumevolume () const
int16_t write (const void *buf, uint16_t nbyte)

-Static Private Member Functions

static SdBaseFilecwd ()
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
static void dateTimeCallbackCancel ()
static void dirName (const dir_t &dir, char *name)
static void printFatDate (uint16_t fatDate)
static void printFatDate (Print *pr, uint16_t fatDate)
static void printFatTime (Print *pr, uint16_t fatTime)
static void printFatTime (uint16_t fatTime)
static bool remove (SdBaseFile *dirFile, const char *path)

-Private Attributes

bool writeError
-

Detailed Description

-

SD file input stream.

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
ifstream::ifstream (const char * path,
openmode mode = in 
) [inline, explicit]
-
-
-

Constructor with open

-
Parameters:
- - - -
[in]pathfile to open
[in]modeopen mode
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline, inherited]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - - -
void ios::clear (iostate state = goodbit) [inline, inherited]
-
-
-

Clear iostate bits.

-
Parameters:
- - -
[in]stateThe flags you want to set after clearing all flags.
-
-
- -

Reimplemented in fstream, and ofstream.

- -
-
- -
-
- - - - - - - -
void ifstream::close () [inline]
-
-
-

Close a file and force cached data and directory information to be written to the storage device.

- -

Reimplemented from SdBaseFile.

- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline, inherited]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline, inherited]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - -
streamsize istream::gcount () const [inline, inherited]
-
-
-
Returns:
The number of characters extracted by the last unformatted input function.
- -
-
- -
-
- - - - - - - -
int istream::get () [inherited]
-
-
-

Extract a character if one is available.

-
Returns:
The character or -1 if a failure occurs. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - -
istream & istream::get (char & c) [inherited]
-
-
-

Extract a character if one is available.

-
Parameters:
- - -
[out]clocation to receive the extracted character.
-
-
-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
) [inherited]
-
-
-

Extract characters.

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
) [inherited]
-
-
-

Extract characters

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

-

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline, inherited]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream & istream::ignore (streamsize n = 1,
int delim = -1 
) [inherited]
-
-
-

Extract characters and discard them.

-
Parameters:
- - - -
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
-
-
-

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

-

Failures are indicated by the state of the stream.

-
Returns:
*this
- -
-
- -
-
- - - - - - - -
bool ifstream::is_open () [inline]
-
-
-
Returns:
True if stream is open else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void ifstream::open (const char * path,
openmode mode = in 
) [inline]
-
-
-

Open an ifstream

-
Parameters:
- - - -
[in]pathfile to open
[in]modeopen mode
-
-
-

mode See fstream::open() for valid modes.

- -

Reimplemented from SdBaseFile.

- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline, inherited]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline, inherited]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int16_t & arg) [inline, inherited]
-
-
-

Extract a value of type int16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (istream &(*)(istream &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint16_t & arg) [inline, inherited]
-
-
-

Extract a value of type uint16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int32_t & arg) [inline, inherited]
-
-
-

Extract a value of type int32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint32_t & arg) [inline, inherited]
-
-
-

Extract a value of type uint32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (double & arg) [inline, inherited]
-
-
-

Extract a value of type double.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (float & arg) [inline, inherited]
-
-
-

Extract a value of type float.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (void *& arg) [inline, inherited]
-
-
-

Extract a value of type void*.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios &(*)(ios &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (bool & arg) [inline, inherited]
-
-
-

Extract a value of type bool.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (short & arg) [inline, inherited]
-
-
-

Extract a value of type short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned short & arg) [inline, inherited]
-
-
-

Extract a value of type unsigned short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - -
int istream::peek () [inherited]
-
-
-

Return the next available character without consuming it.

-
Returns:
The character if the stream state is good else -1;
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline, inherited]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - - -
istream& istream::seekg (pos_type pos) [inline, inherited]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the read pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream& istream::seekg (off_type off,
seekdir way 
) [inline, inherited]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline, inherited]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - -
void istream::skipWhite () [inherited]
-
-
-

used to implement ws()

- -
-
- -
-
- - - - - - - -
pos_type istream::tellg () [inline, inherited]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/classifstream__coll__graph.png b/libs/SdFatBeta20120108/html/classifstream__coll__graph.png deleted file mode 100755 index 63a60bf..0000000 Binary files a/libs/SdFatBeta20120108/html/classifstream__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classifstream__inherit__graph.png b/libs/SdFatBeta20120108/html/classifstream__inherit__graph.png deleted file mode 100755 index aa5574f..0000000 Binary files a/libs/SdFatBeta20120108/html/classifstream__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classios-members.html b/libs/SdFatBeta20120108/html/classios-members.html deleted file mode 100755 index 97d1571..0000000 --- a/libs/SdFatBeta20120108/html/classios-members.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
ios Member List
-
-
-This is the complete list of members for ios, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
clear(iostate state=goodbit)ios [inline]
cur enum valueios_base
decios_base [static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
fail() const ios [inline]
failbitios_base [static]
fill()ios_base [inline]
fill(char c)ios_base [inline]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
fmtflags typedefios_base
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
inios_base [static]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
leftios_base [static]
octios_base [static]
off_type typedefios_base
openmode typedefios_base
operator const void *() const ios [inline]
operator!() const ios [inline]
outios_base [static]
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
rdstate() const ios [inline]
rightios_base [static]
seekdir enum nameios_base
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipwsios_base [static]
streamsize typedefios_base
truncios_base [static]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/classios.html b/libs/SdFatBeta20120108/html/classios.html deleted file mode 100755 index 4deb8ad..0000000 --- a/libs/SdFatBeta20120108/html/classios.html +++ /dev/null @@ -1,1056 +0,0 @@ - - - - -SdFat: ios Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

Error and state information for all streams. - More...

- -

#include <ios.h>

-
-Inheritance diagram for ios:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for ios:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

bool bad () const
void clear (iostate state=goodbit)
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
bool good () const
 ios ()
 operator const void * () const
bool operator! () const
int precision (unsigned int n)
int precision () const
iostate rdstate () const
fmtflags setf (fmtflags fl, fmtflags mask)
fmtflags setf (fmtflags fl)
void setstate (iostate state)
void unsetf (fmtflags fl)
unsigned width (unsigned n)
unsigned width ()

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()
-

Detailed Description

-

Error and state information for all streams.

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
ios::ios () [inline]
-
-
-

Create ios with no error flags set

- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - - -
void ios::clear (iostate state = goodbit) [inline]
-
-
-

Clear iostate bits.

-
Parameters:
- - -
[in]stateThe flags you want to set after clearing all flags.
-
-
- -

Reimplemented in fstream, and ofstream.

- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following file:
    -
  • Arduino/libraries/SdFat/ios.h
  • -
-
- - - diff --git a/libs/SdFatBeta20120108/html/classios__base-members.html b/libs/SdFatBeta20120108/html/classios__base-members.html deleted file mode 100755 index 7d9fdda..0000000 --- a/libs/SdFatBeta20120108/html/classios__base-members.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
ios_base Member List
-
-
-This is the complete list of members for ios_base, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ateios_base [static]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
cur enum valueios_base
decios_base [static]
end enum valueios_base
eofbitios_base [static]
failbitios_base [static]
fill()ios_base [inline]
fill(char c)ios_base [inline]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
fmtflags typedefios_base
goodbitios_base [static]
hexios_base [static]
inios_base [static]
internalios_base [static]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
leftios_base [static]
octios_base [static]
off_type typedefios_base
openmode typedefios_base
outios_base [static]
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
rightios_base [static]
seekdir enum nameios_base
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipwsios_base [static]
streamsize typedefios_base
truncios_base [static]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/classios__base.html b/libs/SdFatBeta20120108/html/classios__base.html deleted file mode 100755 index a044cb3..0000000 --- a/libs/SdFatBeta20120108/html/classios__base.html +++ /dev/null @@ -1,850 +0,0 @@ - - - - -SdFat: ios_base Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

Base class for all streams. - More...

- -

#include <ios.h>

-
-Inheritance diagram for ios_base:
-
-
Inheritance graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
int precision () const
int precision (unsigned int n)
fmtflags setf (fmtflags fl, fmtflags mask)
fmtflags setf (fmtflags fl)
void unsetf (fmtflags fl)
unsigned width ()
unsigned width (unsigned n)

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()
-

Detailed Description

-

Base class for all streams.

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
char ios_base::fill () [inline]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline]
-
-
-
Returns:
width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following file:
    -
  • Arduino/libraries/SdFat/ios.h
  • -
-
- - - diff --git a/libs/SdFatBeta20120108/html/classios__base__inherit__graph.png b/libs/SdFatBeta20120108/html/classios__base__inherit__graph.png deleted file mode 100755 index 5bbe634..0000000 Binary files a/libs/SdFatBeta20120108/html/classios__base__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classios__coll__graph.png b/libs/SdFatBeta20120108/html/classios__coll__graph.png deleted file mode 100755 index f983a4c..0000000 Binary files a/libs/SdFatBeta20120108/html/classios__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classios__inherit__graph.png b/libs/SdFatBeta20120108/html/classios__inherit__graph.png deleted file mode 100755 index 66067c0..0000000 Binary files a/libs/SdFatBeta20120108/html/classios__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classiostream-members.html b/libs/SdFatBeta20120108/html/classiostream-members.html deleted file mode 100755 index c5ced47..0000000 --- a/libs/SdFatBeta20120108/html/classiostream-members.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
iostream Member List
-
-
-This is the complete list of members for iostream, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
clear(iostate state=goodbit)ios [inline]
cur enum valueios_base
decios_base [static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
fail() const ios [inline]
failbitios_base [static]
fill()ios_base [inline]
fill(char c)ios_base [inline]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
flush()ostream [inline]
fmtflags typedefios_base
gcount() const istream [inline]
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getline(char *str, streamsize count, char delim= '\n')istream
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
ignore(streamsize n=1, int delim=-1)istream
inios_base [static]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
istream() (defined in istream)istream [inline]
leftios_base [static]
octios_base [static]
off_type typedefios_base
openmode typedefios_base
operator const void *() const ios [inline]
operator!() const ios [inline]
operator<<(ostream &(*pf)(ostream &str))ostream [inline]
operator<<(ios_base &(*pf)(ios_base &str))ostream [inline]
operator<<(bool arg)ostream [inline]
operator<<(const char *arg)ostream [inline]
operator<<(const signed char *arg)ostream [inline]
operator<<(const unsigned char *arg)ostream [inline]
operator<<(char arg)ostream [inline]
operator<<(signed char arg)ostream [inline]
operator<<(unsigned char arg)ostream [inline]
operator<<(double arg)ostream [inline]
operator<<(int16_t arg)ostream [inline]
operator<<(uint16_t arg)ostream [inline]
operator<<(int32_t arg)ostream [inline]
operator<<(uint32_t arg)ostream [inline]
operator<<(const void *arg)ostream [inline]
operator<<(pgm arg)ostream [inline]
operator>>(istream &(*pf)(istream &str))istream [inline]
operator>>(ios_base &(*pf)(ios_base &str))istream [inline]
operator>>(ios &(*pf)(ios &str))istream [inline]
operator>>(char *str)istream [inline]
operator>>(char &ch)istream [inline]
operator>>(signed char *str)istream [inline]
operator>>(signed char &ch)istream [inline]
operator>>(unsigned char *str)istream [inline]
operator>>(unsigned char &ch)istream [inline]
operator>>(bool &arg)istream [inline]
operator>>(short &arg)istream [inline]
operator>>(unsigned short &arg)istream [inline]
operator>>(int16_t &arg)istream [inline]
operator>>(uint16_t &arg)istream [inline]
operator>>(int32_t &arg)istream [inline]
operator>>(uint32_t &arg)istream [inline]
operator>>(double &arg)istream [inline]
operator>>(float &arg)istream [inline]
operator>>(void *&arg)istream [inline]
ostream() (defined in ostream)ostream [inline]
outios_base [static]
peek()istream
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
put(char ch)ostream [inline]
rdstate() const ios [inline]
rightios_base [static]
seekdir enum nameios_base
seekg(pos_type pos)istream [inline]
seekg(off_type off, seekdir way)istream [inline]
seekp(pos_type pos)ostream [inline]
seekp(off_type off, seekdir way)ostream [inline]
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipWhite()istream
skipwsios_base [static]
streamsize typedefios_base
tellg()istream [inline]
tellp()ostream [inline]
truncios_base [static]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/classiostream.html b/libs/SdFatBeta20120108/html/classiostream.html deleted file mode 100755 index 27be72b..0000000 --- a/libs/SdFatBeta20120108/html/classiostream.html +++ /dev/null @@ -1,2385 +0,0 @@ - - - - -SdFat: iostream Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

Input/Output stream. - More...

- -

#include <iostream.h>

-
-Inheritance diagram for iostream:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for iostream:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

bool bad () const
void clear (iostate state=goodbit)
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
ostreamflush ()
streamsize gcount () const
int get ()
istreamget (char &ch)
istreamget (char *str, streamsize n, char delim= '\n')
istreamgetline (char *str, streamsize count, char delim= '\n')
bool good () const
istreamignore (streamsize n=1, int delim=-1)
 operator const void * () const
bool operator! () const
ostreamoperator<< (const signed char *arg)
ostreamoperator<< (uint32_t arg)
ostreamoperator<< (const void *arg)
ostreamoperator<< (pgm arg)
ostreamoperator<< (int32_t arg)
ostreamoperator<< (unsigned char arg)
ostreamoperator<< (ostream &(*pf)(ostream &str))
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
ostreamoperator<< (bool arg)
ostreamoperator<< (const char *arg)
ostreamoperator<< (const unsigned char *arg)
ostreamoperator<< (char arg)
ostreamoperator<< (signed char arg)
ostreamoperator<< (double arg)
ostreamoperator<< (int16_t arg)
ostreamoperator<< (uint16_t arg)
istreamoperator>> (signed char *str)
istreamoperator>> (unsigned char &ch)
istreamoperator>> (float &arg)
istreamoperator>> (int16_t &arg)
istreamoperator>> (double &arg)
istreamoperator>> (char *str)
istreamoperator>> (uint32_t &arg)
istreamoperator>> (unsigned char *str)
istreamoperator>> (void *&arg)
istreamoperator>> (signed char &ch)
istreamoperator>> (bool &arg)
istreamoperator>> (ios_base &(*pf)(ios_base &str))
istreamoperator>> (char &ch)
istreamoperator>> (int32_t &arg)
istreamoperator>> (short &arg)
istreamoperator>> (istream &(*pf)(istream &str))
istreamoperator>> (unsigned short &arg)
istreamoperator>> (ios &(*pf)(ios &str))
istreamoperator>> (uint16_t &arg)
int peek ()
int precision (unsigned int n)
int precision () const
ostreamput (char ch)
iostate rdstate () const
istreamseekg (off_type off, seekdir way)
istreamseekg (pos_type pos)
ostreamseekp (pos_type pos)
ostreamseekp (off_type off, seekdir way)
fmtflags setf (fmtflags fl)
fmtflags setf (fmtflags fl, fmtflags mask)
void setstate (iostate state)
void skipWhite ()
pos_type tellg ()
pos_type tellp ()
void unsetf (fmtflags fl)
unsigned width (unsigned n)
unsigned width ()

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()
-

Detailed Description

-

Input/Output stream.

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline, inherited]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - - -
void ios::clear (iostate state = goodbit) [inline, inherited]
-
-
-

Clear iostate bits.

-
Parameters:
- - -
[in]stateThe flags you want to set after clearing all flags.
-
-
- -

Reimplemented in fstream, and ofstream.

- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline, inherited]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline, inherited]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - -
ostream& ostream::flush () [inline, inherited]
-
-
-

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
streamsize istream::gcount () const [inline, inherited]
-
-
-
Returns:
The number of characters extracted by the last unformatted input function.
- -
-
- -
-
- - - - - - - -
int istream::get () [inherited]
-
-
-

Extract a character if one is available.

-
Returns:
The character or -1 if a failure occurs. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - -
istream & istream::get (char & c) [inherited]
-
-
-

Extract a character if one is available.

-
Parameters:
- - -
[out]clocation to receive the extracted character.
-
-
-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
) [inherited]
-
-
-

Extract characters.

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
) [inherited]
-
-
-

Extract characters

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

-

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline, inherited]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream & istream::ignore (streamsize n = 1,
int delim = -1 
) [inherited]
-
-
-

Extract characters and discard them.

-
Parameters:
- - - -
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
-
-
-

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

-

Failures are indicated by the state of the stream.

-
Returns:
*this
- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline, inherited]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline, inherited]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int32_t arg) [inline, inherited]
-
-
-

Output signed long

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint32_t arg) [inline, inherited]
-
-
-

Output uint32_t

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const void * arg) [inline, inherited]
-
-
-

Output pointer

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint16_t arg) [inline, inherited]
-
-
-

Output unsigned int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (pgm arg) [inline, inherited]
-
-
-

Output a string from flash

-
Parameters:
- - -
[in]argpgm struct pointing to string
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (signed char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (bool arg) [inline, inherited]
-
-
-

Output bool

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const signed char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const unsigned char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (unsigned char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (double arg) [inline, inherited]
-
-
-

Output double

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int16_t arg) [inline, inherited]
-
-
-

Output signed int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (double & arg) [inline, inherited]
-
-
-

Extract a value of type double.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint32_t & arg) [inline, inherited]
-
-
-

Extract a value of type uint32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (float & arg) [inline, inherited]
-
-
-

Extract a value of type float.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (void *& arg) [inline, inherited]
-
-
-

Extract a value of type void*.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (bool & arg) [inline, inherited]
-
-
-

Extract a value of type bool.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char & ch) [inline, inherited]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int32_t & arg) [inline, inherited]
-
-
-

Extract a value of type int32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (short & arg) [inline, inherited]
-
-
-

Extract a value of type short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (istream &(*)(istream &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char * str) [inline, inherited]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned short & arg) [inline, inherited]
-
-
-

Extract a value of type unsigned short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios &(*)(ios &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int16_t & arg) [inline, inherited]
-
-
-

Extract a value of type int16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint16_t & arg) [inline, inherited]
-
-
-

Extract a value of type uint16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - -
int istream::peek () [inherited]
-
-
-

Return the next available character without consuming it.

-
Returns:
The character if the stream state is good else -1;
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - - -
ostream& ostream::put (char ch) [inline, inherited]
-
-
-

Puts a character in a stream.

-

The unformatted output function inserts the element ch. It returns *this.

-
Parameters:
- - -
[in]chThe character
-
-
-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline, inherited]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream& istream::seekg (off_type off,
seekdir way 
) [inline, inherited]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::seekg (pos_type pos) [inline, inherited]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the read pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
ostream& ostream::seekp (off_type off,
seekdir way 
) [inline, inherited]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::seekp (pos_type pos) [inline, inherited]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the write pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline, inherited]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - -
void istream::skipWhite () [inherited]
-
-
-

used to implement ws()

- -
-
- -
-
- - - - - - - -
pos_type istream::tellg () [inline, inherited]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - -
pos_type ostream::tellp () [inline, inherited]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/classiostream__coll__graph.png b/libs/SdFatBeta20120108/html/classiostream__coll__graph.png deleted file mode 100755 index d961f68..0000000 Binary files a/libs/SdFatBeta20120108/html/classiostream__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classiostream__inherit__graph.png b/libs/SdFatBeta20120108/html/classiostream__inherit__graph.png deleted file mode 100755 index 33c93da..0000000 Binary files a/libs/SdFatBeta20120108/html/classiostream__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classistream-members.html b/libs/SdFatBeta20120108/html/classistream-members.html deleted file mode 100755 index aa6f28d..0000000 --- a/libs/SdFatBeta20120108/html/classistream-members.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
istream Member List
-
-
-This is the complete list of members for istream, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
clear(iostate state=goodbit)ios [inline]
cur enum valueios_base
decios_base [static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
fail() const ios [inline]
failbitios_base [static]
fill()ios_base [inline]
fill(char c)ios_base [inline]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
fmtflags typedefios_base
gcount() const istream [inline]
get()istream
get(char &ch)istream
get(char *str, streamsize n, char delim= '\n')istream
getline(char *str, streamsize count, char delim= '\n')istream
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
ignore(streamsize n=1, int delim=-1)istream
inios_base [static]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
istream() (defined in istream)istream [inline]
leftios_base [static]
octios_base [static]
off_type typedefios_base
openmode typedefios_base
operator const void *() const ios [inline]
operator!() const ios [inline]
operator>>(istream &(*pf)(istream &str))istream [inline]
operator>>(ios_base &(*pf)(ios_base &str))istream [inline]
operator>>(ios &(*pf)(ios &str))istream [inline]
operator>>(char *str)istream [inline]
operator>>(char &ch)istream [inline]
operator>>(signed char *str)istream [inline]
operator>>(signed char &ch)istream [inline]
operator>>(unsigned char *str)istream [inline]
operator>>(unsigned char &ch)istream [inline]
operator>>(bool &arg)istream [inline]
operator>>(short &arg)istream [inline]
operator>>(unsigned short &arg)istream [inline]
operator>>(int16_t &arg)istream [inline]
operator>>(uint16_t &arg)istream [inline]
operator>>(int32_t &arg)istream [inline]
operator>>(uint32_t &arg)istream [inline]
operator>>(double &arg)istream [inline]
operator>>(float &arg)istream [inline]
operator>>(void *&arg)istream [inline]
outios_base [static]
peek()istream
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
rdstate() const ios [inline]
rightios_base [static]
seekdir enum nameios_base
seekg(pos_type pos)istream [inline]
seekg(off_type off, seekdir way)istream [inline]
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipWhite()istream
skipwsios_base [static]
streamsize typedefios_base
tellg()istream [inline]
truncios_base [static]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/classistream.html b/libs/SdFatBeta20120108/html/classistream.html deleted file mode 100755 index 0197b2c..0000000 --- a/libs/SdFatBeta20120108/html/classistream.html +++ /dev/null @@ -1,1843 +0,0 @@ - - - - -SdFat: istream Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

Input Stream. - More...

- -

#include <istream.h>

-
-Inheritance diagram for istream:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for istream:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

bool bad () const
void clear (iostate state=goodbit)
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
streamsize gcount () const
int get ()
istreamget (char &ch)
istreamget (char *str, streamsize n, char delim= '\n')
istreamgetline (char *str, streamsize count, char delim= '\n')
bool good () const
istreamignore (streamsize n=1, int delim=-1)
 operator const void * () const
bool operator! () const
istreamoperator>> (ios &(*pf)(ios &str))
istreamoperator>> (int32_t &arg)
istreamoperator>> (signed char &ch)
istreamoperator>> (uint32_t &arg)
istreamoperator>> (double &arg)
istreamoperator>> (unsigned char *str)
istreamoperator>> (float &arg)
istreamoperator>> (char *str)
istreamoperator>> (void *&arg)
istreamoperator>> (unsigned char &ch)
istreamoperator>> (bool &arg)
istreamoperator>> (istream &(*pf)(istream &str))
istreamoperator>> (ios_base &(*pf)(ios_base &str))
istreamoperator>> (short &arg)
istreamoperator>> (char &ch)
istreamoperator>> (unsigned short &arg)
istreamoperator>> (signed char *str)
istreamoperator>> (int16_t &arg)
istreamoperator>> (uint16_t &arg)
int peek ()
int precision () const
int precision (unsigned int n)
iostate rdstate () const
istreamseekg (off_type off, seekdir way)
istreamseekg (pos_type pos)
fmtflags setf (fmtflags fl)
fmtflags setf (fmtflags fl, fmtflags mask)
void setstate (iostate state)
void skipWhite ()
pos_type tellg ()
void unsetf (fmtflags fl)
unsigned width (unsigned n)
unsigned width ()

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()
-

Detailed Description

-

Input Stream.

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline, inherited]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - - -
void ios::clear (iostate state = goodbit) [inline, inherited]
-
-
-

Clear iostate bits.

-
Parameters:
- - -
[in]stateThe flags you want to set after clearing all flags.
-
-
- -

Reimplemented in fstream, and ofstream.

- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline, inherited]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline, inherited]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - -
streamsize istream::gcount () const [inline]
-
-
-
Returns:
The number of characters extracted by the last unformatted input function.
- -
-
- -
-
- - - - - - - -
int istream::get ()
-
-
-

Extract a character if one is available.

-
Returns:
The character or -1 if a failure occurs. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - -
istream & istream::get (char & c)
-
-
-

Extract a character if one is available.

-
Parameters:
- - -
[out]clocation to receive the extracted character.
-
-
-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::get (char * str,
streamsize n,
char delim = '\n' 
)
-
-
-

Extract characters.

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, n is less than 1, n-1 characters are extracted, or the next character equals delim (delim is not extracted). If no characters are extracted failbit is set. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
istream & istream::getline (char * str,
streamsize n,
char delim = '\n' 
)
-
-
-

Extract characters

-
Parameters:
- - - - -
[out]strLocation to receive extracted characters.
[in]nSize of str.
[in]delimDelimiter
-
-
-

Characters are extracted until extraction fails, the next character equals delim (delim is extracted), or n-1 characters are extracted.

-

The failbit is set if no characters are extracted or n-1 characters are extracted. If end-of-file occurs the eofbit is set.

-
Returns:
always returns *this. A failure is indicated by the stream state.
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline, inherited]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream & istream::ignore (streamsize n = 1,
int delim = -1 
)
-
-
-

Extract characters and discard them.

-
Parameters:
- - - -
[in]nmaximum number of characters to ignore.
[in]delimDelimiter.
-
-
-

Characters are extracted until extraction fails, n characters are extracted, or the next input character equals delim (the delimiter is extracted). If end-of-file occurs the eofbit is set.

-

Failures are indicated by the state of the stream.

-
Returns:
*this
- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline, inherited]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline, inherited]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char * str) [inline]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (void *& arg) [inline]
-
-
-

Extract a value of type void*.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char * str) [inline]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int32_t & arg) [inline]
-
-
-

Extract a value of type int32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint32_t & arg) [inline]
-
-
-

Extract a value of type uint32_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (double & arg) [inline]
-
-
-

Extract a value of type double.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (float & arg) [inline]
-
-
-

Extract a value of type float.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned char & ch) [inline]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char * str) [inline]
-
-
-

Extract a character string

-
Parameters:
- - -
[out]strlocation to store the string.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (bool & arg) [inline]
-
-
-

Extract a value of type bool.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios_base &(*)(ios_base &str) pf) [inline]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (char & ch) [inline]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (short & arg) [inline]
-
-
-

Extract a value of type short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (istream &(*)(istream &str) pf) [inline]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (unsigned short & arg) [inline]
-
-
-

Extract a value of type unsigned short.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (ios &(*)(ios &str) pf) [inline]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (int16_t & arg) [inline]
-
-
-

Extract a value of type int16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (uint16_t & arg) [inline]
-
-
-

Extract a value of type uint16_t.

-
Parameters:
- - -
[out]arglocation to store the value.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
istream& istream::operator>> (signed char & ch) [inline]
-
-
-

Extract a character

-
Parameters:
- - -
[out]chlocation to store the character.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - -
int istream::peek ()
-
-
-

Return the next available character without consuming it.

-
Returns:
The character if the stream state is good else -1;
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline, inherited]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - - -
istream& istream::seekg (pos_type pos) [inline]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the read pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream& istream::seekg (off_type off,
seekdir way 
) [inline]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the read pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline, inherited]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - -
void istream::skipWhite ()
-
-
-

used to implement ws()

- -
-
- -
-
- - - - - - - -
pos_type istream::tellg () [inline]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following files:
    -
  • Arduino/libraries/SdFat/istream.h
  • -
  • Arduino/libraries/SdFat/istream.cpp
  • -
-
- - - diff --git a/libs/SdFatBeta20120108/html/classistream__coll__graph.png b/libs/SdFatBeta20120108/html/classistream__coll__graph.png deleted file mode 100755 index 5379601..0000000 Binary files a/libs/SdFatBeta20120108/html/classistream__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classistream__inherit__graph.png b/libs/SdFatBeta20120108/html/classistream__inherit__graph.png deleted file mode 100755 index 0bc39cf..0000000 Binary files a/libs/SdFatBeta20120108/html/classistream__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classobufstream-members.html b/libs/SdFatBeta20120108/html/classobufstream-members.html deleted file mode 100755 index f54672f..0000000 --- a/libs/SdFatBeta20120108/html/classobufstream-members.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
obufstream Member List
-
-
-This is the complete list of members for obufstream, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
buf()obufstream [inline]
clear(iostate state=goodbit)ios [inline]
cur enum valueios_base
decios_base [static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
fail() const ios [inline]
failbitios_base [static]
fill()ios_base [inline]
fill(char c)ios_base [inline]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
flush()ostream [inline]
fmtflags typedefios_base
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
inios_base [static]
init(char *buf, uint16_t size)obufstream [inline]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
leftios_base [static]
length()obufstream [inline]
obufstream()obufstream [inline]
obufstream(char *buf, uint16_t size)obufstream [inline]
octios_base [static]
off_type typedefios_base
openmode typedefios_base
operator const void *() const ios [inline]
operator!() const ios [inline]
operator<<(ostream &(*pf)(ostream &str))ostream [inline]
operator<<(ios_base &(*pf)(ios_base &str))ostream [inline]
operator<<(bool arg)ostream [inline]
operator<<(const char *arg)ostream [inline]
operator<<(const signed char *arg)ostream [inline]
operator<<(const unsigned char *arg)ostream [inline]
operator<<(char arg)ostream [inline]
operator<<(signed char arg)ostream [inline]
operator<<(unsigned char arg)ostream [inline]
operator<<(double arg)ostream [inline]
operator<<(int16_t arg)ostream [inline]
operator<<(uint16_t arg)ostream [inline]
operator<<(int32_t arg)ostream [inline]
operator<<(uint32_t arg)ostream [inline]
operator<<(const void *arg)ostream [inline]
operator<<(pgm arg)ostream [inline]
ostream() (defined in ostream)ostream [inline]
outios_base [static]
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
put(char ch)ostream [inline]
rdstate() const ios [inline]
rightios_base [static]
seekdir enum nameios_base
seekp(pos_type pos)ostream [inline]
seekp(off_type off, seekdir way)ostream [inline]
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipwsios_base [static]
streamsize typedefios_base
tellp()ostream [inline]
truncios_base [static]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/classobufstream.html b/libs/SdFatBeta20120108/html/classobufstream.html deleted file mode 100755 index 0813a97..0000000 --- a/libs/SdFatBeta20120108/html/classobufstream.html +++ /dev/null @@ -1,1707 +0,0 @@ - - - - -SdFat: obufstream Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

format a char string - More...

- -

#include <bufstream.h>

-
-Inheritance diagram for obufstream:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for obufstream:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

bool bad () const
char * buf ()
void clear (iostate state=goodbit)
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
ostreamflush ()
bool good () const
void init (char *buf, uint16_t size)
uint16_t length ()
 obufstream (char *buf, uint16_t size)
 obufstream ()
 operator const void * () const
bool operator! () const
ostreamoperator<< (int16_t arg)
ostreamoperator<< (bool arg)
ostreamoperator<< (uint16_t arg)
ostreamoperator<< (int32_t arg)
ostreamoperator<< (const char *arg)
ostreamoperator<< (uint32_t arg)
ostreamoperator<< (const signed char *arg)
ostreamoperator<< (const void *arg)
ostreamoperator<< (pgm arg)
ostreamoperator<< (const unsigned char *arg)
ostreamoperator<< (char arg)
ostreamoperator<< (ostream &(*pf)(ostream &str))
ostreamoperator<< (signed char arg)
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
ostreamoperator<< (unsigned char arg)
ostreamoperator<< (double arg)
int precision (unsigned int n)
int precision () const
ostreamput (char ch)
iostate rdstate () const
ostreamseekp (off_type off, seekdir way)
ostreamseekp (pos_type pos)
fmtflags setf (fmtflags fl)
fmtflags setf (fmtflags fl, fmtflags mask)
void setstate (iostate state)
pos_type tellp ()
void unsetf (fmtflags fl)
unsigned width ()
unsigned width (unsigned n)

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()
-

Detailed Description

-

format a char string

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
obufstream::obufstream () [inline]
-
-
-

constructor

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
obufstream::obufstream (char * buf,
uint16_t size 
) [inline]
-
-
-

Constructor

-
Parameters:
- - - -
[in]bufbuffer for formatted string
[in]sizebuffer size
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline, inherited]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - -
char* obufstream::buf () [inline]
-
-
-
Returns:
a pointer to the buffer
- -
-
- -
-
- - - - - - - - -
void ios::clear (iostate state = goodbit) [inline, inherited]
-
-
-

Clear iostate bits.

-
Parameters:
- - -
[in]stateThe flags you want to set after clearing all flags.
-
-
- -

Reimplemented in fstream, and ofstream.

- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline, inherited]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline, inherited]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - -
ostream& ostream::flush () [inline, inherited]
-
-
-

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline, inherited]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void obufstream::init (char * buf,
uint16_t size 
) [inline]
-
-
-

Initialize an obufstream

-
Parameters:
- - - -
[in]bufbuffer for formatted string
[in]sizebuffer size
-
-
- -
-
- -
-
- - - - - - - -
uint16_t obufstream::length () [inline]
-
-
-
Returns:
the length of the formatted string
- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline, inherited]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline, inherited]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const signed char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int32_t arg) [inline, inherited]
-
-
-

Output signed long

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint32_t arg) [inline, inherited]
-
-
-

Output uint32_t

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const void * arg) [inline, inherited]
-
-
-

Output pointer

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const unsigned char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (pgm arg) [inline, inherited]
-
-
-

Output a string from flash

-
Parameters:
- - -
[in]argpgm struct pointing to string
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (signed char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (bool arg) [inline, inherited]
-
-
-

Output bool

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (unsigned char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (double arg) [inline, inherited]
-
-
-

Output double

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int16_t arg) [inline, inherited]
-
-
-

Output signed int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint16_t arg) [inline, inherited]
-
-
-

Output unsigned int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - - -
ostream& ostream::put (char ch) [inline, inherited]
-
-
-

Puts a character in a stream.

-

The unformatted output function inserts the element ch. It returns *this.

-
Parameters:
- - -
[in]chThe character
-
-
-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline, inherited]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::seekp (pos_type pos) [inline, inherited]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the write pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
ostream& ostream::seekp (off_type off,
seekdir way 
) [inline, inherited]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline, inherited]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - -
pos_type ostream::tellp () [inline, inherited]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/classobufstream__coll__graph.png b/libs/SdFatBeta20120108/html/classobufstream__coll__graph.png deleted file mode 100755 index 6280da1..0000000 Binary files a/libs/SdFatBeta20120108/html/classobufstream__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classobufstream__inherit__graph.png b/libs/SdFatBeta20120108/html/classobufstream__inherit__graph.png deleted file mode 100755 index 6280da1..0000000 Binary files a/libs/SdFatBeta20120108/html/classobufstream__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classofstream-members.html b/libs/SdFatBeta20120108/html/classofstream-members.html deleted file mode 100755 index 101a114..0000000 --- a/libs/SdFatBeta20120108/html/classofstream-members.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
ofstream Member List
-
-
-This is the complete list of members for ofstream, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
clear(iostate state=goodbit)ofstream [inline]
close()ofstream [inline]
contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock)SdBaseFile [private]
createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size)SdBaseFile [private]
cur enum valueios_base
curCluster() const SdBaseFile [inline, private]
curPosition() const SdBaseFile [inline, private]
cwd()SdBaseFile [inline, private, static]
dateTimeCallback(void(*dateTime)(uint16_t *date, uint16_t *time))SdBaseFile [inline, private, static]
dateTimeCallbackCancel()SdBaseFile [inline, private, static]
decios_base [static]
dirEntry(dir_t *dir)SdBaseFile [private]
dirName(const dir_t &dir, char *name)SdBaseFile [private, static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
exists(const char *name)SdBaseFile [private]
fail() const ios [inline]
failbitios_base [static]
fgets(char *str, int16_t num, char *delim=0)SdBaseFile [private]
fileSize() const SdBaseFile [inline, private]
fill()ios_base [inline]
fill(char c)ios_base [inline]
firstCluster() const SdBaseFile [inline, private]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
flush()ostream [inline]
fmtflags typedefios_base
getFilename(char *name)SdBaseFile [private]
getpos(fpos_t *pos)SdBaseFile [private]
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
inios_base [static]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
is_open()ofstream [inline]
isDir() const SdBaseFile [inline, private]
isFile() const SdBaseFile [inline, private]
isOpen() const SdBaseFile [inline, private]
isRoot() const SdBaseFile [inline, private]
isSubDir() const SdBaseFile [inline, private]
leftios_base [static]
ls(Print *pr, uint8_t flags=0, uint8_t indent=0)SdBaseFile [private]
ls(uint8_t flags=0)SdBaseFile [private]
mkdir(SdBaseFile *dir, const char *path, bool pFlag=true)SdBaseFile [private]
octios_base [static]
off_type typedefios_base
ofstream() (defined in ofstream)ofstream [inline]
ofstream(const char *path, ios::openmode mode=out)ofstream [inline, explicit]
open(const char *path, openmode mode=out)ofstream [inline]
SdStreamBase::open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag)SdBaseFile [private]
SdStreamBase::open(SdBaseFile *dirFile, const char *path, uint8_t oflag)SdBaseFile [private]
openmode typedefios_base
openNext(SdBaseFile *dirFile, uint8_t oflag)SdBaseFile [private]
openRoot(SdVolume *vol)SdBaseFile [private]
operator const void *() const ios [inline]
operator!() const ios [inline]
operator<<(ostream &(*pf)(ostream &str))ostream [inline]
operator<<(ios_base &(*pf)(ios_base &str))ostream [inline]
operator<<(bool arg)ostream [inline]
operator<<(const char *arg)ostream [inline]
operator<<(const signed char *arg)ostream [inline]
operator<<(const unsigned char *arg)ostream [inline]
operator<<(char arg)ostream [inline]
operator<<(signed char arg)ostream [inline]
operator<<(unsigned char arg)ostream [inline]
operator<<(double arg)ostream [inline]
operator<<(int16_t arg)ostream [inline]
operator<<(uint16_t arg)ostream [inline]
operator<<(int32_t arg)ostream [inline]
operator<<(uint32_t arg)ostream [inline]
operator<<(const void *arg)ostream [inline]
operator<<(pgm arg)ostream [inline]
ostream() (defined in ostream)ostream [inline]
outios_base [static]
peek()SdBaseFile [private]
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
printFatDate(uint16_t fatDate)SdBaseFile [private, static]
printFatDate(Print *pr, uint16_t fatDate)SdBaseFile [private, static]
printFatTime(uint16_t fatTime)SdBaseFile [private, static]
printFatTime(Print *pr, uint16_t fatTime)SdBaseFile [private, static]
printName()SdBaseFile [private]
put(char ch)ostream [inline]
rdstate() const ios [inline]
read()SdBaseFile [private]
read(void *buf, uint16_t nbyte)SdBaseFile [private]
readDir(dir_t *dir)SdBaseFile [private]
remove(SdBaseFile *dirFile, const char *path)SdBaseFile [private, static]
remove()SdBaseFile [private]
rename(SdBaseFile *dirFile, const char *newPath)SdBaseFile [private]
rewind()SdBaseFile [inline, private]
rightios_base [static]
rmdir()SdBaseFile [private]
rmRfStar()SdBaseFile [private]
SdBaseFile()SdBaseFile [inline, private]
SdBaseFile(const char *path, uint8_t oflag)SdBaseFile [private]
seekCur(int32_t offset)SdBaseFile [inline, private]
seekdir enum nameios_base
seekEnd(int32_t offset=0)SdBaseFile [inline, private]
seekp(pos_type pos)ostream [inline]
seekp(off_type off, seekdir way)ostream [inline]
seekSet(uint32_t pos)SdBaseFile [private]
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setpos(fpos_t *pos)SdBaseFile [private]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipwsios_base [static]
streamsize typedefios_base
sync()SdBaseFile [private]
tellp()ostream [inline]
timestamp(SdBaseFile *file)SdBaseFile [private]
timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)SdBaseFile [private]
truncios_base [static]
truncate(uint32_t size)SdBaseFile [private]
type() const SdBaseFile [inline, private]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
volume() const SdBaseFile [inline, private]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
write(const void *buf, uint16_t nbyte)SdBaseFile [private]
writeErrorSdBaseFile [private]
~ofstream() (defined in ofstream)ofstream [inline]
~SdBaseFile() (defined in SdBaseFile)SdBaseFile [inline, private]
- - - diff --git a/libs/SdFatBeta20120108/html/classofstream.html b/libs/SdFatBeta20120108/html/classofstream.html deleted file mode 100755 index e86c737..0000000 --- a/libs/SdFatBeta20120108/html/classofstream.html +++ /dev/null @@ -1,1757 +0,0 @@ - - - - -SdFat: ofstream Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

SD card output stream. - More...

- -

#include <SdStream.h>

-
-Inheritance diagram for ofstream:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for ofstream:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

bool bad () const
void clear (iostate state=goodbit)
void close ()
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
ostreamflush ()
bool good () const
bool is_open ()
 ofstream (const char *path, ios::openmode mode=out)
void open (const char *path, openmode mode=out)
 operator const void * () const
bool operator! () const
ostreamoperator<< (unsigned char arg)
ostreamoperator<< (ostream &(*pf)(ostream &str))
ostreamoperator<< (double arg)
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
ostreamoperator<< (int16_t arg)
ostreamoperator<< (uint16_t arg)
ostreamoperator<< (bool arg)
ostreamoperator<< (int32_t arg)
ostreamoperator<< (pgm arg)
ostreamoperator<< (uint32_t arg)
ostreamoperator<< (const char *arg)
ostreamoperator<< (const void *arg)
ostreamoperator<< (const signed char *arg)
ostreamoperator<< (const unsigned char *arg)
ostreamoperator<< (char arg)
ostreamoperator<< (signed char arg)
int precision (unsigned int n)
int precision () const
ostreamput (char ch)
iostate rdstate () const
ostreamseekp (off_type off, seekdir way)
ostreamseekp (pos_type pos)
fmtflags setf (fmtflags fl, fmtflags mask)
fmtflags setf (fmtflags fl)
void setstate (iostate state)
pos_type tellp ()
void unsetf (fmtflags fl)
unsigned width (unsigned n)
unsigned width ()

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()

-Private Member Functions

bool contiguousRange (uint32_t *bgnBlock, uint32_t *endBlock)
bool createContiguous (SdBaseFile *dirFile, const char *path, uint32_t size)
uint32_t curCluster () const
uint32_t curPosition () const
bool dirEntry (dir_t *dir)
bool exists (const char *name)
int16_t fgets (char *str, int16_t num, char *delim=0)
uint32_t fileSize () const
uint32_t firstCluster () const
bool getFilename (char *name)
void getpos (fpos_t *pos)
bool isDir () const
bool isFile () const
bool isOpen () const
bool isRoot () const
bool isSubDir () const
void ls (Print *pr, uint8_t flags=0, uint8_t indent=0)
void ls (uint8_t flags=0)
bool mkdir (SdBaseFile *dir, const char *path, bool pFlag=true)
bool open (SdBaseFile *dirFile, uint16_t index, uint8_t oflag)
bool open (SdBaseFile *dirFile, const char *path, uint8_t oflag)
bool openNext (SdBaseFile *dirFile, uint8_t oflag)
bool openRoot (SdVolume *vol)
int peek ()
bool printName ()
int16_t read ()
int16_t read (void *buf, uint16_t nbyte)
int8_t readDir (dir_t *dir)
bool remove ()
bool rename (SdBaseFile *dirFile, const char *newPath)
void rewind ()
bool rmdir ()
bool rmRfStar ()
bool seekCur (int32_t offset)
bool seekEnd (int32_t offset=0)
bool seekSet (uint32_t pos)
void setpos (fpos_t *pos)
bool sync ()
bool timestamp (SdBaseFile *file)
bool timestamp (uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
bool truncate (uint32_t size)
uint8_t type () const
SdVolumevolume () const
int16_t write (const void *buf, uint16_t nbyte)

-Static Private Member Functions

static SdBaseFilecwd ()
static void dateTimeCallback (void(*dateTime)(uint16_t *date, uint16_t *time))
static void dateTimeCallbackCancel ()
static void dirName (const dir_t &dir, char *name)
static void printFatDate (uint16_t fatDate)
static void printFatDate (Print *pr, uint16_t fatDate)
static void printFatTime (Print *pr, uint16_t fatTime)
static void printFatTime (uint16_t fatTime)
static bool remove (SdBaseFile *dirFile, const char *path)

-Private Attributes

bool writeError
-

Detailed Description

-

SD card output stream.

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
ofstream::ofstream (const char * path,
ios::openmode mode = out 
) [inline, explicit]
-
-
-

Constructor with open

-
Parameters:
- - - -
[in]pathfile to open
[in]modeopen mode
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline, inherited]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - - -
void ofstream::clear (iostate state = goodbit) [inline]
-
-
-

Clear state and writeError

-
Parameters:
- - -
[in]statenew state for stream
-
-
- -

Reimplemented from ios.

- -
-
- -
-
- - - - - - - -
void ofstream::close () [inline]
-
-
-

Close a file and force cached data and directory information to be written to the storage device.

- -

Reimplemented from SdBaseFile.

- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline, inherited]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline, inherited]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - -
ostream& ostream::flush () [inline, inherited]
-
-
-

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline, inherited]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - -
bool ofstream::is_open () [inline]
-
-
-
Returns:
True if stream is open else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void ofstream::open (const char * path,
openmode mode = out 
) [inline]
-
-
-

Open an ofstream

-
Parameters:
- - - -
[in]pathfile to open
[in]modeopen mode
-
-
-

mode See fstream::open() for valid modes.

- -

Reimplemented from SdBaseFile.

- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline, inherited]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline, inherited]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (double arg) [inline, inherited]
-
-
-

Output double

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint16_t arg) [inline, inherited]
-
-
-

Output unsigned int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int32_t arg) [inline, inherited]
-
-
-

Output signed long

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint32_t arg) [inline, inherited]
-
-
-

Output uint32_t

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const signed char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const void * arg) [inline, inherited]
-
-
-

Output pointer

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const unsigned char * arg) [inline, inherited]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (pgm arg) [inline, inherited]
-
-
-

Output a string from flash

-
Parameters:
- - -
[in]argpgm struct pointing to string
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (signed char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (unsigned char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf) [inline, inherited]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (char arg) [inline, inherited]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (bool arg) [inline, inherited]
-
-
-

Output bool

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int16_t arg) [inline, inherited]
-
-
-

Output signed int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - - -
ostream& ostream::put (char ch) [inline, inherited]
-
-
-

Puts a character in a stream.

-

The unformatted output function inserts the element ch. It returns *this.

-
Parameters:
- - -
[in]chThe character
-
-
-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline, inherited]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
ostream& ostream::seekp (off_type off,
seekdir way 
) [inline, inherited]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::seekp (pos_type pos) [inline, inherited]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the write pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline, inherited]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - -
pos_type ostream::tellp () [inline, inherited]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/classofstream__coll__graph.png b/libs/SdFatBeta20120108/html/classofstream__coll__graph.png deleted file mode 100755 index 6572f15..0000000 Binary files a/libs/SdFatBeta20120108/html/classofstream__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classofstream__inherit__graph.png b/libs/SdFatBeta20120108/html/classofstream__inherit__graph.png deleted file mode 100755 index 291d528..0000000 Binary files a/libs/SdFatBeta20120108/html/classofstream__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classostream-members.html b/libs/SdFatBeta20120108/html/classostream-members.html deleted file mode 100755 index d40c419..0000000 --- a/libs/SdFatBeta20120108/html/classostream-members.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
ostream Member List
-
-
-This is the complete list of members for ostream, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adjustfieldios_base [static]
appios_base [static]
ateios_base [static]
bad() const ios [inline]
badbitios_base [static]
basefieldios_base [static]
beg enum valueios_base
binaryios_base [static]
boolalphaios_base [static]
clear(iostate state=goodbit)ios [inline]
cur enum valueios_base
decios_base [static]
end enum valueios_base
eof() const ios [inline]
eofbitios_base [static]
fail() const ios [inline]
failbitios_base [static]
fill()ios_base [inline]
fill(char c)ios_base [inline]
flags() const ios_base [inline]
flags(fmtflags fl)ios_base [inline]
flagsToBase()ios_base [inline, protected]
flush()ostream [inline]
fmtflags typedefios_base
good() const ios [inline]
goodbitios_base [static]
hexios_base [static]
inios_base [static]
internalios_base [static]
ios()ios [inline]
ios_base() (defined in ios_base)ios_base [inline]
iostate typedefios_base
leftios_base [static]
octios_base [static]
off_type typedefios_base
openmode typedefios_base
operator const void *() const ios [inline]
operator!() const ios [inline]
operator<<(ostream &(*pf)(ostream &str))ostream [inline]
operator<<(ios_base &(*pf)(ios_base &str))ostream [inline]
operator<<(bool arg)ostream [inline]
operator<<(const char *arg)ostream [inline]
operator<<(const signed char *arg)ostream [inline]
operator<<(const unsigned char *arg)ostream [inline]
operator<<(char arg)ostream [inline]
operator<<(signed char arg)ostream [inline]
operator<<(unsigned char arg)ostream [inline]
operator<<(double arg)ostream [inline]
operator<<(int16_t arg)ostream [inline]
operator<<(uint16_t arg)ostream [inline]
operator<<(int32_t arg)ostream [inline]
operator<<(uint32_t arg)ostream [inline]
operator<<(const void *arg)ostream [inline]
operator<<(pgm arg)ostream [inline]
ostream() (defined in ostream)ostream [inline]
outios_base [static]
pos_type typedefios_base
precision() const ios_base [inline]
precision(unsigned int n)ios_base [inline]
put(char ch)ostream [inline]
rdstate() const ios [inline]
rightios_base [static]
seekdir enum nameios_base
seekp(pos_type pos)ostream [inline]
seekp(off_type off, seekdir way)ostream [inline]
setf(fmtflags fl)ios_base [inline]
setf(fmtflags fl, fmtflags mask)ios_base [inline]
setstate(iostate state)ios [inline]
showbaseios_base [static]
showpointios_base [static]
showposios_base [static]
skipwsios_base [static]
streamsize typedefios_base
tellp()ostream [inline]
truncios_base [static]
unsetf(fmtflags fl)ios_base [inline]
uppercaseios_base [static]
width()ios_base [inline]
width(unsigned n)ios_base [inline]
- - - diff --git a/libs/SdFatBeta20120108/html/classostream.html b/libs/SdFatBeta20120108/html/classostream.html deleted file mode 100755 index 9391a64..0000000 --- a/libs/SdFatBeta20120108/html/classostream.html +++ /dev/null @@ -1,1581 +0,0 @@ - - - - -SdFat: ostream Class Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
- -
- -

Output Stream. - More...

- -

#include <ostream.h>

-
-Inheritance diagram for ostream:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for ostream:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

typedef unsigned int fmtflags
typedef unsigned char iostate
typedef int32_t off_type
typedef uint8_t openmode
typedef uint32_t pos_type
enum  seekdir { beg, -cur, -end - }
typedef uint32_t streamsize

-Public Member Functions

bool bad () const
void clear (iostate state=goodbit)
bool eof () const
bool fail () const
char fill ()
char fill (char c)
fmtflags flags () const
fmtflags flags (fmtflags fl)
ostreamflush ()
bool good () const
 operator const void * () const
bool operator! () const
ostreamoperator<< (bool arg)
ostreamoperator<< (const void *arg)
ostreamoperator<< (pgm arg)
ostreamoperator<< (char arg)
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
ostreamoperator<< (signed char arg)
ostreamoperator<< (ostream &(*pf)(ostream &str))
ostreamoperator<< (unsigned char arg)
ostreamoperator<< (const char *arg)
ostreamoperator<< (double arg)
ostreamoperator<< (const signed char *arg)
ostreamoperator<< (int16_t arg)
ostreamoperator<< (uint16_t arg)
ostreamoperator<< (int32_t arg)
ostreamoperator<< (const unsigned char *arg)
ostreamoperator<< (uint32_t arg)
int precision (unsigned int n)
int precision () const
ostreamput (char ch)
iostate rdstate () const
ostreamseekp (off_type off, seekdir way)
ostreamseekp (pos_type pos)
fmtflags setf (fmtflags fl)
fmtflags setf (fmtflags fl, fmtflags mask)
void setstate (iostate state)
pos_type tellp ()
void unsetf (fmtflags fl)
unsigned width (unsigned n)
unsigned width ()

-Static Public Attributes

static const fmtflags adjustfield = left | right | internal
static const openmode app = 0X4
static const openmode ate = 0X8
static const iostate badbit = 0X01
static const fmtflags basefield = dec | hex | oct
static const openmode binary = 0X10
static const fmtflags boolalpha = 0x0100
static const fmtflags dec = 0x0008
static const iostate eofbit = 0x02
static const iostate failbit = 0X04
static const iostate goodbit = 0x00
static const fmtflags hex = 0x0010
static const openmode in = 0X20
static const fmtflags internal = 0x0004
static const fmtflags left = 0x0001
static const fmtflags oct = 0x0020
static const openmode out = 0X40
static const fmtflags right = 0x0002
static const fmtflags showbase = 0x0200
static const fmtflags showpoint = 0x0400
static const fmtflags showpos = 0x0800
static const fmtflags skipws = 0x1000
static const openmode trunc = 0X80
static const fmtflags uppercase = 0x4000

-Protected Member Functions

uint8_t flagsToBase ()
-

Detailed Description

-

Output Stream.

-

Member Typedef Documentation

- -
-
- - - - -
typedef unsigned int ios_base::fmtflags [inherited]
-
-
-

type for format flags

- -
-
- -
-
- - - - -
typedef unsigned char ios_base::iostate [inherited]
-
-
-

typedef for iostate bitmask

- -
-
- -
-
- - - - -
typedef int32_t ios_base::off_type [inherited]
-
-
-

type for relative seek offset

- -
-
- -
-
- - - - -
typedef uint8_t ios_base::openmode [inherited]
-
-
-

typedef for iostream open mode

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::pos_type [inherited]
-
-
-

type for absolute seek position

- -
-
- -
-
- - - - -
typedef uint32_t ios_base::streamsize [inherited]
-
-
-

unsigned size that can represent maximum file size. (violates spec - should be signed)

- -
-
-

Member Enumeration Documentation

- -
-
- - - - -
enum ios_base::seekdir [inherited]
-
-
-

enumerated type for the direction of relative seeks

-
Enumerator:
- - - -
beg  -

seek relative to the beginning of the stream

-
cur  -

seek relative to the current stream position

-
end  -

seek relative to the end of the stream

-
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool ios::bad () const [inline, inherited]
-
-
-
Returns:
true if bad bit is set else false.
- -
-
- -
-
- - - - - - - - -
void ios::clear (iostate state = goodbit) [inline, inherited]
-
-
-

Clear iostate bits.

-
Parameters:
- - -
[in]stateThe flags you want to set after clearing all flags.
-
-
- -

Reimplemented in fstream, and ofstream.

- -
-
- -
-
- - - - - - - -
bool ios::eof () const [inline, inherited]
-
-
-
Returns:
true if end of file has been reached else false.
-

Warning: An empty file returns false before the first read.

-

Moral: eof() is only useful in combination with fail(), to find out whether EOF was the cause for failure

- -
-
- -
-
- - - - - - - -
bool ios::fail () const [inline, inherited]
-
-
-
Returns:
true if any iostate bit other than eof are set else false.
- -
-
- -
-
- - - - - - - - -
char ios_base::fill (char c) [inline, inherited]
-
-
-

Set fill character

-
Parameters:
- - -
[in]cnew fill character
-
-
-
Returns:
old fill character
- -
-
- -
-
- - - - - - - -
char ios_base::fill () [inline, inherited]
-
-
-
Returns:
fill character
- -
-
- -
-
- - - - - - - -
fmtflags ios_base::flags () const [inline, inherited]
-
-
-
Returns:
format flags
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::flags (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flag
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - -
uint8_t ios_base::flagsToBase () [inline, protected, inherited]
-
-
-
Returns:
current number base
- -
-
- -
-
- - - - - - - -
ostream& ostream::flush () [inline]
-
-
-

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
bool ios::good () const [inline, inherited]
-
-
-
Returns:
True if no iostate flags are set else false.
- -
-
- -
-
- - - - - - - -
ios::operator const void * () const [inline, inherited]
-
-
-
Returns:
null pointer if fail() is true.
- -
-
- -
-
- - - - - - - -
bool ios::operator! () const [inline, inherited]
-
-
-
Returns:
true if fail() else false.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ios_base &(*)(ios_base &str) pf) [inline]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (pgm arg) [inline]
-
-
-

Output a string from flash

-
Parameters:
- - -
[in]argpgm struct pointing to string
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (signed char arg) [inline]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (bool arg) [inline]
-
-
-

Output bool

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const char * arg) [inline]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (unsigned char arg) [inline]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (double arg) [inline]
-
-
-

Output double

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (ostream &(*)(ostream &str) pf) [inline]
-
-
-

call manipulator

-
Parameters:
- - -
[in]pffunction to call
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int16_t arg) [inline]
-
-
-

Output signed int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const signed char * arg) [inline]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const unsigned char * arg) [inline]
-
-
-

Output string

-
Parameters:
- - -
[in]argstring to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint16_t arg) [inline]
-
-
-

Output unsigned int

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (int32_t arg) [inline]
-
-
-

Output signed long

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (uint32_t arg) [inline]
-
-
-

Output uint32_t

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (char arg) [inline]
-
-
-

Output character

-
Parameters:
- - -
[in]argcharacter to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
ostream& ostream::operator<< (const void * arg) [inline]
-
-
-

Output pointer

-
Parameters:
- - -
[in]argvalue to output
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - -
int ios_base::precision () const [inline, inherited]
-
-
-
Returns:
precision
- -
-
- -
-
- - - - - - - - -
int ios_base::precision (unsigned int n) [inline, inherited]
-
-
-

set precision

-
Parameters:
- - -
[in]nnew precision
-
-
-
Returns:
old precision
- -
-
- -
-
- - - - - - - - -
ostream& ostream::put (char ch) [inline]
-
-
-

Puts a character in a stream.

-

The unformatted output function inserts the element ch. It returns *this.

-
Parameters:
- - -
[in]chThe character
-
-
-
Returns:
A reference to the ostream object.
- -
-
- -
-
- - - - - - - -
iostate ios::rdstate () const [inline, inherited]
-
-
-
Returns:
The iostate flags for this file.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
ostream& ostream::seekp (off_type off,
seekdir way 
) [inline]
-
-
-

Set the stream position.

-
Parameters:
- - - -
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
ostream& ostream::seekp (pos_type pos) [inline]
-
-
-

Set the stream position

-
Parameters:
- - -
[in]posThe absolute position in which to move the write pointer.
-
-
-
Returns:
Is always *this. Failure is indicated by the state of *this.
- -
-
- -
-
- - - - - - - - -
fmtflags ios_base::setf (fmtflags fl) [inline, inherited]
-
-
-

set format flags

-
Parameters:
- - -
[in]flnew flags to be or'ed in
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
fmtflags ios_base::setf (fmtflags fl,
fmtflags mask 
) [inline, inherited]
-
-
-

modify format flags

-
Parameters:
- - - -
[in]maskflags to be removed
[in]flflags to be set after mask bits have been cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
void ios::setstate (iostate state) [inline, inherited]
-
-
-

Set iostate bits.

-
Parameters:
- - -
[in]stateBitts to set.
-
-
- -
-
- -
-
- - - - - - - -
pos_type ostream::tellp () [inline]
-
-
-
Returns:
the stream position
- -
-
- -
-
- - - - - - - - -
void ios_base::unsetf (fmtflags fl) [inline, inherited]
-
-
-

clear format flags

-
Parameters:
- - -
[in]flflags to be cleared
-
-
-
Returns:
old flags
- -
-
- -
-
- - - - - - - - -
unsigned ios_base::width (unsigned n) [inline, inherited]
-
-
-

set width

-
Parameters:
- - -
[in]nnew width
-
-
-
Returns:
old width
- -
-
- -
-
- - - - - - - -
unsigned ios_base::width () [inline, inherited]
-
-
-
Returns:
width
- -
-
-

Member Data Documentation

- -
-
- - - - -
const fmtflags ios_base::adjustfield = left | right | internal [static, inherited]
-
-
-

mask for adjustfield

- -
-
- -
-
- - - - -
const openmode ios_base::app = 0X4 [static, inherited]
-
-
-

seek to end before each write

- -
-
- -
-
- - - - -
const openmode ios_base::ate = 0X8 [static, inherited]
-
-
-

open and seek to end immediately after opening

- -
-
- -
-
- - - - -
const iostate ios_base::badbit = 0X01 [static, inherited]
-
-
-

iostate bad bit for a nonrecoverable error.

- -
-
- -
-
- - - - -
const fmtflags ios_base::basefield = dec | hex | oct [static, inherited]
-
-
-

mask for basefield

- -
-
- -
-
- - - - -
const openmode ios_base::binary = 0X10 [static, inherited]
-
-
-

perform input and output in binary mode (as opposed to text mode)

- -
-
- -
-
- - - - -
const fmtflags ios_base::boolalpha = 0x0100 [static, inherited]
-
-
-

use strings true/false for bool

- -
-
- -
-
- - - - -
const fmtflags ios_base::dec = 0x0008 [static, inherited]
-
-
-

base 10 flag

- -
-
- -
-
- - - - -
const iostate ios_base::eofbit = 0x02 [static, inherited]
-
-
-

iostate bit for end of file reached

- -
-
- -
-
- - - - -
const iostate ios_base::failbit = 0X04 [static, inherited]
-
-
-

iostate fail bit for nonfatal error

- -
-
- -
-
- - - - -
const iostate ios_base::goodbit = 0x00 [static, inherited]
-
-
-

iostate for no flags

- -
-
- -
-
- - - - -
const fmtflags ios_base::hex = 0x0010 [static, inherited]
-
-
-

base 16 flag

- -
-
- -
-
- - - - -
const openmode ios_base::in = 0X20 [static, inherited]
-
-
-

open for input

- -
-
- -
-
- - - - -
const fmtflags ios_base::internal = 0x0004 [static, inherited]
-
-
-

fill between sign/base prefix and number

- -
-
- -
-
- - - - -
const fmtflags ios_base::left = 0x0001 [static, inherited]
-
-
-

left adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::oct = 0x0020 [static, inherited]
-
-
-

base 8 flag

- -
-
- -
-
- - - - -
const openmode ios_base::out = 0X40 [static, inherited]
-
-
-

open for output

- -
-
- -
-
- - - - -
const fmtflags ios_base::right = 0x0002 [static, inherited]
-
-
-

right adjust fields

- -
-
- -
-
- - - - -
const fmtflags ios_base::showbase = 0x0200 [static, inherited]
-
-
-

use prefix 0X for hex and 0 for oct

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpoint = 0x0400 [static, inherited]
-
-
-

always show '.' for floating numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::showpos = 0x0800 [static, inherited]
-
-
-

show + sign for nonnegative numbers

- -
-
- -
-
- - - - -
const fmtflags ios_base::skipws = 0x1000 [static, inherited]
-
-
-

skip initial white space

- -
-
- -
-
- - - - -
const openmode ios_base::trunc = 0X80 [static, inherited]
-
-
-

truncate an existing stream when opening

- -
-
- -
-
- - - - -
const fmtflags ios_base::uppercase = 0x4000 [static, inherited]
-
-
-

use uppercase letters in number representations

- -
-
-
The documentation for this class was generated from the following files:
    -
  • Arduino/libraries/SdFat/ostream.h
  • -
  • Arduino/libraries/SdFat/ostream.cpp
  • -
-
- - - diff --git a/libs/SdFatBeta20120108/html/classostream__coll__graph.png b/libs/SdFatBeta20120108/html/classostream__coll__graph.png deleted file mode 100755 index d05dfc1..0000000 Binary files a/libs/SdFatBeta20120108/html/classostream__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/classostream__inherit__graph.png b/libs/SdFatBeta20120108/html/classostream__inherit__graph.png deleted file mode 100755 index 0a10e34..0000000 Binary files a/libs/SdFatBeta20120108/html/classostream__inherit__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/files.html b/libs/SdFatBeta20120108/html/files.html deleted file mode 100755 index 6d42813..0000000 --- a/libs/SdFatBeta20120108/html/files.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - -SdFat: File List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
File List
-
-
-
Here is a list of all documented files with brief descriptions:
- - - - - - - - - - - - - - - -
Arduino/libraries/SdFat/ArduinoStream.hArduinoInStream and ArduinoOutStream classes
Arduino/libraries/SdFat/bufstream.hibufstream and obufstream classes
Arduino/libraries/SdFat/ios.hios_base and ios classes
Arduino/libraries/SdFat/iostream.hiostream class
Arduino/libraries/SdFat/istream.histream class
Arduino/libraries/SdFat/ostream.hostream class
Arduino/libraries/SdFat/Sd2Card.hSd2Card class for V2 SD/SDHC cards
Arduino/libraries/SdFat/SdBaseFile.hSdBaseFile class
Arduino/libraries/SdFat/SdFat.hSdFat class
Arduino/libraries/SdFat/SdFatConfig.hConfiguration definitions
Arduino/libraries/SdFat/SdFatStructs.hFAT file structures
Arduino/libraries/SdFat/SdFatUtil.hUseful utility functions
Arduino/libraries/SdFat/SdFile.hSdFile class
Arduino/libraries/SdFat/SdStream.hfstream, ifstream, and ofstream classes
Arduino/libraries/SdFat/SdVolume.hSdVolume class
-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_0x62.html b/libs/SdFatBeta20120108/html/functions_0x62.html deleted file mode 100755 index 33ec064..0000000 --- a/libs/SdFatBeta20120108/html/functions_0x62.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - -SdFat: Class Members - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- b -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_0x68.html b/libs/SdFatBeta20120108/html/functions_0x68.html deleted file mode 100755 index 4242d49..0000000 --- a/libs/SdFatBeta20120108/html/functions_0x68.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - -SdFat: Class Members - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- h -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_0x6a.html b/libs/SdFatBeta20120108/html/functions_0x6a.html deleted file mode 100755 index a06caaf..0000000 --- a/libs/SdFatBeta20120108/html/functions_0x6a.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - -SdFat: Class Members - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- j -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_0x6c.html b/libs/SdFatBeta20120108/html/functions_0x6c.html deleted file mode 100755 index 73e7b4a..0000000 --- a/libs/SdFatBeta20120108/html/functions_0x6c.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - -SdFat: Class Members - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- l -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_0x6e.html b/libs/SdFatBeta20120108/html/functions_0x6e.html deleted file mode 100755 index 874f5f3..0000000 --- a/libs/SdFatBeta20120108/html/functions_0x6e.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - -SdFat: Class Members - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- n -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_0x70.html b/libs/SdFatBeta20120108/html/functions_0x70.html deleted file mode 100755 index 7d55a85..0000000 --- a/libs/SdFatBeta20120108/html/functions_0x70.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - -SdFat: Class Members - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- p -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_0x74.html b/libs/SdFatBeta20120108/html/functions_0x74.html deleted file mode 100755 index 6893408..0000000 --- a/libs/SdFatBeta20120108/html/functions_0x74.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - -SdFat: Class Members - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- t -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_func.html b/libs/SdFatBeta20120108/html/functions_func.html deleted file mode 100755 index 9a4a3c9..0000000 --- a/libs/SdFatBeta20120108/html/functions_func.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - -SdFat: Class Members - Functions - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-  - -

- a -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_func_0x62.html b/libs/SdFatBeta20120108/html/functions_func_0x62.html deleted file mode 100755 index 794b24b..0000000 --- a/libs/SdFatBeta20120108/html/functions_func_0x62.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - -SdFat: Class Members - Functions - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-  - -

- b -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_func_0x66.html b/libs/SdFatBeta20120108/html/functions_func_0x66.html deleted file mode 100755 index 93e9877..0000000 --- a/libs/SdFatBeta20120108/html/functions_func_0x66.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - -SdFat: Class Members - Functions - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-  - -

- f -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_func_0x67.html b/libs/SdFatBeta20120108/html/functions_func_0x67.html deleted file mode 100755 index 6a7dbf9..0000000 --- a/libs/SdFatBeta20120108/html/functions_func_0x67.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - -SdFat: Class Members - Functions - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-  - -

- g -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_func_0x6c.html b/libs/SdFatBeta20120108/html/functions_func_0x6c.html deleted file mode 100755 index 675a757..0000000 --- a/libs/SdFatBeta20120108/html/functions_func_0x6c.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - -SdFat: Class Members - Functions - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-  - -

- l -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_func_0x70.html b/libs/SdFatBeta20120108/html/functions_func_0x70.html deleted file mode 100755 index a79c5b0..0000000 --- a/libs/SdFatBeta20120108/html/functions_func_0x70.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - -SdFat: Class Members - Functions - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-  - -

- p -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_func_0x75.html b/libs/SdFatBeta20120108/html/functions_func_0x75.html deleted file mode 100755 index 791c2d9..0000000 --- a/libs/SdFatBeta20120108/html/functions_func_0x75.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - -SdFat: Class Members - Functions - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-  - -

- u -

-
- - - diff --git a/libs/SdFatBeta20120108/html/functions_vars.html b/libs/SdFatBeta20120108/html/functions_vars.html deleted file mode 100755 index be85259..0000000 --- a/libs/SdFatBeta20120108/html/functions_vars.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - -SdFat: Class Members - Variables - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-  - -

- a -

- - -

- b -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- f -

- - -

- g -

- - -

- h -

- - -

- i -

- - -

- j -

- - -

- l -

- - -

- m -

- - -

- n -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- u -

- - -

- v -

- - -

- w -

-
- - - diff --git a/libs/SdFatBeta20120108/html/globals_defs.html b/libs/SdFatBeta20120108/html/globals_defs.html deleted file mode 100755 index 70bfe7d..0000000 --- a/libs/SdFatBeta20120108/html/globals_defs.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - -SdFat: File Members - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - -
-
-
- - - diff --git a/libs/SdFatBeta20120108/html/globals_type.html b/libs/SdFatBeta20120108/html/globals_type.html deleted file mode 100755 index 2c346e2..0000000 --- a/libs/SdFatBeta20120108/html/globals_type.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - -SdFat: File Members - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - -
-
-
- - - diff --git a/libs/SdFatBeta20120108/html/globals_vars.html b/libs/SdFatBeta20120108/html/globals_vars.html deleted file mode 100755 index a69d71c..0000000 --- a/libs/SdFatBeta20120108/html/globals_vars.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - -SdFat: File Members - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - - - -
-
-  - -

- b -

- - -

- d -

- - -

- e -

- - -

- f -

- - -

- l -

- - -

- o -

- - -

- s -

- - -

- t -

-
- - - diff --git a/libs/SdFatBeta20120108/html/graph_legend.html b/libs/SdFatBeta20120108/html/graph_legend.html deleted file mode 100755 index 9c5df42..0000000 --- a/libs/SdFatBeta20120108/html/graph_legend.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - -SdFat: Graph Legend - - - - - -
-
- - - - - - -
-
SdFat
-
-
- -
-
-
-
Graph Legend
-
-
-

This page explains how to interpret the graphs that are generated by doxygen.

-

Consider the following example:

-
/*! Invisible class because of truncation */
-class Invisible { };
-
-/*! Truncated class, inheritance relation is hidden */
-class Truncated : public Invisible { };
-
-/* Class not documented with doxygen comments */
-class Undocumented { };
-
-/*! Class that is inherited using public inheritance */
-class PublicBase : public Truncated { };
-
-/*! A template class */
-template<class T> class Templ { };
-
-/*! Class that is inherited using protected inheritance */
-class ProtectedBase { };
-
-/*! Class that is inherited using private inheritance */
-class PrivateBase { };
-
-/*! Class that is used by the Inherited class */
-class Used { };
-
-/*! Super class that inherits a number of other classes */
-class Inherited : public PublicBase,
-                  protected ProtectedBase,
-                  private PrivateBase,
-                  public Undocumented,
-                  public Templ<int>
-{
-  private:
-    Used *m_usedClass;
-};
-

This will result in the following graph:

-
-graph_legend.png -
-

The boxes in the above graph have the following meaning:

-
    -
  • -A filled gray box represents the struct or class for which the graph is generated.
  • -
  • -A box with a black border denotes a documented struct or class.
  • -
  • -A box with a grey border denotes an undocumented struct or class.
  • -
  • -A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • -
-

The arrows have the following meaning:

-
    -
  • -A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • -
  • -A dark green arrow is used for protected inheritance.
  • -
  • -A dark red arrow is used for private inheritance.
  • -
  • -A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • -
  • -A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • -
-
- - - diff --git a/libs/SdFatBeta20120108/html/graph_legend.png b/libs/SdFatBeta20120108/html/graph_legend.png deleted file mode 100755 index f99376d..0000000 Binary files a/libs/SdFatBeta20120108/html/graph_legend.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/hierarchy.html b/libs/SdFatBeta20120108/html/hierarchy.html deleted file mode 100755 index 56d442f..0000000 --- a/libs/SdFatBeta20120108/html/hierarchy.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - -SdFat: Class Hierarchy - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
Class Hierarchy
-
- - - - diff --git a/libs/SdFatBeta20120108/html/index.html b/libs/SdFatBeta20120108/html/index.html deleted file mode 100755 index ce3ca8b..0000000 --- a/libs/SdFatBeta20120108/html/index.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - -SdFat: Arduino SdFat Library - - - - - -
-
- - - - - - -
-
SdFat
-
-
- -
-
-
-
Arduino SdFat Library
-
-
-
Copyright © 2011 by William Greiman

-Introduction

-

The Arduino SdFat Library is a minimal implementation of FAT16 and FAT32 file systems on SD flash memory cards. Standard SD and high capacity SDHC cards are supported.

-

Experimental support for FAT12 can be enabled by setting FAT12_SUPPORT nonzero in SdFatConfig.h.

-

The SdFat library only supports short 8.3 names.

-

The main classes in SdFat are SdFat, SdFile, fstream, ifstream, and ofstream.

-

The SdFat class maintains a volume working directories, a current working directory, and simplifies initialization of other classes.

-

The SdFile class provides binary file access functions such as open(), read(), remove(), write(), close() and sync(). This class supports access to the root directory and subdirectories.

-

The fstream class implements C++ iostreams for both reading and writing text files.

-

The ifstream class implements the C++ iostreams for reading text files.

-

The ofstream class implements the C++ iostreams for writing text files.

-

The classes ibufstream and obufstream format and parse character strings in memory buffers.

-

the classes ArduinoInStream and ArduinoOutStream provide iostream functions for Serial, LiquidCrystal, and other devices.

-

The SdVolume class supports FAT16 and FAT32 partitions. Most applications will not need to call SdVolume member function.

-

The Sd2Card class supports access to standard SD cards and SDHC cards. Most applications will not need to call Sd2Card functions. The Sd2Card class can be used for raw access to the SD card.

-

A number of example are provided in the SdFat/examples folder. These were developed to test SdFat and illustrate its use.

-

SdFat was developed for high speed data recording. SdFat was used to implement an audio record/play class, WaveRP, for the Adafruit Wave Shield. This application uses special Sd2Card calls to write to contiguous files in raw mode. These functions reduce write latency so that audio can be recorded with the small amount of RAM in the Arduino.

-

-SD\SDHC Cards

-

Arduinos access SD cards using the cards SPI protocol. PCs, Macs, and most consumer devices use the 4-bit parallel SD protocol. A card that functions well on A PC or Mac may not work well on the Arduino.

-

Most cards have good SPI read performance but cards vary widely in SPI write performance. Write performance is limited by how efficiently the card manages internal erase/remapping operations. The Arduino cannot optimize writes to reduce erase operations because of its limit RAM.

-

SanDisk cards generally have good write performance. They seem to have more internal RAM buffering than other cards and therefore can limit the number of flash erase operations that the Arduino forces due to its limited RAM.

-

-Hardware Configuration

-

SdFat was developed using an Adafruit Industries Wave Shield.

-

The hardware interface to the SD card should not use a resistor based level shifter. SdFat sets the SPI bus frequency to 8 MHz which results in signal rise times that are too slow for the edge detectors in many newer SD card controllers when resistor voltage dividers are used.

-

The 5 to 3.3 V level shifter for 5 V Arduinos should be IC based like the 74HC4050N based circuit shown in the file SdLevel.png. The Adafruit Wave Shield uses a 74AHC125N. Gravitech sells SD and MicroSD Card Adapters based on the 74LCX245.

-

If you are using a resistor based level shifter and are having problems try setting the SPI bus frequency to 4 MHz. This can be done by using card.init(SPI_HALF_SPEED) to initialize the SD card.

-

-Bugs and Comments

-

If you wish to report bugs or have comments, send email to fat16lib@sbcglobal.net.

-

-SdFat Usage

-

SdFat uses a slightly restricted form of short names. Only printable ASCII characters are supported. No characters with code point values greater than 127 are allowed. Space is not allowed even though space was allowed in the API of early versions of DOS.

-

Short names are limited to 8 characters followed by an optional period (.) and extension of up to 3 characters. The characters may be any combination of letters and digits. The following special characters are also allowed:

-

$ % ' - _ @ ~ ` ! ( ) { } ^ # &

-

Short names are always converted to upper case and their original case value is lost.

-
Note:
The Arduino Print class uses character at a time writes so it was necessary to use a sync() function to control when data is written to the SD card.
-
An application which writes to a file using print(), println() or write() must call sync() at the appropriate time to force data and directory information to be written to the SD Card. Data and directory information are also written to the SD card when close() is called.
-
Applications must use care calling sync() since 2048 bytes of I/O is required to update file and directory information. This includes writing the current data block, reading the block that contains the directory entry for update, writing the directory block back and reading back the current data block.
-

It is possible to open a file with two or more instances of SdFile. A file may be corrupted if data is written to the file by more than one instance of SdFile.

-

-How to format SD Cards as FAT Volumes

-

You should use a freshly formatted SD card for best performance. FAT file systems become slower if many files have been created and deleted. This is because the directory entry for a deleted file is marked as deleted, but is not deleted. When a new file is created, these entries must be scanned before creating the file, a flaw in the FAT design. Also files can become fragmented which causes reads and writes to be slower.

-

A formatter sketch, SdFormatter.pde, is included in the SdFat/examples/SdFormatter directory. This sketch attempts to emulate SD Association's SDFormatter.

-

The best way to restore an SD card's format on a PC is to use SDFormatter which can be downloaded from:

-

http://www.sdcard.org/consumers/formatter/

-

SDFormatter aligns flash erase boundaries with file system structures which reduces write latency and file system overhead.

-

SDFormatter does not have an option for FAT type so it may format small cards as FAT12.

-

After the MBR is restored by SDFormatter you may need to reformat small cards that have been formatted FAT12 to force the volume type to be FAT16.

-

If you reformat the SD card with an OS utility, choose a cluster size that will result in:

-

4084 < CountOfClusters && CountOfClusters < 65525

-

The volume will then be FAT16.

-

If you are formatting an SD card on OS X or Linux, be sure to use the first partition. Format this partition with a cluster count in above range for FAT16. SDHC cards should be formatted FAT32 with a cluster size of 32 KB.

-

Microsoft operating systems support removable media formatted with a Master Boot Record, MBR, or formatted as a super floppy with a FAT Boot Sector in block zero.

-

Microsoft operating systems expect MBR formatted removable media to have only one partition. The first partition should be used.

-

Microsoft operating systems do not support partitioning SD flash cards. If you erase an SD card with a program like KillDisk, Most versions of Windows will format the card as a super floppy.

-

-References

-

Adafruit Industries:

-

http://www.adafruit.com/

-

http://www.ladyada.net/make/waveshield/

-

The Arduino site:

-

http://www.arduino.cc/

-

For more information about FAT file systems see:

-

http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx

-

For information about using SD cards as SPI devices see:

-

http://www.sdcard.org/developers/tech/sdcard/pls/Simplified_Physical_Layer_Spec.pdf

-

The ATmega328 datasheet:

-

http://www.atmel.com/dyn/resources/prod_documents/doc8161.pdf

-
- - - diff --git a/libs/SdFatBeta20120108/html/inherit_graph_0.png b/libs/SdFatBeta20120108/html/inherit_graph_0.png deleted file mode 100755 index 2b0d4a3..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_0.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_1.png b/libs/SdFatBeta20120108/html/inherit_graph_1.png deleted file mode 100755 index dad4a68..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_1.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_10.png b/libs/SdFatBeta20120108/html/inherit_graph_10.png deleted file mode 100755 index 6761f62..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_10.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_11.png b/libs/SdFatBeta20120108/html/inherit_graph_11.png deleted file mode 100755 index 5d34e0d..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_11.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_12.png b/libs/SdFatBeta20120108/html/inherit_graph_12.png deleted file mode 100755 index 89883f7..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_12.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_13.png b/libs/SdFatBeta20120108/html/inherit_graph_13.png deleted file mode 100755 index c521fa0..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_13.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_14.png b/libs/SdFatBeta20120108/html/inherit_graph_14.png deleted file mode 100755 index 4033b84..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_14.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_15.png b/libs/SdFatBeta20120108/html/inherit_graph_15.png deleted file mode 100755 index f8da061..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_15.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_2.png b/libs/SdFatBeta20120108/html/inherit_graph_2.png deleted file mode 100755 index 81d8db1..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_2.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_3.png b/libs/SdFatBeta20120108/html/inherit_graph_3.png deleted file mode 100755 index c77a10f..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_3.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_4.png b/libs/SdFatBeta20120108/html/inherit_graph_4.png deleted file mode 100755 index 4a6159b..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_4.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_5.png b/libs/SdFatBeta20120108/html/inherit_graph_5.png deleted file mode 100755 index cad9161..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_5.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_6.png b/libs/SdFatBeta20120108/html/inherit_graph_6.png deleted file mode 100755 index e867dcf..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_6.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_7.png b/libs/SdFatBeta20120108/html/inherit_graph_7.png deleted file mode 100755 index 72ed013..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_7.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_8.png b/libs/SdFatBeta20120108/html/inherit_graph_8.png deleted file mode 100755 index 31bac90..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_8.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherit_graph_9.png b/libs/SdFatBeta20120108/html/inherit_graph_9.png deleted file mode 100755 index a8d36bc..0000000 Binary files a/libs/SdFatBeta20120108/html/inherit_graph_9.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/inherits.html b/libs/SdFatBeta20120108/html/inherits.html deleted file mode 100755 index e99c3b3..0000000 --- a/libs/SdFatBeta20120108/html/inherits.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - -SdFat: Class Hierarchy - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
Class Hierarchy
-
-
- - - - - - - - - - - - - - - - - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
-
- - - diff --git a/libs/SdFatBeta20120108/html/ios_8h.html b/libs/SdFatBeta20120108/html/ios_8h.html deleted file mode 100755 index 1820151..0000000 --- a/libs/SdFatBeta20120108/html/ios_8h.html +++ /dev/null @@ -1,549 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/ios.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/ios.h File Reference
-
-
- -

ios_base and ios classes -More...

-
#include <SdBaseFile.h>
-
-Include dependency graph for ios.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - -

-Classes

class  ios
 Error and state information for all streams. More...
class  ios_base
 Base class for all streams. More...

-Functions

ios_baseboolalpha (ios_base &str)
ios_basedec (ios_base &str)
ios_basehex (ios_base &str)
ios_baseinternal (ios_base &str)
ios_baseleft (ios_base &str)
ios_basenoboolalpha (ios_base &str)
ios_basenoshowbase (ios_base &str)
ios_basenoshowpoint (ios_base &str)
ios_basenoshowpos (ios_base &str)
ios_basenoskipws (ios_base &str)
ios_basenouppercase (ios_base &str)
ios_baseoct (ios_base &str)
ios_baseright (ios_base &str)
ios_baseshowbase (ios_base &str)
ios_baseshowpoint (ios_base &str)
ios_baseshowpos (ios_base &str)
ios_baseskipws (ios_base &str)
ios_baseuppercase (ios_base &str)
-

Detailed Description

-

ios_base and ios classes

-

Function Documentation

- -
-
- - - - - - - - -
ios_base& boolalpha (ios_basestr) [inline]
-
-
-

function for boolalpha manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& dec (ios_basestr) [inline]
-
-
-

function for dec manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& hex (ios_basestr) [inline]
-
-
-

function for hex manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& internal (ios_basestr) [inline]
-
-
-

function for internal manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& left (ios_basestr) [inline]
-
-
-

function for left manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& noboolalpha (ios_basestr) [inline]
-
-
-

function for noboolalpha manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& noshowbase (ios_basestr) [inline]
-
-
-

function for noshowbase manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& noshowpoint (ios_basestr) [inline]
-
-
-

function for noshowpoint manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& noshowpos (ios_basestr) [inline]
-
-
-

function for noshowpos manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& noskipws (ios_basestr) [inline]
-
-
-

function for noskipws manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& nouppercase (ios_basestr) [inline]
-
-
-

function for nouppercase manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& oct (ios_basestr) [inline]
-
-
-

function for oct manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& right (ios_basestr) [inline]
-
-
-

function for right manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& showbase (ios_basestr) [inline]
-
-
-

function for showbase manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& showpoint (ios_basestr) [inline]
-
-
-

function for showpoint manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& showpos (ios_basestr) [inline]
-
-
-

function for showpos manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& skipws (ios_basestr) [inline]
-
-
-

function for skipws manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ios_base& uppercase (ios_basestr) [inline]
-
-
-

function for uppercase manipulator

-
Parameters:
- - -
[in]strThe stream
-
-
-
Returns:
The stream
- -
-
-
- - - diff --git a/libs/SdFatBeta20120108/html/ios_8h__dep__incl.png b/libs/SdFatBeta20120108/html/ios_8h__dep__incl.png deleted file mode 100755 index d9b1bff..0000000 Binary files a/libs/SdFatBeta20120108/html/ios_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/ios_8h__incl.png b/libs/SdFatBeta20120108/html/ios_8h__incl.png deleted file mode 100755 index 85a4b40..0000000 Binary files a/libs/SdFatBeta20120108/html/ios_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/iostream_8h.html b/libs/SdFatBeta20120108/html/iostream_8h.html deleted file mode 100755 index 3317397..0000000 --- a/libs/SdFatBeta20120108/html/iostream_8h.html +++ /dev/null @@ -1,386 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/iostream.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/iostream.h File Reference
-
-
- -

iostream class -More...

-
#include <istream.h>
-#include <ostream.h>
-
-Include dependency graph for iostream.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - - - - - - - - - - - - - - - - - -

-Classes

class  iostream
 Input/Output stream. More...
struct  setfill
 type for setfill manipulator More...
struct  setprecision
 type for setprecision manipulator More...
struct  setw
 type for setw manipulator More...

-Functions

ostreamendl (ostream &os)
ostreamflush (ostream &os)
ostreamoperator<< (ostream &os, const setfill &arg)
ostreamoperator<< (ostream &os, const setw &arg)
ostreamoperator<< (ostream &os, const setprecision &arg)
istreamoperator>> (istream &obj, const setfill &arg)
istreamoperator>> (istream &is, const setprecision &arg)
istreamoperator>> (istream &is, const setw &arg)
istreamws (istream &is)
-

Detailed Description

-

iostream class

-

Function Documentation

- -
-
- - - - - - - - -
ostream& endl (ostreamos) [inline]
-
-
-

insert endline

-
Parameters:
- - -
[in]osThe Stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - -
ostream& flush (ostreamos) [inline]
-
-
-

flush manipulator

-
Parameters:
- - -
[in]osThe stream
-
-
-
Returns:
The stream
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
ostream& operator<< (ostreamos,
const setfillarg 
) [inline]
-
-
-

setfill manipulator

-
Parameters:
- - - -
[in]osthe stream
[in]argset setfill object
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
ostream& operator<< (ostreamos,
const setwarg 
) [inline]
-
-
-

setw manipulator

-
Parameters:
- - - -
[in]osthe stream
[in]argset setw object
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
ostream& operator<< (ostreamos,
const setprecisionarg 
) [inline]
-
-
-

setprecision manipulator

-
Parameters:
- - - -
[in]osthe stream
[in]argset setprecision object
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream& operator>> (istreamobj,
const setfillarg 
) [inline]
-
-
-

setfill manipulator

-
Parameters:
- - - -
[in]objthe stream
[in]argset setfill object
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream& operator>> (istreamis,
const setprecisionarg 
) [inline]
-
-
-

setprecision manipulator

-
Parameters:
- - - -
[in]isthe stream
[in]argset setprecision object
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
istream& operator>> (istreamis,
const setwarg 
) [inline]
-
-
-

setw manipulator

-
Parameters:
- - - -
[in]isthe stream
[in]argset setw object
-
-
-
Returns:
the stream
- -
-
- -
-
- - - - - - - - -
istream& ws (istreamis) [inline]
-
-
-

Skip white space

-
Parameters:
- - -
[in]isthe Stream
-
-
-
Returns:
The stream
- -
-
-
- - - diff --git a/libs/SdFatBeta20120108/html/iostream_8h__dep__incl.png b/libs/SdFatBeta20120108/html/iostream_8h__dep__incl.png deleted file mode 100755 index ba82d4e..0000000 Binary files a/libs/SdFatBeta20120108/html/iostream_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/iostream_8h__incl.png b/libs/SdFatBeta20120108/html/iostream_8h__incl.png deleted file mode 100755 index 0ca6ab8..0000000 Binary files a/libs/SdFatBeta20120108/html/iostream_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/istream_8h.html b/libs/SdFatBeta20120108/html/istream_8h.html deleted file mode 100755 index 0990796..0000000 --- a/libs/SdFatBeta20120108/html/istream_8h.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/istream.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/istream.h File Reference
-
-
- -

istream class -More...

-
#include <ios.h>
-
-Include dependency graph for istream.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - -

-Classes

class  istream
 Input Stream. More...
-

Detailed Description

-

istream class

-
- - - diff --git a/libs/SdFatBeta20120108/html/istream_8h__dep__incl.png b/libs/SdFatBeta20120108/html/istream_8h__dep__incl.png deleted file mode 100755 index 6cda13b..0000000 Binary files a/libs/SdFatBeta20120108/html/istream_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/istream_8h__incl.png b/libs/SdFatBeta20120108/html/istream_8h__incl.png deleted file mode 100755 index 1c61485..0000000 Binary files a/libs/SdFatBeta20120108/html/istream_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/ostream_8h.html b/libs/SdFatBeta20120108/html/ostream_8h.html deleted file mode 100755 index 55a4213..0000000 --- a/libs/SdFatBeta20120108/html/ostream_8h.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - -SdFat: Arduino/libraries/SdFat/ostream.h File Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
Arduino/libraries/SdFat/ostream.h File Reference
-
-
- -

ostream class -More...

-
#include <ios.h>
-
-Include dependency graph for ostream.h:
-
-
- - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - -
-
- - - - - - - -

-Classes

class  ostream
 Output Stream. More...
struct  pgm
 type for string in flash More...

-Defines

#define pstr(str)   pgm(PSTR(str))
-

Detailed Description

-

ostream class

-

Define Documentation

- -
-
- - - - - - - - -
#define pstr( str)   pgm(PSTR(str))
-
-
-

macro for flash inserter

- -
-
-
- - - diff --git a/libs/SdFatBeta20120108/html/ostream_8h__dep__incl.png b/libs/SdFatBeta20120108/html/ostream_8h__dep__incl.png deleted file mode 100755 index 6ff6d1f..0000000 Binary files a/libs/SdFatBeta20120108/html/ostream_8h__dep__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/ostream_8h__incl.png b/libs/SdFatBeta20120108/html/ostream_8h__incl.png deleted file mode 100755 index ea54bdd..0000000 Binary files a/libs/SdFatBeta20120108/html/ostream_8h__incl.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/structdirectory_entry-members.html b/libs/SdFatBeta20120108/html/structdirectory_entry-members.html deleted file mode 100755 index cd535d6..0000000 --- a/libs/SdFatBeta20120108/html/structdirectory_entry-members.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
directoryEntry Member List
-
- - - - diff --git a/libs/SdFatBeta20120108/html/structdirectory_entry.html b/libs/SdFatBeta20120108/html/structdirectory_entry.html deleted file mode 100755 index d7bb9ce..0000000 --- a/libs/SdFatBeta20120108/html/structdirectory_entry.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - -SdFat: directoryEntry Struct Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
directoryEntry Struct Reference
-
-
- -

FAT short directory entry. - More...

- -

#include <SdFatStructs.h>

- -

List of all members.

- - - - - - - - - - - - - - -

-Public Attributes

uint8_t attributes
uint16_t creationDate
uint16_t creationTime
uint8_t creationTimeTenths
uint32_t fileSize
uint16_t firstClusterHigh
uint16_t firstClusterLow
uint16_t lastAccessDate
uint16_t lastWriteDate
uint16_t lastWriteTime
uint8_t name [11]
uint8_t reservedNT
-

Detailed Description

-

FAT short directory entry.

-

Short means short 8.3 name, not the entry size.

-

Date Format. A FAT directory entry date stamp is a 16-bit field that is basically a date relative to the MS-DOS epoch of 01/01/1980. Here is the format (bit 0 is the LSB of the 16-bit word, bit 15 is the MSB of the 16-bit word):

-

Bits 9-15: Count of years from 1980, valid value range 0-127 inclusive (1980-2107).

-

Bits 5-8: Month of year, 1 = January, valid value range 1-12 inclusive.

-

Bits 0-4: Day of month, valid value range 1-31 inclusive.

-

Time Format. A FAT directory entry time stamp is a 16-bit field that has a granularity of 2 seconds. Here is the format (bit 0 is the LSB of the 16-bit word, bit 15 is the MSB of the 16-bit word).

-

Bits 11-15: Hours, valid value range 0-23 inclusive.

-

Bits 5-10: Minutes, valid value range 0-59 inclusive.

-

Bits 0-4: 2-second count, valid value range 0-29 inclusive (0 - 58 seconds).

-

The valid time range is from Midnight 00:00:00 to 23:59:58.

-

Member Data Documentation

- -
-
- - - - -
uint8_t directoryEntry::attributes
-
-
-

Entry attributes.

-

The upper two bits of the attribute byte are reserved and should always be set to 0 when a file is created and never modified or looked at after that. See defines that begin with DIR_ATT_.

- -
-
- -
-
- - - - -
uint16_t directoryEntry::creationDate
-
-
-

Date file was created.

- -
-
- -
-
- - - - -
uint16_t directoryEntry::creationTime
-
-
-

Time file was created.

- -
-
- -
- -
-

The granularity of the seconds part of creationTime is 2 seconds so this field is a count of tenths of a second and its valid value range is 0-199 inclusive. (WHG note - seems to be hundredths)

- -
-
- -
-
- - - - -
uint32_t directoryEntry::fileSize
-
-
-

32-bit unsigned holding this file's size in bytes.

- -
-
- -
-
- - - - -
uint16_t directoryEntry::firstClusterHigh
-
-
-

High word of this entry's first cluster number (always 0 for a FAT12 or FAT16 volume).

- -
-
- -
-
- - - - -
uint16_t directoryEntry::firstClusterLow
-
-
-

Low word of this entry's first cluster number.

- -
-
- -
-
- - - - -
uint16_t directoryEntry::lastAccessDate
-
-
-

Last access date. Note that there is no last access time, only a date. This is the date of last read or write. In the case of a write, this should be set to the same date as lastWriteDate.

- -
-
- -
-
- - - - -
uint16_t directoryEntry::lastWriteDate
-
-
-

Date of last write. File creation is considered a write.

- -
-
- -
-
- - - - -
uint16_t directoryEntry::lastWriteTime
-
-
-

Time of last write. File creation is considered a write.

- -
-
- -
-
- - - - -
uint8_t directoryEntry::name[11]
-
-
-

Short 8.3 name.

-

The first eight bytes contain the file name with blank fill. The last three bytes contain the file extension with blank fill.

- -
-
- -
-
- - - - -
uint8_t directoryEntry::reservedNT
-
-
-

Reserved for use by Windows NT. Set value to 0 when a file is created and never modify or look at it after that.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/structfat32__boot-members.html b/libs/SdFatBeta20120108/html/structfat32__boot-members.html deleted file mode 100755 index 3139e82..0000000 --- a/libs/SdFatBeta20120108/html/structfat32__boot-members.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
fat32_boot Member List
-
- - - - diff --git a/libs/SdFatBeta20120108/html/structfat32__boot.html b/libs/SdFatBeta20120108/html/structfat32__boot.html deleted file mode 100755 index 5f010f1..0000000 --- a/libs/SdFatBeta20120108/html/structfat32__boot.html +++ /dev/null @@ -1,517 +0,0 @@ - - - - -SdFat: fat32_boot Struct Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
fat32_boot Struct Reference
-
-
- -

Boot sector for a FAT32 volume. - More...

- -

#include <SdFatStructs.h>

- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Attributes

uint8_t bootCode [420]
uint8_t bootSectorSig0
uint8_t bootSectorSig1
uint8_t bootSignature
uint16_t bytesPerSector
uint8_t driveNumber
uint16_t fat32BackBootBlock
uint16_t fat32Flags
uint16_t fat32FSInfo
uint8_t fat32Reserved [12]
uint32_t fat32RootCluster
uint16_t fat32Version
uint8_t fatCount
char fileSystemType [8]
uint16_t headCount
uint32_t hidddenSectors
uint8_t jump [3]
uint8_t mediaType
char oemId [8]
uint8_t reserved1
uint16_t reservedSectorCount
uint16_t rootDirEntryCount
uint8_t sectorsPerCluster
uint16_t sectorsPerFat16
uint32_t sectorsPerFat32
uint16_t sectorsPerTrack
uint16_t totalSectors16
uint32_t totalSectors32
char volumeLabel [11]
uint32_t volumeSerialNumber
-

Detailed Description

-

Boot sector for a FAT32 volume.

-

Member Data Documentation

- -
-
- - - - -
uint8_t fat32_boot::bootCode[420]
-
-
-

X86 boot code

- -
-
- -
-
- - - - -
uint8_t fat32_boot::bootSectorSig0
-
-
-

must be 0X55

- -
-
- -
-
- - - - -
uint8_t fat32_boot::bootSectorSig1
-
-
-

must be 0XAA

- -
-
- -
-
- - - - -
uint8_t fat32_boot::bootSignature
-
-
-

0X29 if next three fields are valid

- -
-
- -
-
- - - - -
uint16_t fat32_boot::bytesPerSector
-
-
-

The size of a hardware sector. Valid decimal values for this field are 512, 1024, 2048, and 4096. For most disks used in the United States, the value of this field is 512.

- -
-
- -
-
- - - - -
uint8_t fat32_boot::driveNumber
-
-
-

Related to the BIOS physical drive number. Floppy drives are identified as 0x00 and physical hard disks are identified as 0x80, regardless of the number of physical disk drives. Typically, this value is set prior to issuing an INT 13h BIOS call to specify the device to access. The value is only relevant if the device is a boot device.

- -
-
- -
-
- - - - -
uint16_t fat32_boot::fat32BackBootBlock
-
-
-

If nonzero, indicates the sector number in the reserved area of the volume of a copy of the boot record. Usually 6. No value other than 6 is recommended.

- -
-
- -
-
- - - - -
uint16_t fat32_boot::fat32Flags
-
-
-

This field is only defined for FAT32 media and does not exist on FAT12 and FAT16 media. Bits 0-3 -- Zero-based number of active FAT. Only valid if mirroring is disabled. Bits 4-6 -- Reserved. Bit 7 -- 0 means the FAT is mirrored at runtime into all FATs. -- 1 means only one FAT is active; it is the one referenced in bits 0-3. Bits 8-15 -- Reserved.

- -
-
- -
-
- - - - -
uint16_t fat32_boot::fat32FSInfo
-
-
-

Sector number of FSINFO structure in the reserved area of the FAT32 volume. Usually 1.

- -
-
- -
-
- - - - -
uint8_t fat32_boot::fat32Reserved[12]
-
-
-

Reserved for future expansion. Code that formats FAT32 volumes should always set all of the bytes of this field to 0.

- -
-
- -
-
- - - - -
uint32_t fat32_boot::fat32RootCluster
-
-
-

Cluster number of the first cluster of the root directory for FAT32. This usually 2 but not required to be 2.

- -
-
- -
-
- - - - -
uint16_t fat32_boot::fat32Version
-
-
-

FAT32 version. High byte is major revision number. Low byte is minor revision number. Only 0.0 define.

- -
-
- -
-
- - - - -
uint8_t fat32_boot::fatCount
-
-
-

The number of copies of the FAT on the volume. The value of this field is always 2.

- -
-
- -
-
- - - - -
char fat32_boot::fileSystemType[8]
-
-
-

A text field with a value of FAT32.

- -
-
- -
-
- - - - -
uint16_t fat32_boot::headCount
-
-
-

Number of heads for interrupt 0x13. Not used otherwise.

- -
-
- -
-
- - - - -
uint32_t fat32_boot::hidddenSectors
-
-
-

Count of hidden sectors preceding the partition that contains this FAT volume. This field is generally only relevant for media visible on interrupt 0x13.

- -
-
- -
-
- - - - -
uint8_t fat32_boot::jump[3]
-
-
-

The first three bytes of the boot sector must be valid, executable x 86-based CPU instructions. This includes a jump instruction that skips the next nonexecutable bytes.

- -
-
- -
-
- - - - -
uint8_t fat32_boot::mediaType
-
-
-

This dates back to the old MS-DOS 1.x media determination and is no longer usually used for anything. 0xF8 is the standard value for fixed (nonremovable) media. For removable media, 0xF0 is frequently used. Legal values are 0xF0 or 0xF8-0xFF.

- -
-
- -
-
- - - - -
char fat32_boot::oemId[8]
-
-
-

This is typically a string of characters that identifies the operating system that formatted the volume.

- -
-
- -
-
- - - - -
uint8_t fat32_boot::reserved1
-
-
-

used by Windows NT - should be zero for FAT

- -
-
- -
-
- - - - -
uint16_t fat32_boot::reservedSectorCount
-
-
-

The number of sectors preceding the start of the first FAT, including the boot sector. Must not be zero

- -
-
- -
-
- - - - -
uint16_t fat32_boot::rootDirEntryCount
-
-
-

FAT12/FAT16 only. For FAT32 volumes, this field must be set to 0.

- -
-
- -
-
- - - - -
uint8_t fat32_boot::sectorsPerCluster
-
-
-

Number of sectors per allocation unit. This value must be a power of 2 that is greater than 0. The legal values are 1, 2, 4, 8, 16, 32, 64, and 128. 128 should be avoided.

- -
-
- -
-
- - - - -
uint16_t fat32_boot::sectorsPerFat16
-
-
-

On FAT32 volumes this field must be 0, and sectorsPerFat32 contains the FAT size count.

- -
-
- -
-
- - - - -
uint32_t fat32_boot::sectorsPerFat32
-
-
-

Count of sectors occupied by one FAT on FAT32 volumes.

- -
-
- -
-
- - - - -
uint16_t fat32_boot::sectorsPerTrack
-
-
-

Sectors per track for interrupt 0x13. Not used otherwise.

- -
-
- -
-
- - - - -
uint16_t fat32_boot::totalSectors16
-
-
-

For FAT32 volumes, this field must be 0.

- -
-
- -
-
- - - - -
uint32_t fat32_boot::totalSectors32
-
-
-

Contains the total number of sectors in the FAT32 volume.

- -
-
- -
-
- - - - -
char fat32_boot::volumeLabel[11]
-
-
-

A field once used to store the volume label. The volume label is now stored as a special file in the root directory.

- -
-
- -
-
- - - - -
uint32_t fat32_boot::volumeSerialNumber
-
-
-

A random serial number created when formatting a disk, which helps to distinguish between disks. Usually generated by combining date and time.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/structfat32__fsinfo-members.html b/libs/SdFatBeta20120108/html/structfat32__fsinfo-members.html deleted file mode 100755 index c894795..0000000 --- a/libs/SdFatBeta20120108/html/structfat32__fsinfo-members.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
fat32_fsinfo Member List
-
- - - - diff --git a/libs/SdFatBeta20120108/html/structfat32__fsinfo.html b/libs/SdFatBeta20120108/html/structfat32__fsinfo.html deleted file mode 100755 index 8849cad..0000000 --- a/libs/SdFatBeta20120108/html/structfat32__fsinfo.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - -SdFat: fat32_fsinfo Struct Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
fat32_fsinfo Struct Reference
-
-
- -

FSINFO sector for a FAT32 volume. - More...

- -

#include <SdFatStructs.h>

- -

List of all members.

- - - - - - - - - -

-Public Attributes

uint32_t freeCount
uint32_t leadSignature
uint32_t nextFree
uint8_t reserved1 [480]
uint8_t reserved2 [12]
uint32_t structSignature
uint8_t tailSignature [4]
-

Detailed Description

-

FSINFO sector for a FAT32 volume.

-

Member Data Documentation

- -
-
- - - - -
uint32_t fat32_fsinfo::freeCount
-
-
-

Contains the last known free cluster count on the volume. If the value is 0xFFFFFFFF, then the free count is unknown and must be computed. Any other value can be used, but is not necessarily correct. It should be range checked at least to make sure it is <= volume cluster count.

- -
-
- -
-
- - - - -
uint32_t fat32_fsinfo::leadSignature
-
-
-

must be 0X52, 0X52, 0X61, 0X41

- -
-
- -
-
- - - - -
uint32_t fat32_fsinfo::nextFree
-
-
-

This is a hint for the FAT driver. It indicates the cluster number at which the driver should start looking for free clusters. If the value is 0xFFFFFFFF, then there is no hint and the driver should start looking at cluster 2.

- -
-
- -
-
- - - - -
uint8_t fat32_fsinfo::reserved1[480]
-
-
-

must be zero

- -
-
- -
-
- - - - -
uint8_t fat32_fsinfo::reserved2[12]
-
-
-

must be zero

- -
-
- -
-
- - - - -
uint32_t fat32_fsinfo::structSignature
-
-
-

must be 0X72, 0X72, 0X41, 0X61

- -
-
- -
-
- - - - -
uint8_t fat32_fsinfo::tailSignature[4]
-
-
-

must be 0X00, 0X00, 0X55, 0XAA

- -
-
-
The documentation for this struct was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/structfat__boot-members.html b/libs/SdFatBeta20120108/html/structfat__boot-members.html deleted file mode 100755 index 570cbbd..0000000 --- a/libs/SdFatBeta20120108/html/structfat__boot-members.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
fat_boot Member List
-
- - - - diff --git a/libs/SdFatBeta20120108/html/structfat__boot.html b/libs/SdFatBeta20120108/html/structfat__boot.html deleted file mode 100755 index b5dd917..0000000 --- a/libs/SdFatBeta20120108/html/structfat__boot.html +++ /dev/null @@ -1,412 +0,0 @@ - - - - -SdFat: fat_boot Struct Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
fat_boot Struct Reference
-
-
- -

Boot sector for a FAT12/FAT16 volume. - More...

- -

#include <SdFatStructs.h>

- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Attributes

uint8_t bootCode [448]
uint8_t bootSectorSig0
uint8_t bootSectorSig1
uint8_t bootSignature
uint16_t bytesPerSector
uint8_t driveNumber
uint8_t fatCount
char fileSystemType [8]
uint16_t headCount
uint32_t hidddenSectors
uint8_t jump [3]
uint8_t mediaType
char oemId [8]
uint8_t reserved1
uint16_t reservedSectorCount
uint16_t rootDirEntryCount
uint8_t sectorsPerCluster
uint16_t sectorsPerFat16
uint16_t sectorsPerTrack
uint16_t totalSectors16
uint32_t totalSectors32
char volumeLabel [11]
uint32_t volumeSerialNumber
-

Detailed Description

-

Boot sector for a FAT12/FAT16 volume.

-

Member Data Documentation

- -
-
- - - - -
uint8_t fat_boot::bootCode[448]
-
-
-

X86 boot code

- -
-
- -
-
- - - - -
uint8_t fat_boot::bootSectorSig0
-
-
-

must be 0X55

- -
-
- -
-
- - - - -
uint8_t fat_boot::bootSectorSig1
-
-
-

must be 0XAA

- -
-
- -
-
- - - - -
uint8_t fat_boot::bootSignature
-
-
-

0X29 if next three fields are valid

- -
-
- -
-
- - - - -
uint16_t fat_boot::bytesPerSector
-
-
-

The size of a hardware sector. Valid decimal values for this field are 512, 1024, 2048, and 4096. For most disks used in the United States, the value of this field is 512.

- -
-
- -
-
- - - - -
uint8_t fat_boot::driveNumber
-
-
-

Related to the BIOS physical drive number. Floppy drives are identified as 0x00 and physical hard disks are identified as 0x80, regardless of the number of physical disk drives. Typically, this value is set prior to issuing an INT 13h BIOS call to specify the device to access. The value is only relevant if the device is a boot device.

- -
-
- -
-
- - - - -
uint8_t fat_boot::fatCount
-
-
-

The number of copies of the FAT on the volume. The value of this field is always 2.

- -
-
- -
-
- - - - -
char fat_boot::fileSystemType[8]
-
-
-

A field with a value of either FAT, FAT12 or FAT16, depending on the disk format.

- -
-
- -
-
- - - - -
uint16_t fat_boot::headCount
-
-
-

Number of heads for interrupt 0x13. Not used otherwise.

- -
-
- -
-
- - - - -
uint32_t fat_boot::hidddenSectors
-
-
-

Count of hidden sectors preceding the partition that contains this FAT volume. This field is generally only relevant for media visible on interrupt 0x13.

- -
-
- -
-
- - - - -
uint8_t fat_boot::jump[3]
-
-
-

The first three bytes of the boot sector must be valid, executable x 86-based CPU instructions. This includes a jump instruction that skips the next nonexecutable bytes.

- -
-
- -
-
- - - - -
uint8_t fat_boot::mediaType
-
-
-

This dates back to the old MS-DOS 1.x media determination and is no longer usually used for anything. 0xF8 is the standard value for fixed (nonremovable) media. For removable media, 0xF0 is frequently used. Legal values are 0xF0 or 0xF8-0xFF.

- -
-
- -
-
- - - - -
char fat_boot::oemId[8]
-
-
-

This is typically a string of characters that identifies the operating system that formatted the volume.

- -
-
- -
-
- - - - -
uint8_t fat_boot::reserved1
-
-
-

used by Windows NT - should be zero for FAT

- -
-
- -
-
- - - - -
uint16_t fat_boot::reservedSectorCount
-
-
-

The number of sectors preceding the start of the first FAT, including the boot sector. The value of this field is always 1.

- -
-
- -
-
- - - - -
uint16_t fat_boot::rootDirEntryCount
-
-
-

For FAT12 and FAT16 volumes, this field contains the count of 32-byte directory entries in the root directory. For FAT32 volumes, this field must be set to 0. For FAT12 and FAT16 volumes, this value should always specify a count that when multiplied by 32 results in a multiple of bytesPerSector. FAT16 volumes should use the value 512.

- -
-
- -
-
- - - - -
uint8_t fat_boot::sectorsPerCluster
-
-
-

Number of sectors per allocation unit. This value must be a power of 2 that is greater than 0. The legal values are 1, 2, 4, 8, 16, 32, 64, and 128. 128 should be avoided.

- -
-
- -
-
- - - - -
uint16_t fat_boot::sectorsPerFat16
-
-
-

Count of sectors occupied by one FAT on FAT12/FAT16 volumes. On FAT32 volumes this field must be 0, and sectorsPerFat32 contains the FAT size count.

- -
-
- -
-
- - - - -
uint16_t fat_boot::sectorsPerTrack
-
-
-

Sectors per track for interrupt 0x13. Not used otherwise.

- -
-
- -
-
- - - - -
uint16_t fat_boot::totalSectors16
-
-
-

This field is the old 16-bit total count of sectors on the volume. This count includes the count of all sectors in all four regions of the volume. This field can be 0; if it is 0, then totalSectors32 must be nonzero. For FAT32 volumes, this field must be 0. For FAT12 and FAT16 volumes, this field contains the sector count, and totalSectors32 is 0 if the total sector count fits (is less than 0x10000).

- -
-
- -
-
- - - - -
uint32_t fat_boot::totalSectors32
-
-
-

This field is the new 32-bit total count of sectors on the volume. This count includes the count of all sectors in all four regions of the volume. This field can be 0; if it is 0, then totalSectors16 must be nonzero.

- -
-
- -
-
- - - - -
char fat_boot::volumeLabel[11]
-
-
-

A field once used to store the volume label. The volume label is now stored as a special file in the root directory.

- -
-
- -
-
- - - - -
uint32_t fat_boot::volumeSerialNumber
-
-
-

A random serial number created when formatting a disk, which helps to distinguish between disks. Usually generated by combining date and time.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/structfpos__t-members.html b/libs/SdFatBeta20120108/html/structfpos__t-members.html deleted file mode 100755 index 3558bc9..0000000 --- a/libs/SdFatBeta20120108/html/structfpos__t-members.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
fpos_t Member List
-
-
-This is the complete list of members for fpos_t, including all inherited members. - - - -
clusterfpos_t
fpos_t() (defined in fpos_t)fpos_t [inline]
positionfpos_t
- - - diff --git a/libs/SdFatBeta20120108/html/structfpos__t.html b/libs/SdFatBeta20120108/html/structfpos__t.html deleted file mode 100755 index 589cd52..0000000 --- a/libs/SdFatBeta20120108/html/structfpos__t.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - -SdFat: fpos_t Struct Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
fpos_t Struct Reference
-
-
- -

internal type for istream do not use in user apps - More...

- -

#include <SdBaseFile.h>

- -

List of all members.

- - - - -

-Public Attributes

uint32_t cluster
uint32_t position
-

Detailed Description

-

internal type for istream do not use in user apps

-

Member Data Documentation

- -
-
- - - - -
uint32_t fpos_t::cluster
-
-
-

cluster for position

- -
-
- -
-
- - - - -
uint32_t fpos_t::position
-
-
-

stream position

- -
-
-
The documentation for this struct was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/structmaster_boot_record-members.html b/libs/SdFatBeta20120108/html/structmaster_boot_record-members.html deleted file mode 100755 index 50acd69..0000000 --- a/libs/SdFatBeta20120108/html/structmaster_boot_record-members.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
masterBootRecord Member List
-
- - - - diff --git a/libs/SdFatBeta20120108/html/structmaster_boot_record.html b/libs/SdFatBeta20120108/html/structmaster_boot_record.html deleted file mode 100755 index a727d18..0000000 --- a/libs/SdFatBeta20120108/html/structmaster_boot_record.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - -SdFat: masterBootRecord Struct Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
masterBootRecord Struct Reference
-
-
- -

Master Boot Record. - More...

- -

#include <SdFatStructs.h>

-
-Collaboration diagram for masterBootRecord:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - -

-Public Attributes

uint8_t codeArea [440]
uint32_t diskSignature
uint8_t mbrSig0
uint8_t mbrSig1
part_t part [4]
uint16_t usuallyZero
-

Detailed Description

-

Master Boot Record.

-

The first block of a storage device that is formatted with a MBR.

-

Member Data Documentation

- -
-
- - - - -
uint8_t masterBootRecord::codeArea[440]
-
-
-

Code Area for master boot program.

- -
-
- -
-
- - - - -
uint32_t masterBootRecord::diskSignature
-
-
-

Optional Windows NT disk signature. May contain boot code.

- -
-
- -
-
- - - - -
uint8_t masterBootRecord::mbrSig0
-
-
-

First MBR signature byte. Must be 0X55

- -
-
- -
-
- - - - -
uint8_t masterBootRecord::mbrSig1
-
-
-

Second MBR signature byte. Must be 0XAA

- -
-
- -
- -
-

Partition tables.

- -
-
- -
-
- - - - -
uint16_t masterBootRecord::usuallyZero
-
-
-

Usually zero but may be more boot code.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/structmaster_boot_record__coll__graph.png b/libs/SdFatBeta20120108/html/structmaster_boot_record__coll__graph.png deleted file mode 100755 index df5013f..0000000 Binary files a/libs/SdFatBeta20120108/html/structmaster_boot_record__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/html/structpartition_table-members.html b/libs/SdFatBeta20120108/html/structpartition_table-members.html deleted file mode 100755 index 539c7ab..0000000 --- a/libs/SdFatBeta20120108/html/structpartition_table-members.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
partitionTable Member List
-
- - - - diff --git a/libs/SdFatBeta20120108/html/structpartition_table.html b/libs/SdFatBeta20120108/html/structpartition_table.html deleted file mode 100755 index 75c0778..0000000 --- a/libs/SdFatBeta20120108/html/structpartition_table.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - -SdFat: partitionTable Struct Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
partitionTable Struct Reference
-
-
- -

MBR partition table entry. - More...

- -

#include <SdFatStructs.h>

- -

List of all members.

- - - - - - - - - - - - - - -

-Public Attributes

unsigned beginCylinderHigh: 2
uint8_t beginCylinderLow
uint8_t beginHead
unsigned beginSector: 6
uint8_t boot
unsigned endCylinderHigh: 2
uint8_t endCylinderLow
uint8_t endHead
unsigned endSector: 6
uint32_t firstSector
uint32_t totalSectors
uint8_t type
-

Detailed Description

-

MBR partition table entry.

-

A partition table entry for a MBR formatted storage device. The MBR partition table has four entries.

-

Member Data Documentation

- -
-
- - - - -
unsigned partitionTable::beginCylinderHigh
-
-
-

High bits cylinder for first block in partition.

- -
-
- -
- -
-

Combine beginCylinderLow with beginCylinderHigh. Legal values are 0-1023. Only used in old PC BIOS.

- -
-
- -
-
- - - - -
uint8_t partitionTable::beginHead
-
-
-

Head part of Cylinder-head-sector address of the first block in the partition. Legal values are 0-255. Only used in old PC BIOS.

- -
-
- -
-
- - - - -
unsigned partitionTable::beginSector
-
-
-

Sector part of Cylinder-head-sector address of the first block in the partition. Legal values are 1-63. Only used in old PC BIOS.

- -
-
- -
-
- - - - -
uint8_t partitionTable::boot
-
-
-

Boot Indicator . Indicates whether the volume is the active partition. Legal values include: 0X00. Do not use for booting. 0X80 Active partition.

- -
-
- -
-
- - - - -
unsigned partitionTable::endCylinderHigh
-
-
-

High bits of end cylinder

- -
-
- -
-
- - - - -
uint8_t partitionTable::endCylinderLow
-
-
-

Combine endCylinderLow with endCylinderHigh. Legal values are 0-1023. Only used in old PC BIOS.

- -
-
- -
-
- - - - -
uint8_t partitionTable::endHead
-
-
-

head part of cylinder-head-sector address of the last sector in the partition. Legal values are 0-255. Only used in old PC BIOS.

- -
-
- -
-
- - - - -
unsigned partitionTable::endSector
-
-
-

Sector part of cylinder-head-sector address of the last sector in the partition. Legal values are 1-63. Only used in old PC BIOS.

- -
-
- -
-
- - - - -
uint32_t partitionTable::firstSector
-
-
-

Logical block address of the first block in the partition.

- -
-
- -
-
- - - - -
uint32_t partitionTable::totalSectors
-
-
-

Length of the partition, in blocks.

- -
-
- -
-
- - - - -
uint8_t partitionTable::type
-
-
-

Partition type. See defines that begin with PART_TYPE_ for some Microsoft partition types.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/structpgm-members.html b/libs/SdFatBeta20120108/html/structpgm-members.html deleted file mode 100755 index 37d9801..0000000 --- a/libs/SdFatBeta20120108/html/structpgm-members.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
pgm Member List
-
-
-This is the complete list of members for pgm, including all inherited members. - - - -
pgm(char *str)pgm [inline, explicit]
pgm(const char *str)pgm [inline, explicit]
ptrpgm
- - - diff --git a/libs/SdFatBeta20120108/html/structpgm.html b/libs/SdFatBeta20120108/html/structpgm.html deleted file mode 100755 index 4b2831c..0000000 --- a/libs/SdFatBeta20120108/html/structpgm.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - -SdFat: pgm Struct Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
pgm Struct Reference
-
-
- -

type for string in flash - More...

- -

#include <ostream.h>

- -

List of all members.

- - - - - - -

-Public Member Functions

 pgm (char *str)
 pgm (const char *str)

-Public Attributes

char * ptr
-

Detailed Description

-

type for string in flash

-

Constructor & Destructor Documentation

- -
-
- - - - - - - - -
pgm::pgm (char * str) [inline, explicit]
-
-
-

constructor

-
Parameters:
- - -
[in]strinitializer for pointer.
-
-
- -
-
- -
-
- - - - - - - - -
pgm::pgm (const char * str) [inline, explicit]
-
-
-

constructor

-
Parameters:
- - -
[in]strinitializer for pointer.
-
-
- -
-
-

Member Data Documentation

- -
-
- - - - -
char* pgm::ptr
-
-
-

Pointer to flash string

- -
-
-
The documentation for this struct was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/structsetfill-members.html b/libs/SdFatBeta20120108/html/structsetfill-members.html deleted file mode 100755 index b3dd230..0000000 --- a/libs/SdFatBeta20120108/html/structsetfill-members.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
setfill Member List
-
-
-This is the complete list of members for setfill, including all inherited members. - - -
csetfill
setfill(char arg)setfill [inline, explicit]
- - - diff --git a/libs/SdFatBeta20120108/html/structsetfill.html b/libs/SdFatBeta20120108/html/structsetfill.html deleted file mode 100755 index 3cc5a09..0000000 --- a/libs/SdFatBeta20120108/html/structsetfill.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - -SdFat: setfill Struct Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
setfill Struct Reference
-
-
- -

type for setfill manipulator - More...

- -

#include <iostream.h>

- -

List of all members.

- - - - - -

-Public Member Functions

 setfill (char arg)

-Public Attributes

char c
-

Detailed Description

-

type for setfill manipulator

-

Constructor & Destructor Documentation

- -
-
- - - - - - - - -
setfill::setfill (char arg) [inline, explicit]
-
-
-

constructor

-
Parameters:
- - -
[in]argnew fill character
-
-
- -
-
-

Member Data Documentation

- -
-
- - - - -
char setfill::c
-
-
-

fill character

- -
-
-
The documentation for this struct was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/structsetprecision-members.html b/libs/SdFatBeta20120108/html/structsetprecision-members.html deleted file mode 100755 index 1b6caec..0000000 --- a/libs/SdFatBeta20120108/html/structsetprecision-members.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
setprecision Member List
-
-
-This is the complete list of members for setprecision, including all inherited members. - - -
psetprecision
setprecision(unsigned int arg)setprecision [inline, explicit]
- - - diff --git a/libs/SdFatBeta20120108/html/structsetprecision.html b/libs/SdFatBeta20120108/html/structsetprecision.html deleted file mode 100755 index e256923..0000000 --- a/libs/SdFatBeta20120108/html/structsetprecision.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - -SdFat: setprecision Struct Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
setprecision Struct Reference
-
-
- -

type for setprecision manipulator - More...

- -

#include <iostream.h>

- -

List of all members.

- - - - - -

-Public Member Functions

 setprecision (unsigned int arg)

-Public Attributes

unsigned int p
-

Detailed Description

-

type for setprecision manipulator

-

Constructor & Destructor Documentation

- -
-
- - - - - - - - -
setprecision::setprecision (unsigned int arg) [inline, explicit]
-
-
-

constructor

-
Parameters:
- - -
[in]argnew precision
-
-
- -
-
-

Member Data Documentation

- -
-
- - - - -
unsigned int setprecision::p
-
-
-

precision

- -
-
-
The documentation for this struct was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/structsetw-members.html b/libs/SdFatBeta20120108/html/structsetw-members.html deleted file mode 100755 index e039e7d..0000000 --- a/libs/SdFatBeta20120108/html/structsetw-members.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
setw Member List
-
-
-This is the complete list of members for setw, including all inherited members. - - -
setw(unsigned arg)setw [inline, explicit]
wsetw
- - - diff --git a/libs/SdFatBeta20120108/html/structsetw.html b/libs/SdFatBeta20120108/html/structsetw.html deleted file mode 100755 index d52831f..0000000 --- a/libs/SdFatBeta20120108/html/structsetw.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - -SdFat: setw Struct Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
setw Struct Reference
-
-
- -

type for setw manipulator - More...

- -

#include <iostream.h>

- -

List of all members.

- - - - - -

-Public Member Functions

 setw (unsigned arg)

-Public Attributes

unsigned w
-

Detailed Description

-

type for setw manipulator

-

Constructor & Destructor Documentation

- -
-
- - - - - - - - -
setw::setw (unsigned arg) [inline, explicit]
-
-
-

constructor

-
Parameters:
- - -
[in]argnew width
-
-
- -
-
-

Member Data Documentation

- -
-
- - - - -
unsigned setw::w
-
-
-

width

- -
-
-
The documentation for this struct was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/unioncache__t-members.html b/libs/SdFatBeta20120108/html/unioncache__t-members.html deleted file mode 100755 index 3536d95..0000000 --- a/libs/SdFatBeta20120108/html/unioncache__t-members.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - -SdFat: Member List - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
-
-
cache_t Member List
-
-
-This is the complete list of members for cache_t, including all inherited members. - - - - - - - - -
datacache_t
dircache_t
fat16cache_t
fat32cache_t
fbscache_t
fbs32cache_t
fsinfocache_t
mbrcache_t
- - - diff --git a/libs/SdFatBeta20120108/html/unioncache__t.html b/libs/SdFatBeta20120108/html/unioncache__t.html deleted file mode 100755 index 4e2b4fc..0000000 --- a/libs/SdFatBeta20120108/html/unioncache__t.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - -SdFat: cache_t Union Reference - - - - - -
-
- - - - - - -
-
SdFat
-
-
- - -
-
- -
-
cache_t Union Reference
-
-
- -

Cache for an SD data block. - More...

- -

#include <SdVolume.h>

-
-Collaboration diagram for cache_t:
-
-
Collaboration graph
- - -
[legend]
- -

List of all members.

- - - - - - - - - - -

-Public Attributes

uint8_t data [512]
dir_t dir [16]
uint16_t fat16 [256]
uint32_t fat32 [128]
fat_boot_t fbs
fat32_boot_t fbs32
fat32_fsinfo_t fsinfo
mbr_t mbr
-

Detailed Description

-

Cache for an SD data block.

-

Member Data Documentation

- -
-
- - - - -
uint8_t cache_t::data[512]
-
-
-

Used to access cached file data blocks.

- -
-
- -
-
- - - - -
dir_t cache_t::dir[16]
-
-
-

Used to access cached directory entries.

- -
-
- -
-
- - - - -
uint16_t cache_t::fat16[256]
-
-
-

Used to access cached FAT16 entries.

- -
-
- -
-
- - - - -
uint32_t cache_t::fat32[128]
-
-
-

Used to access cached FAT32 entries.

- -
-
- -
- -
-

Used to access to a cached FAT boot sector.

- -
-
- -
- -
-

Used to access to a cached FAT32 boot sector.

- -
-
- -
- -
-

Used to access to a cached FAT32 FSINFO sector.

- -
-
- -
-
- - - - -
mbr_t cache_t::mbr
-
-
-

Used to access a cached Master Boot Record.

- -
-
-
The documentation for this union was generated from the following file: -
- - - diff --git a/libs/SdFatBeta20120108/html/unioncache__t__coll__graph.png b/libs/SdFatBeta20120108/html/unioncache__t__coll__graph.png deleted file mode 100755 index ed15385..0000000 Binary files a/libs/SdFatBeta20120108/html/unioncache__t__coll__graph.png and /dev/null differ diff --git a/libs/SdFatBeta20120108/readme.txt b/libs/SdFatBeta20120108/readme.txt deleted file mode 100755 index 9d03a65..0000000 --- a/libs/SdFatBeta20120108/readme.txt +++ /dev/null @@ -1,170 +0,0 @@ -For those who don't like too much documentation read QuickStart.txt. - -The Arduino SdFat library provides read/write access to FAT16/FAT32 -file systems on SD/SDHC flash cards. - -To use this library place the SdFat folder into the libraries -subfolder in your main sketches folder. You may need to create -the libraries folder. Restart the Arduino IDE if it was open. - -SdFat assumes chip select for the SD card is the hardware SS pin. On a -168/328 Arduino this is pin 10 and on a Mega this is pin 53. If you are -using another pin for chip select you will need call -SdFat::init(sckRateID, chipSelectPin) with second parameter set to the -chip select pin. - -If you have a shield like the SparkFun shield that uses pin 8 for chip -select you would change the line: - sd.init(SPI_HALF_SPEED); -to - sd.init(SPI_HALF_SPEED, 8); - -If the example uses - sd.init(); -change it to: - sd.init(SPI_FULL_SPEED, 8); - - -You can also edit Sd2Card.h and change the default value for chip select. -Replace SS_PIN with the new value for chip select in the following definition. - -/** The default chip select pin for the SD card is SS. */ -uint8_t const SD_CHIP_SELECT_PIN = SS_PIN; - - -If you wish to report bugs or have comments, send email to -fat16lib@sbcglobal.net - -Read changes.txt if you have used previous releases of this library. - -Read troubleshooting.txt for common hardware problems. - -Please read the html documentation for this library. Start with -html/index.html and read the Main Page. Next go to the Classes tab and -read the documentation for the classes SdFat, SdFile, ifstream, ofstream. - -The SdFile class implements binary files simular to Linux's stdio. - -The new classes ifstream, ofstream, istream, and ostream follow the -C++ iostream standard when possible. - -Many examples are included in the SdFat/examples folder. - -There are many tutorials and much documentation about using C++ iostreams. - -http://www.cplusplus.com/ is a good C++ site. - -Arduinos access SD cards using the cards SPI protocol. PCs, Macs, and -most consumer devices use the 4-bit parallel SD protocol. A card that -functions well on A PC or Mac may not work well on the Arduino. - -Most cards have good SPI read performance but cards vary widely in SPI -write performance. Write performance is limited by how efficiently the -card manages internal erase/remapping operations. The Arduino cannot -optimize writes to reduce erase operations because of its limited RAM. - -SanDisk cards generally have good write performance. They seem to have -more internal RAM buffering than other cards and therefore can limit -the number of flash erase operations that the Arduino forces due to its -limited RAM. - - -The hardware interface to the SD card should not use a resistor based -level shifter. SdFat sets the SPI bus frequency to 8 MHz which results -in signal rise times that are too slow for the edge detectors in many -newer SD card controllers when resistor voltage dividers are used. - -The 5 to 3.3 V level shifter for 5 V arduinos should be IC based like -the 74HC4050N based circuit shown in the file SdLevel.png. The -Adafruit Wave Shield uses a 74AHC125N. Gravitech sells SD and MicroSD -Card Adapters based on the 74LCX245. - -If you are using a resistor based level shifter and are having problems -try setting the SPI bus frequency to 4 MHz. This can be done by using -card.init(SPI_HALF_SPEED) to initialize the SD card. - -A feature to use software SPI is available. Software SPI is slower -than hardware SPI but allows any digital pins to be used. See -SdFatConfig.h for software SPI definitions. - -An unmodified Adafruit GPS shield can be use on an Arduino Mega -by defining MEGA_SOFT_SPI in SdFatConfig.h. - - -This library was designed to be used on 328 Arduinos but smaller -applications can be written for 168 Arduinos. This library compiles -for the Mega Arduino but has not been thoroughly tested. - -For the AtMega168 be sure to reduce the serial buffer size by setting -RX_BUFFER_SIZE to 32 or less in -hardware/cores/arduino/HardwareSerial.cpp. -I use 16. - - -The best way to restore an SD card's format is to use SDFormatter -which can be downloaded from: - -http://www.sdcard.org/consumers/formatter/ - -SDFormatter aligns flash erase boundaries with file -system structures which reduces write latency and file system overhead. - -SDFormatter does not have an option for FAT type so it may format -small cards as FAT12. - -The example sketch SdFatFormatter.pde will format smaller cards FAT16 -so they can be used with SdFat. - - -The SdFat/examples directory has the following sketches. Older examples -are in the extras/examplesV1 folder. - -AnalogLogger.pde - A simple data logger for one or more analog pins. - -append.pde - This sketch creates a large file by successive - open/write/close operations. - -average.pde - A demonstration of parsing floating point numbers - -bench.pde - A read/write benchmark. - -bufstream.pde - ibufsteam to parse a line and obufstream to format a line - -cin_cout.pde - Demo of ArduinoInStream and ArduinoOutStream - -eventlog.pde - Append a line to a file - demo of pathnames and streams - -fgets.pde - Demo of the fgets read line/string function. - -format.pde - Print a table with various formatting options - -getline.pde - Example of getline from section 27.7.1.3 of the C++ standard - -HelloWorld.pde - Create a serial output stream - -OpenNext.pde - Open all files in the root dir and print their filename - -QuickStart.pde - A sketch to quickly test your SD card and SD shield/module - -readCSV.pde - Read a comma-seperated value file using iostream extractors - -readlog.pde - Read file. Demo of pathnames and current working directory - -ReadWriteSdFat.pde - SdFat version of Arduino SD ReadWrite example - -rename.pde - A demo of SdFat::rename(old, new) and SdFile::rename(dirFile, newPath) - -SdFormatter - This sketch will format an SD or SDHC card. - -SdInfo - Initialize an SD card and analyze its structure for trouble shooting - -TwoCards.pde - Example using two SD cards - -To access these examples from the Arduino development environment -go to: File -> Examples -> SdFat -> - -Compile, upload to your Arduino and click on Serial Monitor to run -the example. - - -Updated 01 Aug 2011 diff --git a/libs/SerialPort-master/.gitattributes b/libs/SerialPort-master/.gitattributes new file mode 100755 index 0000000..412eeda --- /dev/null +++ b/libs/SerialPort-master/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/libs/SerialPort-master/.gitignore b/libs/SerialPort-master/.gitignore new file mode 100755 index 0000000..b9d6bd9 --- /dev/null +++ b/libs/SerialPort-master/.gitignore @@ -0,0 +1,215 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg diff --git a/libs/SerialPort-master/Doxyfile b/libs/SerialPort-master/Doxyfile new file mode 100755 index 0000000..548822b --- /dev/null +++ b/libs/SerialPort-master/Doxyfile @@ -0,0 +1,1751 @@ +# Doxyfile 1.7.4 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = "Serial Port" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = C:/Users/bill/Documents + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = YES + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = YES + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = YES + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 28 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ../Arduino/libraries/SerialPort \ + MainPage/SerialPortMainPage.h + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.vhd \ + *.vhdl + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is adviced to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = YES + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = DOXYGEN \ + ARDUINO=100 \ + __attribute__(x)= + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/libs/SerialPort-master/MainPage/SerialPortMainPage.h b/libs/SerialPort-master/MainPage/SerialPortMainPage.h new file mode 100755 index 0000000..9af4865 --- /dev/null +++ b/libs/SerialPort-master/MainPage/SerialPortMainPage.h @@ -0,0 +1,163 @@ +/* Arduino SerialPort Library + * Copyright (C) 2011 by William Greiman + * + * This file is part of the Arduino SerialPort Library + * + * This Library is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with the Arduino SerialPort Library. If not, see + * . + */ +/** +\mainpage Arduino %SerialPort Library +
Copyright © 2011 by William Greiman +
+ +\section Intro Introduction +This library provide more options for buffering, character size, parity and +error checking than the standard Arduino HardwareSerial class for AVR Arduino +boards. + +The API was designed to be backward compatible with Arduino Serial. +A number of functions have been added to the API. + +To install the this library, copy the SerialPort folder to the +your libraries folder. + +Please explore the above tabs for detailed documentation. + +@section howto Quick How To + +This was posted in the Arduino forum by user sixeyes. +It is a nice introduction to to the SerialPort library. + +The core Arduino based serial code looks like this: + +@code +void setup() +{ + Serial.begin(9600); + Serial.println("Using Arduino supplied HardwareSerial"); +} + +void loop() +{ +} +@endcode + +So if you've copied the SerialPort folder from the zip file into your +libraries folder (So you have Arduino/libraries/SerialPort/SerialPort.h +and Arduino/libraries/SerialPort/SerialPort.cpp) +you can write the following code instead + +@code +#include + +SerialPort<0, 32, 256> port; + +void setup() +{ + port.begin(9600); + port.println("Using SerialPort class"); +} + +void loop() +{ +} +@endcode + +Just remember to do the following and you should be alright: + + - Include + - Declare new Serial port including its parameters + - Initialise (call begin()) and use the new serial port (NOT Serial) + . +The configuration of the serial port looks odd to anyone not familiar with +C++ templates, but it's easy to explain. The first parameter inside the +angle brackets is the serial port number. Unless you've got a board with +more than one serial port (e.g. Arduino Mega) this will always be 0. The +second parameter is the size of the receive buffer in bytes and the third +is the size of the transmit buffer in bytes. + +You can ignore the stuff about editing SerialPort.h. You'll only need this +if you're short of flash memory at which point you can come back and ask +more questions. + +If you do by chance refer to both the new SerialPort and HardwareSerial in +the same sketch you'll get some error messages about duplicate interrupt +vectors. + +Hope that helps. + +Iain + +@section logger SerialPort Sd Logger + +The folder, SerialPortLogger, contains a demo data logging sketch that is +capable of logging serial data to an SD card at up to 115200 baud. + +The two programs, SerialPortLogger.ino and SerialDataSource.ino, demonstrate +high speed logging of serial data. + +For more information see the readme.txt file in the SerialPortLogger folder. + +@section examples Examples + +A number of examples are included in the SerialPort/examples folder. + +ArduinoSize - Print the amount of free RAM using Arduino HardwareSerial. + +ArduinoTest - Arduino HardwareSerial version of test sketch. + +BufferedSize - Print the amount of free RAM using SerialPort with + buffered RX and TX. + +BufferedTest - Test SerialPort with buffered RX and TX. + +HelloWorld - Simple first example. + +MegaTest - Test all ports on a Mega using SerialPort. + +MegaTestArduino - Test all ports on a Mega using Arduino HardwareSerial. + +ReadWriteTest - Test that ring buffer overrun can be detected. + +UnbufferedSize - Print the amount of free RAM using SerialPort with no buffers. + +UnbufferedTest - Test SerialPort with no buffering. + +WriteFlash - Test write() for a flash string. + +@section config Configuration Options + +You can can save flash if your buffers are always smaller than 254 bytes +by setting ALLOW_LARGE_BUFFERS zero in SerialPort.h. This will also +increase performance slightly. + +You can save substantial flash by disabling the faster versions of +write(const char*) and write(const uint8_t*, size_t) by setting +USE_WRITE_OVERRIDES zero in SerialPort.h. + +If you only use unbuffered TX, edit SerialPort.h and set BUFFERED_TX zero. +This will save some flash and RAM by preventing the TX ISR from being +loaded. TxBufSize must always be zero in SerialPort constructors if +BUFFERED_TX is zero. + +If you only do output or if input buffering is not required, edit +SerialPort.h and set BUFFERED_RX zero. This will save some flash +and RAM by preventing the RX ISR from being loaded. RxBufSize must +always be zero in SerialPort constructors if BUFFERED_RX is zero. + +You can disable RX error functions by setting ENABLE_RX_ERROR_CHECKING +zero in SerialPort.h This will save a tiny bit of flash, RAM, and +speedup receive a little. +*/ \ No newline at end of file diff --git a/libs/SerialPortBeta20120106/SerialPort.html b/libs/SerialPort-master/SerialPort.html similarity index 100% rename from libs/SerialPortBeta20120106/SerialPort.html rename to libs/SerialPort-master/SerialPort.html diff --git a/libs/SerialPortBeta20120106/SerialPort/SerialPort.cpp b/libs/SerialPort-master/SerialPort/SerialPort.cpp similarity index 78% rename from libs/SerialPortBeta20120106/SerialPort/SerialPort.cpp rename to libs/SerialPort-master/SerialPort/SerialPort.cpp index 44b62db..909f641 100755 --- a/libs/SerialPortBeta20120106/SerialPort/SerialPort.cpp +++ b/libs/SerialPort-master/SerialPort/SerialPort.cpp @@ -17,9 +17,16 @@ * along with the Arduino SerialPort Library. If not, see * . */ +/** + * @file + * @brief Serial Port class + */ #include //------------------------------------------------------------------------------ -/** \return the number of bytes in the ring buffer */ +/** @return The number of bytes in the ring buffer. + * + * @note This function must not be called with interrupts disabled. + */ int SerialRingBuffer::available() { uint8_t s = SREG; cli(); @@ -28,7 +35,10 @@ int SerialRingBuffer::available() { return n < 0 ? size_ + n : n; } //------------------------------------------------------------------------------ -/** Discard all data in the ring buffer. */ +/** Discard all data in the ring buffer. + * + * @note This function must not be called with interrupts disabled. + */ void SerialRingBuffer::flush() { uint8_t s = SREG; cli(); @@ -36,9 +46,10 @@ void SerialRingBuffer::flush() { SREG = s; } //------------------------------------------------------------------------------ -/** get the next byte - * \param[in] b location for the returned byte - * \return true if a byte was returned or false if the ring buffer is empty +/** Get the next byte from the ring buffer. + * + * @param[in] b location for the returned byte + * @return @c true if a byte was returned or @c false if the ring buffer is empty */ bool SerialRingBuffer::get(uint8_t* b) { buf_size_t t = tail_; @@ -50,12 +61,13 @@ bool SerialRingBuffer::get(uint8_t* b) { //------------------------------------------------------------------------------ /** * Get the maximum number of contiguous bytes from the ring buffer - * with one call to memcpy. Do not use this function with interrupts - * disabled. + * with one call to memcpy. + * + * @note This function must not be called with interrupts disabled. * - * \param[in] b pointer to data - * \param[in] n number of bytes to transfer from the ring buffer - * \return number of bytes transferred + * @param[in] b Pointer to the data. + * @param[in] n Number of bytes to transfer from the ring buffer. + * @return Number of bytes transferred. */ SerialRingBuffer::buf_size_t SerialRingBuffer::get(uint8_t* b, buf_size_t n) { buf_size_t nr; @@ -77,9 +89,9 @@ SerialRingBuffer::buf_size_t SerialRingBuffer::get(uint8_t* b, buf_size_t n) { return nr; } //------------------------------------------------------------------------------ -/** initialize the ring buffer - * \param[in] b buffer for data - * \param[in] s size of the buffer +/** Initialize the ring buffer. + * @param[in] b Buffer for the data. + * @param[in] s Size of the buffer. */ void SerialRingBuffer::init(uint8_t* b, buf_size_t s) { buf_ = b; @@ -87,20 +99,22 @@ void SerialRingBuffer::init(uint8_t* b, buf_size_t s) { head_ = tail_ = 0; } //------------------------------------------------------------------------------ -/** peek at the next byte in the ring buffer - * \return the next byte that would ber read or -1 if the ring buffer is empty +/** Peek at the next byte in the ring buffer. + * @return The next byte that would be read or -1 if the ring buffer is empty. */ int SerialRingBuffer::peek() { return empty() ? -1 : buf_[tail_]; } //------------------------------------------------------------------------------ -/** put a byte into the ring buffer - * \param[in] b the byte - * \return true if byte was transferred or false if the ring buffer is full +/** Put a byte into the ring buffer. + * + * @param[in] b the byte + * @return @c true if byte was transferred or + * @c false if the ring buffer is full. */ bool SerialRingBuffer::put(uint8_t b) { buf_size_t h = head_; - // OK to store here even if ring is full + // OK to store here even if ring is full. buf_[h++] = b; if (h >= size_) h = 0; if (h == tail_) return false; @@ -109,12 +123,14 @@ bool SerialRingBuffer::put(uint8_t b) { } //------------------------------------------------------------------------------ /** - * Put the maximum number of contiguous bytes into the ring buffer + * Put the maximum number of contiguous bytes into the ring buffer. * with one call to memcpy. * - * \param[in] b pointer to data - * \param[in] n number of bytes to transfer to the ring buffer - * \return number of bytes transferred + * @note This function must not be called with interrupts disabled. + * + * @param[in] b pointer to data. + * @param[in] n number of bytes to transfer to the ring buffer. + * @return number of bytes transferred. */ SerialRingBuffer::buf_size_t SerialRingBuffer::put(const uint8_t* b, buf_size_t n) { @@ -137,12 +153,14 @@ SerialRingBuffer::buf_size_t } //------------------------------------------------------------------------------ /** - * Put the maximum number of contiguous bytes into the ring buffer + * Put the maximum number of contiguous bytes into the ring buffer. * with one call to memcpy. * - * \param[in] b pointer to data - * \param[in] n number of bytes to transfer to the ring buffer - * \return number of bytes transferred + * @note This function must not be called with interrupts disabled. + * + * @param[in] b pointer to data. + * @param[in] n number of bytes to transfer to the ring buffer. + * @return number of bytes transferred. */ SerialRingBuffer::buf_size_t SerialRingBuffer::put_P(PGM_P b, buf_size_t n) { cli(); @@ -190,19 +208,25 @@ inline static void rx_isr(uint8_t n) { // SerialRingBuffer rxbuf0; #if defined(USART_RX_vect) ISR(USART_RX_vect) { + rx_isr(0); +} #elif defined(SIG_USART0_RECV) ISR(SIG_USART0_RECV) { + rx_isr(0); +} #elif defined(SIG_UART0_RECV) ISR(SIG_UART0_RECV) { + rx_isr(0); +} #elif defined(USART0_RX_vect) ISR(USART0_RX_vect) { + rx_isr(0); +} #elif defined(SIG_UART_RECV) ISR(SIG_UART_RECV) { -#else // vector -#error No ISR rx vector for UART0 -#endif // vector rx_isr(0); } +#endif // vector USART0 #ifdef USART1_RX_vect ISR(USART1_RX_vect) { rx_isr(1); @@ -237,17 +261,22 @@ inline static void tx_isr(uint8_t n) { } #if defined(UART0_UDRE_vect) ISR(UART0_UDRE_vect) { + tx_isr(0); +} #elif defined(UART_UDRE_vect) ISR(UART_UDRE_vect) { + tx_isr(0); +} #elif defined(USART0_UDRE_vect) ISR(USART0_UDRE_vect) { + tx_isr(0); +} #elif defined(USART_UDRE_vect) ISR(USART_UDRE_vect) { -#else -#error N0 ISR tx vector for UART0 -#endif tx_isr(0); } +#endif // USART0 TX + #ifdef USART1_UDRE_vect ISR(USART1_UDRE_vect) { tx_isr(1); diff --git a/libs/SerialPortBeta20120106/SerialPort/SerialPort.h b/libs/SerialPort-master/SerialPort/SerialPort.h similarity index 73% rename from libs/SerialPortBeta20120106/SerialPort/SerialPort.h rename to libs/SerialPort-master/SerialPort/SerialPort.h index 3efeec2..4f028ad 100755 --- a/libs/SerialPortBeta20120106/SerialPort/SerialPort.h +++ b/libs/SerialPort-master/SerialPort/SerialPort.h @@ -1,5 +1,5 @@ /* Arduino SerialPort Library - * Copyright (C) 2011 by William Greiman + * Copyright (C) 2012 by William Greiman * * This file is part of the Arduino SerialPort Library * @@ -17,18 +17,19 @@ * along with the Arduino SerialPort Library. If not, see * . */ - /** - * \file - * \brief SerialPort class +/** + * @file + * @brief Serial Port class */ #ifndef SerialPort_h #define SerialPort_h //------------------------------------------------------------------------------ /** SerialPort version YYYYMMDD */ -#define SERIAL_PORT_VERSION 20120106 +#define SERIAL_PORT_VERSION 20140216 //------------------------------------------------------------------------------ /** * Set ALLOW_LARGE_BUFFERS to zero to limit buffer sizes to 254 bytes. + * * ALLOW_LARGE_BUFFERS controls whether uint16_t or uint8_t will be * used for buffer indices. */ @@ -36,13 +37,15 @@ //------------------------------------------------------------------------------ /** * Set USE_WRITE_OVERRIDES to zero to use the Arduino Print version - * of write(const char*) and write(const uint8_t*, size_t). This will - * save some flash but is much slower. + * of write(const char*) and write(const uint8_t*, size_t). + * + * This will save some flash but is much slower. */ #define USE_WRITE_OVERRIDES 1 //------------------------------------------------------------------------------ /** * Set BUFFERED_RX zero to save flash and RAM if no RX buffering is used. + * * RxBufSize must be zero in all SerialPort constructors if * BUFFERED_RX is zero. */ @@ -50,6 +53,7 @@ //------------------------------------------------------------------------------ /** * Set BUFFERED_TX zero to save flash and RAM if no TX buffering is used. + * * TxBufSize must be zero in all SerialPort constructors if * BUFFERED_TX is zero. */ @@ -72,14 +76,7 @@ //------------------------------------------------------------------------------ #include #include -#if ARDUINO < 100 -#include -class __FlashStringHelper; -#define F(string_literal)\ - (reinterpret_cast<__FlashStringHelper *>(PSTR(string_literal))) -#else // ARDUINO < 100 #include -#endif // ARDUINO < 100 //------------------------------------------------------------------------------ #if defined(UCSR3A) static const uint8_t SERIAL_PORT_COUNT = 4; @@ -90,11 +87,11 @@ static const uint8_t SERIAL_PORT_COUNT = 2; #elif defined(UCSR0A) || defined(UCSRA) static const uint8_t SERIAL_PORT_COUNT = 1; #else -#error no serial ports +#error no serial ports. #endif //------------------------------------------------------------------------------ #ifdef UCSR0A -// bits in UCSRA +// Bits in UCSRA. static const uint8_t M_RXC = 1 << RXC0; static const uint8_t M_TXC = 1 << TXC0; static const uint8_t M_UDRE = 1 << UDRE0; @@ -102,20 +99,20 @@ static const uint8_t M_FE = 1 << FE0; static const uint8_t M_DOR = 1 << DOR0; static const uint8_t M_UPE = 1 << UPE0; static const uint8_t M_U2X = 1 << U2X0; -// bits in UCSRB +// Bits in UCSRB. static const uint8_t M_RXCIE = 1 << RXCIE0; static const uint8_t M_TXCIE = 1 << TXCIE0; static const uint8_t M_UDRIE = 1 << UDRIE0; static const uint8_t M_RXEN = 1 << RXEN0; static const uint8_t M_TXEN = 1 << TXEN0; -// bits in UCSRC +// Bits in UCSRC. static const uint8_t M_UPM0 = 1 << UPM00; static const uint8_t M_UPM1 = 1 << UPM01; static const uint8_t M_USBS = 1 << USBS0; static const uint8_t M_UCSZ0 = 1 << UCSZ00; static const uint8_t M_UCSZ1 = 1 << UCSZ01; #elif defined(UCSRA) // UCSR0A -// bits in UCSRA +// Bits in UCSRA. static const uint8_t M_RXC = 1 << RXC; static const uint8_t M_TXC = 1 << TXC; static const uint8_t M_UDRE = 1 << UDRE; @@ -123,67 +120,91 @@ static const uint8_t M_FE = 1 << FE; static const uint8_t M_DOR = 1 << DOR; static const uint8_t M_UPE = 1 << PE; static const uint8_t M_U2X = 1 << U2X; -// bits in UCSRB +// Bits in UCSRB. static const uint8_t M_RXCIE = 1 << RXCIE; static const uint8_t M_TXCIE = 1 << TXCIE; static const uint8_t M_UDRIE = 1 << UDRIE; static const uint8_t M_RXEN = 1 << RXEN; static const uint8_t M_TXEN = 1 << TXEN; -// bits in UCSRC +// Bits in UCSRC. static const uint8_t M_UPM0 = 1 << UPM0; static const uint8_t M_UPM1 = 1 << UPM1; static const uint8_t M_USBS = 1 << USBS; static const uint8_t M_UCSZ0 = 1 << UCSZ0; static const uint8_t M_UCSZ1 = 1 << UCSZ1; +#elif defined(UCSR1A) // UCSR0A +// Bits in UCSRA. +static const uint8_t M_RXC = 1 << RXC1; +static const uint8_t M_TXC = 1 << TXC1; +static const uint8_t M_UDRE = 1 << UDRE1; +static const uint8_t M_FE = 1 << FE1; +static const uint8_t M_DOR = 1 << DOR1; +static const uint8_t M_UPE = 1 << UPE1; +static const uint8_t M_U2X = 1 << U2X1; +// Bits in UCSRB. +static const uint8_t M_RXCIE = 1 << RXCIE1; +static const uint8_t M_TXCIE = 1 << TXCIE1; +static const uint8_t M_UDRIE = 1 << UDRIE1; +static const uint8_t M_RXEN = 1 << RXEN1; +static const uint8_t M_TXEN = 1 << TXEN1; +// Bits in UCSRC. +static const uint8_t M_UPM0 = 1 << UPM10; +static const uint8_t M_UPM1 = 1 << UPM11; +static const uint8_t M_USBS = 1 << USBS1; +static const uint8_t M_UCSZ0 = 1 << UCSZ10; +static const uint8_t M_UCSZ1 = 1 << UCSZ11; #else // UCSR0A #error no serial ports #endif // UCSR0A //------------------------------------------------------------------------------ -/** use one stop bit */ +/** Use one stop bit. */ static const uint8_t SP_1_STOP_BIT = 0; -/** use two stop bits */ +/** Use two stop bits. */ static const uint8_t SP_2_STOP_BIT = M_USBS; -/** disable parity bit */ +/** No parity bit. */ static const uint8_t SP_NO_PARITY = 0; -/** use even parity */ +/** Use even parity. */ static const uint8_t SP_EVEN_PARITY = M_UPM1; -/** use odd parity */ +/** Use odd parity. */ static const uint8_t SP_ODD_PARITY = M_UPM0 | M_UPM1; -/** use 5-bit character size */ +/** Use 5-bit character size. */ static const uint8_t SP_5_BIT_CHAR = 0; -/** use 6-bit character size */ +/** Use 6-bit character size. */ static const uint8_t SP_6_BIT_CHAR = M_UCSZ0; -/** use 7-bit character size */ +/** Use 7-bit character size. */ static const uint8_t SP_7_BIT_CHAR = M_UCSZ1; -/** use 8-bit character size */ +/** Use 8-bit character size. */ static const uint8_t SP_8_BIT_CHAR = M_UCSZ0 | M_UCSZ1; -/** mask for all options bits */ +/** Mask for all options bits. */ static const uint8_t SP_OPT_MASK = M_USBS | M_UPM0 | M_UPM1 |M_UCSZ0 | M_UCSZ1; -/** USART frame error bit */ +/** USART framing error bit. */ static const uint8_t SP_FRAMING_ERROR = M_FE; -/** USART RX data overrun error bit */ +/** USART RX data overrun error bit. */ static const uint8_t SP_RX_DATA_OVERRUN = M_DOR; -/** USART parity error bit */ +/** USART parity error bit. */ static const uint8_t SP_PARITY_ERROR = M_UPE; -/** mask for all error bits in UCSRA */ +/** Mask for all error bits in UCSRA. */ static const uint8_t SP_UCSRA_ERROR_MASK = M_FE | M_DOR | M_UPE; -/** RX ring buffer full overrun */ +/** RX ring buffer full overrun. */ static const uint8_t SP_RX_BUF_OVERRUN = 1; +#if 1 & ((1 << FE0) | (1 << DOR0) |(1 << UPE0)) +#error Invalid SP_RX_BUF_OVERRUN bit +#endif // SP_RX_BUF_OVERRUN //------------------------------------------------------------------------------ /** - * \class UsartRegister - * \brief addresses of USART registers + * @class UsartRegister + * @brief Addresses of USART registers. */ struct UsartRegister { - volatile uint8_t* ucsra; /**< USART Control and Status Register A */ - volatile uint8_t* ucsrb; /**< USART Control and Status Register B */ - volatile uint8_t* ucsrc; /**< USART Control and Status Register C */ - volatile uint8_t* ubrrl; /**< USART Baud Rate Register Low */ - volatile uint8_t* ubrrh; /**< USART Baud Rate Register High */ - volatile uint8_t* udr; /**< USART I/O Data Register */ + volatile uint8_t* ucsra; /**< USART Control and Status Register A. */ + volatile uint8_t* ucsrb; /**< USART Control and Status Register B. */ + volatile uint8_t* ucsrc; /**< USART Control and Status Register C. */ + volatile uint8_t* ubrrl; /**< USART Baud Rate Register Low. */ + volatile uint8_t* ubrrh; /**< USART Baud Rate Register High. */ + volatile uint8_t* udr; /**< USART I/O Data Register. */ }; //------------------------------------------------------------------------------ /** @@ -219,8 +240,8 @@ static const UsartRegister usart[] = { }; //------------------------------------------------------------------------------ /** - * \class SerialRingBuffer - * \brief ring buffer for RX and TX data + * @class SerialRingBuffer + * @brief Ring buffer for RX and TX data. */ class SerialRingBuffer { public: @@ -231,7 +252,7 @@ class SerialRingBuffer { typedef uint8_t buf_size_t; #endif // ALLOW_LARGE_BUFFERS int available(); - /** \return true if the ring buffer is empty else false */ + /** @return @c true if the ring buffer is empty else @c false. */ bool empty() {return head_ == tail_;} void flush(); bool get(uint8_t* b); @@ -248,49 +269,52 @@ class SerialRingBuffer { buf_size_t size_; /**< Size of the buffer. Capacity is size -1. */ }; //------------------------------------------------------------------------------ -/** RX ring buffers */ +/** RX ring buffers. */ extern SerialRingBuffer rxRingBuf[]; -/** TX ring buffers */ +/** TX ring buffers. */ extern SerialRingBuffer txRingBuf[]; -/** RX error bits */ +/** RX error bits. */ extern uint8_t rxErrorBits[]; //------------------------------------------------------------------------------ -/** Cause error message for bad port number - * \return Never returns since it is never called +/** Cause error message for bad port number. + * @return Never returns since it is never called. */ uint8_t badPortNumber(void) __attribute__((error("Bad port number"))); -/** Cause error message for bad port number - * \return Never returns since it is never called +/** Cause error message for bad port number. + * @return Never returns since it is never called. */ uint8_t badRxBufSize(void) __attribute__((error("RX buffer size too large"))); -/** Cause error message for bad port number - * \return Never returns since it is never called +/** Cause error message for bad port number. + * @return Never returns since it is never called. */ uint8_t badTxBufSize(void) __attribute__((error("TX buffer size too large"))); //------------------------------------------------------------------------------ /** - * \class SerialPort - * \brief class for avr hardware USART ports + * @class SerialPort + * @brief Class for avr hardware USART ports. */ template class SerialPort : public Stream { public: //---------------------------------------------------------------------------- + /** Constructor */ SerialPort() { - if (PortNumber >= SERIAL_PORT_COUNT) badPortNumber(); + if (PortNumber >= SERIAL_PORT_COUNT || !usart[PortNumber].ucsra) { + badPortNumber(); + } if (sizeof(SerialRingBuffer::buf_size_t) == 1) { - if (RxBufSize >254) badRxBufSize(); - if (TxBufSize >254) badTxBufSize(); + if (RxBufSize > 254) badRxBufSize(); + if (TxBufSize > 254) badTxBufSize(); } if (RxBufSize) rxRingBuf[PortNumber].init(rxBuffer_, sizeof(rxBuffer_)); if (TxBufSize) txRingBuf[PortNumber].init(txBuffer_, sizeof(txBuffer_)); } //---------------------------------------------------------------------------- /** - * \return The number of bytes (characters) available for reading from + * @return The number of bytes (characters) available for reading from * the serial port. */ int available(void) { @@ -304,31 +328,23 @@ class SerialPort : public Stream { /** * Sets the data rate in bits per second (baud) for serial data transmission. * - * \param[in] baud rate in bits per second (baud) - * \param[in] options constructed by a bitwise-inclusive + * @param[in] baud Rate in bits per second (baud). + * @param[in] options constructed by a bitwise-inclusive * OR of values from the following list. Choose one value for stop bit, * parity, and character size. * + * - SP_1_STOP_BIT - Use one stop bit (default if stop bit not specified). + * - SP_2_STOP_BIT - Use two stop bits. + * - SP_NO_PARITY - No parity bit (default if parity not specified). + * - SP_EVEN_PARITY - Add even parity bit. + * - SP_ODD_PARITY - Add odd parity bit. + * - SP_5_BIT_CHAR - Use 5-bit characters (default if size not specified). + * - SP_6_BIT_CHAR - Use 6-bit characters. + * - SP_7_BIT_CHAR - Use 7-bit characters. + * - SP_8_BIT_CHAR - Use 8-bit characters. + * . * The default is SP_8_BIT_CHAR which results in one stop bit, no parity, * and 8-bit characters. - * - * SP_1_STOP_BIT - use one stop bit (default if stop bit not specified) - * - * SP_2_STOP_BIT - use two stop bits - * - * SP_NO_PARITY - no parity bit (default if parity not specified) - * - * SP_EVEN_PARITY - add even parity bit - * - * SP_ODD_PARITY - add odd parity bit - * - * SP_5_BIT_CHAR - use 5-bit characters (default if size not specified) - * - * SP_6_BIT_CHAR - use 6-bit characters - * - * SP_7_BIT_CHAR - use 7-bit characters - * - * SP_8_BIT_CHAR - use 8-bit characters */ void begin(uint32_t baud, uint8_t options = SP_8_BIT_CHAR) { uint16_t baud_setting; @@ -339,16 +355,22 @@ class SerialPort : public Stream { // set option bits *usart[PortNumber].ucsrc = options & SP_OPT_MASK; - if (F_CPU == 16000000UL && baud == 57600) { - // hardcoded exception for compatibility with the bootloader shipped - // with the Duemilanove and previous boards and the firmware on the 8U2 - // on the Uno and Mega 2560. + baud_setting = F_CPU/4/baud; + + if (baud_setting > 8192 || (F_CPU == 16000000UL && baud == 57600)) { + // Hardcoded exception for compatibility with the bootloader shipped + // with the Duemilanove and previous boards and the firmware on the + // 8U2/16U2 on the Uno and Mega 2560. + // Prevent overflow of 12-bit UBRR at 300 baud. *usart[PortNumber].ucsra = 0; - baud_setting = (F_CPU / 8 / baud - 1) / 2; + baud_setting /= 2; } else { + // Use U2X for better high baud rates. *usart[PortNumber].ucsra = M_U2X; - baud_setting = (F_CPU / 4 / baud - 1) / 2; } + // Rounded value for datasheet expression. + baud_setting = (baud_setting - 1)/2; + // assign the baud_setting, a.k.a. ubbr (USART Baud Rate Register) *usart[PortNumber].ubrrh = baud_setting >> 8; *usart[PortNumber].ubrrl = baud_setting; @@ -362,9 +384,15 @@ class SerialPort : public Stream { } //---------------------------------------------------------------------------- #if ENABLE_RX_ERROR_CHECKING - /** clear RX error bits */ + /** Clear RX error bits. */ void clearRxError() {rxErrorBits[PortNumber] = 0;} - /** \return RX error bits */ + /** @return RX error bits. Possible error bits are: + * - @ref SP_RX_BUF_OVERRUN + * - @ref SP_RX_DATA_OVERRUN + * - @ref SP_FRAMING_ERROR + * - @ref SP_PARITY_ERROR + * . + */ uint8_t getRxError() {return rxErrorBits[PortNumber];} #endif // ENABLE_RX_ERROR_CHECKING //---------------------------------------------------------------------------- @@ -386,13 +414,8 @@ class SerialPort : public Stream { //---------------------------------------------------------------------------- /** * For Arduino 1.0 and greater call flushTx(). - * For Arduino 0023 and before call flushRx(). */ - #if ARDUINO < 100 - void flush() {flushRx();} - #else // ARDUINO < 100 void flush() {flushTx();} - #endif // ARDUINO < 100 //---------------------------------------------------------------------------- /** * Discard any buffered incoming serial data. @@ -416,8 +439,8 @@ class SerialPort : public Stream { } //---------------------------------------------------------------------------- /** - * \return the first byte of incoming serial data available or - * -1 if no data is available. Peek() always return -1 for unbuffered RX. + * @return The first byte of incoming serial data available or + * -1 if no data is available. -1 is always returned for unbuffered RX. */ int peek(void) { return RxBufSize ? rxRingBuf[PortNumber].peek() : -1; @@ -426,8 +449,8 @@ class SerialPort : public Stream { /** * Read incoming serial data. * - * \return the first byte of incoming serial data available - * or -1 if no data is available + * @return The first byte of incoming serial data available + * or -1 if no data is available. */ __attribute__((noinline)) int read() { @@ -447,9 +470,9 @@ class SerialPort : public Stream { * Read incoming serial data. Stop when RX buffer is empty or n * bytes have been read. * - * \param[in] b location to receive the data - * \param[in] n maximum number of bytes to read - * \return number of bytes read + * @param[in] b The location to receive the data. + * @param[in] n Maximum number of bytes to read. + * @return The number of bytes read. */ __attribute__((noinline)) size_t read(uint8_t* b, size_t n) { @@ -461,7 +484,6 @@ class SerialPort : public Stream { if (sizeof(SerialRingBuffer::buf_size_t) == 1 && nr > 255) nr = 255; p += rxRingBuf[PortNumber].get(p, nr); } - return p - b; } else { while (p < limit) { int rb = read(); @@ -475,77 +497,55 @@ class SerialPort : public Stream { /** * Write binary data to the serial port. * - * \param[in] b byte to be written. - * \return number of bytes written to the serial port + * @param[in] b The byte to be written. + * @return The number of bytes written to the serial port. */ __attribute__((noinline)) - #if ARDUINO < 100 - void write(uint8_t b) { - #else // ARDUINO < 100 size_t write(uint8_t b) { - #endif // ARDUINO < 100 if (!TxBufSize) { while (!(*usart[PortNumber].ucsra & M_UDRE)) {} *usart[PortNumber].udr = b; } else { - // wait for TX ISR if buffer is full + // Wait for TX ISR if buffer is full. while (!txRingBuf[PortNumber].put(b)) {} - // enable interrupts + + // Enable interrupts. *usart[PortNumber].ucsrb |= M_UDRIE; } - #if ARDUINO > 99 return 1; - #endif // ARDUINO > 99 } //---------------------------------------------------------------------------- - /** write CR LF - * \return 2 + /** Write CR/LF. + * @return 2 */ __attribute__((noinline)) - #if ARDUINO < 100 - void writeln() { - write('\r'); - write('\n'); - } - #else // ARDUINO < 100 size_t writeln() { write('\r'); write('\n'); return 2; } - #endif // ARDUINO >= 100 //---------------------------------------------------------------------------- /** - * Write a string to the serial port followed by CF LF + * Write a string to the serial port followed by CR/LF. * - * \param[in] s string to be written. - * \return number of bytes written to the serial port + * @param[in] s The string to be written. + * @return The number of bytes written to the serial port. */ __attribute__((noinline)) - #if ARDUINO < 100 - void writeln(const char* s) { - write(s); - writeln(); - } - #else // ARDUINO < 100 size_t writeln(const char* s) { return write(s) + writeln(); } - #endif // ARDUINO >= 100 + //---------------------------------------------------------------------------- /** * Write binary data from flash memory to the serial port. * - * \param[in] b bytes to be written - * \param[in] n number of bytes to write - * \return number of bytes written to the serial port + * @param[in] b Location of the bytes to be written. + * @param[in] n The number of bytes to write. + * @return The number of bytes written to the serial port. */ __attribute__((noinline)) - #if ARDUINO < 100 - void write_P(PGM_P b, size_t n) { - #else // ARDUINO < 100 size_t write_P(PGM_P b, size_t n) { - #endif // ARDUINO < 100 if (!TxBufSize) { for (size_t i = 0; i < n; i++) write(pgm_read_byte(b + i)); } else { @@ -554,70 +554,50 @@ class SerialPort : public Stream { size_t nw = w; if (sizeof(SerialRingBuffer::buf_size_t) == 1 && nw > 255) nw = 255; size_t m = txRingBuf[PortNumber].put_P(b, nw); + // enable interrupts *usart[PortNumber].ucsrb |= M_UDRIE; w -= m; b += m; } } - #if ARDUINO >= 100 return n; - #endif // ARDUINO >= 100 } //---------------------------------------------------------------------------- /** * Write a flash string to the serial port. * - * \param[in] s string to be written. - * \return number of bytes written to the serial port + * @param[in] s The string to be written. + * @return The number of bytes written to the serial port. */ __attribute__((noinline)) - #if ARDUINO < 100 - void write(const __FlashStringHelper* s) { - const prog_char* p = (const prog_char*)s; - size_t n = strlen_P(p); - write_P(p, n); - } - #else // ARDUINO < 100 size_t write(const __FlashStringHelper* s) { - const prog_char* p = (const prog_char*)s; + const char PROGMEM* p = (const char PROGMEM*)s; size_t n = strlen_P(p); return write_P(p, n); } - #endif // ARDUINO >= 100 //---------------------------------------------------------------------------- /** - * Write a flash string to the serial port followed by CF LF + * Write a flash string to the serial port followed by CR/LF. * - * \param[in] s string to be written. - * \return number of bytes written to the serial port + * @param[in] s The string to be written. + * @return The number of bytes written to the serial port. */ __attribute__((noinline)) - #if ARDUINO < 100 - void writeln(const __FlashStringHelper* s) { - write(s); - writeln(); - } - #else // ARDUINO < 100 size_t writeln(const __FlashStringHelper* s) { return write(s) + writeln(); } - #endif // ARDUINO >= 100 #if USE_WRITE_OVERRIDES //---------------------------------------------------------------------------- /** * Write binary data to the serial port. * - * \param[in] b bytes to be written - * \param[in] n number of bytes to write - * \return number of bytes written to the serial port + * @param[in] b Location of the bytes to be written. + * @param[in] n The number of bytes to write. + * @return The number of bytes written to the serial port. */ __attribute__((noinline)) - #if ARDUINO < 100 - void write(const uint8_t* b, size_t n) { - #else // ARDUINO < 100 size_t write(const uint8_t* b, size_t n) { - #endif // ARDUINO < 100 if (!TxBufSize) { for (size_t i = 0; i < n; i++) write(b[i]); } else { @@ -626,35 +606,27 @@ class SerialPort : public Stream { size_t nw = w; if (sizeof(SerialRingBuffer::buf_size_t) == 1 && nw > 255) nw = 255; size_t m = txRingBuf[PortNumber].put(b, nw); - // enable interrupts + + // Enable interrupts. *usart[PortNumber].ucsrb |= M_UDRIE; w -= m; b += m; } } - #if ARDUINO >= 100 return n; - #endif // ARDUINO >= 100 } //---------------------------------------------------------------------------- /** * Write a string to the serial port. * - * \param[in] s string to be written. - * \return number of bytes written to the serial port + * @param[in] s The string to be written. + * @return The number of bytes written to the serial port */ __attribute__((noinline)) - #if ARDUINO < 100 - void write(const char* s) { - size_t n = strlen(s); - write(reinterpret_cast(s), n); - } - #else // ARDUINO < 100 size_t write(const char* s) { size_t n = strlen(s); return write(reinterpret_cast(s), n); } - #endif // ARDUINO >= 100 #else // USE_WRITE_OVERRIDES using Print::write; // use write(str) and write(buf, size) from Print #endif // USE_WRITE_OVERRIDES @@ -662,7 +634,7 @@ class SerialPort : public Stream { private: // RX buffer with a capacity of RxBufSize. uint8_t rxBuffer_[RxBufSize + 1]; - // TX buffer with a capacity of TxBufSize + // TX buffer with a capacity of TxBufSize. uint8_t txBuffer_[TxBufSize + 1]; }; //------------------------------------------------------------------------------ diff --git a/libs/SerialPortBeta20120106/SerialPort/examples/ArduinoSize/ArduinoSize.pde b/libs/SerialPort-master/SerialPort/examples/ArduinoSize/ArduinoSize.ino similarity index 100% rename from libs/SerialPortBeta20120106/SerialPort/examples/ArduinoSize/ArduinoSize.pde rename to libs/SerialPort-master/SerialPort/examples/ArduinoSize/ArduinoSize.ino diff --git a/libs/SerialPort-master/SerialPort/examples/ArduinoSize/FreeRam.h b/libs/SerialPort-master/SerialPort/examples/ArduinoSize/FreeRam.h new file mode 100755 index 0000000..bbd9dd3 --- /dev/null +++ b/libs/SerialPort-master/SerialPort/examples/ArduinoSize/FreeRam.h @@ -0,0 +1,10 @@ +#include +static inline int FreeRam() { + extern char *__brkval; + char top; +#if defined(CORE_TEENSY) + return &top - __brkval; +#else // malloc type + return __brkval ? &top - __brkval : &top - __malloc_heap_start; +#endif // malloc type +} diff --git a/libs/SerialPortBeta20120106/SerialPort/examples/ArduinoTest/ArduinoTest.pde b/libs/SerialPort-master/SerialPort/examples/ArduinoTest/ArduinoTest.ino similarity index 100% rename from libs/SerialPortBeta20120106/SerialPort/examples/ArduinoTest/ArduinoTest.pde rename to libs/SerialPort-master/SerialPort/examples/ArduinoTest/ArduinoTest.ino diff --git a/libs/SerialPortBeta20120106/SerialPort/examples/BufferedSize/BufferedSize.pde b/libs/SerialPort-master/SerialPort/examples/BufferedSize/BufferedSize.ino similarity index 83% rename from libs/SerialPortBeta20120106/SerialPort/examples/BufferedSize/BufferedSize.pde rename to libs/SerialPort-master/SerialPort/examples/BufferedSize/BufferedSize.ino index 6f83d36..86089a0 100755 --- a/libs/SerialPortBeta20120106/SerialPort/examples/BufferedSize/BufferedSize.pde +++ b/libs/SerialPort-master/SerialPort/examples/BufferedSize/BufferedSize.ino @@ -1,4 +1,4 @@ -// print free RAM for Arduino 1.0 style buffering +// Print free RAM for Arduino 1.0 style buffering. // #include #include "FreeRam.h" diff --git a/libs/SerialPort-master/SerialPort/examples/BufferedSize/FreeRam.h b/libs/SerialPort-master/SerialPort/examples/BufferedSize/FreeRam.h new file mode 100755 index 0000000..bbd9dd3 --- /dev/null +++ b/libs/SerialPort-master/SerialPort/examples/BufferedSize/FreeRam.h @@ -0,0 +1,10 @@ +#include +static inline int FreeRam() { + extern char *__brkval; + char top; +#if defined(CORE_TEENSY) + return &top - __brkval; +#else // malloc type + return __brkval ? &top - __brkval : &top - __malloc_heap_start; +#endif // malloc type +} diff --git a/libs/SerialPortBeta20120106/SerialPort/examples/BufferedTest/BufferedTest.pde b/libs/SerialPort-master/SerialPort/examples/BufferedTest/BufferedTest.ino similarity index 91% rename from libs/SerialPortBeta20120106/SerialPort/examples/BufferedTest/BufferedTest.pde rename to libs/SerialPort-master/SerialPort/examples/BufferedTest/BufferedTest.ino index 225d888..489fdfd 100755 --- a/libs/SerialPortBeta20120106/SerialPort/examples/BufferedTest/BufferedTest.pde +++ b/libs/SerialPort-master/SerialPort/examples/BufferedTest/BufferedTest.ino @@ -1,3 +1,4 @@ +// Check time to buffer data and function of available(). #include // port zero, 63 character RX and TX buffers diff --git a/libs/SerialPortBeta20120106/SerialPort/examples/HelloWorld/HelloWorld.pde b/libs/SerialPort-master/SerialPort/examples/HelloWorld/HelloWorld.ino similarity index 76% rename from libs/SerialPortBeta20120106/SerialPort/examples/HelloWorld/HelloWorld.pde rename to libs/SerialPort-master/SerialPort/examples/HelloWorld/HelloWorld.ino index 6012eb0..086d820 100755 --- a/libs/SerialPortBeta20120106/SerialPort/examples/HelloWorld/HelloWorld.pde +++ b/libs/SerialPort-master/SerialPort/examples/HelloWorld/HelloWorld.ino @@ -1,4 +1,4 @@ -// Simple usage with buffering like Arduino 1.0 +// Simple usage with buffering like Arduino 1.0. #include // use NewSerial for port 0 diff --git a/libs/SerialPortBeta20120106/SerialPort/examples/MegaTest/MegaTest.pde b/libs/SerialPort-master/SerialPort/examples/MegaTest/MegaTest.ino similarity index 64% rename from libs/SerialPortBeta20120106/SerialPort/examples/MegaTest/MegaTest.pde rename to libs/SerialPort-master/SerialPort/examples/MegaTest/MegaTest.ino index a536c5e..7dca6fc 100755 --- a/libs/SerialPortBeta20120106/SerialPort/examples/MegaTest/MegaTest.pde +++ b/libs/SerialPort-master/SerialPort/examples/MegaTest/MegaTest.ino @@ -1,7 +1,14 @@ -// Test all ports on the Mega +// Test all ports on the Mega. // -// place loopback jumpers, RX connected to TX, -// on ports 1, 2, and 3. +// A string read on port zero will be sent to port one, +// it will then be read from port one and sent to port +// two, next it will be read from port two and sent to +// port three, and finally it will be read from port +// three and sent to port zero. +// +// Place a loopback jumper connecting +// RX1 to TX1, RX2 to TX2, RX3 to TX3 on ports 1, 2, and 3. +// Do not place a jumper on port zero. // #include // port 0 unbuffered diff --git a/libs/SerialPortBeta20120106/SerialPort/examples/MegaTestArduino/MegaTestArduino.pde b/libs/SerialPort-master/SerialPort/examples/MegaTestArduino/MegaTestArduino.ino similarity index 55% rename from libs/SerialPortBeta20120106/SerialPort/examples/MegaTestArduino/MegaTestArduino.pde rename to libs/SerialPort-master/SerialPort/examples/MegaTestArduino/MegaTestArduino.ino index 5c5fdbb..32538ab 100755 --- a/libs/SerialPortBeta20120106/SerialPort/examples/MegaTestArduino/MegaTestArduino.pde +++ b/libs/SerialPort-master/SerialPort/examples/MegaTestArduino/MegaTestArduino.ino @@ -1,7 +1,15 @@ -// Test all ports on the Mega +// Test all ports on the Mega. // -// place loopback jumpers, RX connected to TX, -// on ports 1, 2, and 3. +// +// A string read on port zero will be sent to port one, +// it will then be read from port one and sent to port +// two, next it will be read from port two and sent to +// port three, and finally it will be read from port +// three and sent to port zero. +// +// Place a loopback jumper connecting +// RX1 to TX1, RX2 to TX2, RX3 to TX3 on ports 1, 2, and 3. +// Do not place a jumper on port zero. // void transfer(Stream* in, Stream* out) { while(!in->available()) {} diff --git a/libs/SerialPortBeta20120106/SerialPort/examples/ReadWriteTest/ReadWriteTest.pde b/libs/SerialPort-master/SerialPort/examples/ReadWriteTest/ReadWriteTest.ino similarity index 93% rename from libs/SerialPortBeta20120106/SerialPort/examples/ReadWriteTest/ReadWriteTest.pde rename to libs/SerialPort-master/SerialPort/examples/ReadWriteTest/ReadWriteTest.ino index c7d2246..c1df3c8 100755 --- a/libs/SerialPortBeta20120106/SerialPort/examples/ReadWriteTest/ReadWriteTest.pde +++ b/libs/SerialPort-master/SerialPort/examples/ReadWriteTest/ReadWriteTest.ino @@ -1,4 +1,4 @@ -// test that ring buffer overrun can be detected +// Test that ring buffer overrun can be detected. #include // port 0, 16 byte RX and TX buffers SerialPort<0, 16, 16> port0; diff --git a/libs/SerialPort-master/SerialPort/examples/UnbufferedSize/FreeRam.h b/libs/SerialPort-master/SerialPort/examples/UnbufferedSize/FreeRam.h new file mode 100755 index 0000000..bbd9dd3 --- /dev/null +++ b/libs/SerialPort-master/SerialPort/examples/UnbufferedSize/FreeRam.h @@ -0,0 +1,10 @@ +#include +static inline int FreeRam() { + extern char *__brkval; + char top; +#if defined(CORE_TEENSY) + return &top - __brkval; +#else // malloc type + return __brkval ? &top - __brkval : &top - __malloc_heap_start; +#endif // malloc type +} diff --git a/libs/SerialPortBeta20120106/SerialPort/examples/UnbufferedSize/UnbufferedSize.pde b/libs/SerialPort-master/SerialPort/examples/UnbufferedSize/UnbufferedSize.ino similarity index 65% rename from libs/SerialPortBeta20120106/SerialPort/examples/UnbufferedSize/UnbufferedSize.pde rename to libs/SerialPort-master/SerialPort/examples/UnbufferedSize/UnbufferedSize.ino index 80f88fd..4b1f60a 100755 --- a/libs/SerialPortBeta20120106/SerialPort/examples/UnbufferedSize/UnbufferedSize.pde +++ b/libs/SerialPort-master/SerialPort/examples/UnbufferedSize/UnbufferedSize.ino @@ -1,6 +1,8 @@ -// print free RAM for unbuffered mode -// you can reduce flash and RAM use more by setting +// Print free RAM for unbuffered mode. +// +// You can reduce flash and RAM use more by setting // BUFFERED_TX and BUFFERED_RX zero in SerialPort.h +// to always disable buffering. // #include #include "FreeRam.h" diff --git a/libs/SerialPortBeta20120106/SerialPort/examples/UnbufferedTest/UnbufferedTest.pde b/libs/SerialPort-master/SerialPort/examples/UnbufferedTest/UnbufferedTest.ino similarity index 100% rename from libs/SerialPortBeta20120106/SerialPort/examples/UnbufferedTest/UnbufferedTest.pde rename to libs/SerialPort-master/SerialPort/examples/UnbufferedTest/UnbufferedTest.ino diff --git a/libs/SerialPortBeta20120106/SerialPort/examples/WriteFlash/WriteFlash.pde b/libs/SerialPort-master/SerialPort/examples/WriteFlash/WriteFlash.ino similarity index 80% rename from libs/SerialPortBeta20120106/SerialPort/examples/WriteFlash/WriteFlash.pde rename to libs/SerialPort-master/SerialPort/examples/WriteFlash/WriteFlash.ino index 72544da..09a05b1 100755 --- a/libs/SerialPortBeta20120106/SerialPort/examples/WriteFlash/WriteFlash.pde +++ b/libs/SerialPort-master/SerialPort/examples/WriteFlash/WriteFlash.ino @@ -1,10 +1,10 @@ -// test write() for a flash string +// Test write() time for a flash string. #include SerialPort<0, 0, 32> port; void setup(void) { - port.begin(115200); + port.begin(9600); for (int route = 0; route < 11; route++) { uint32_t start = micros(); @@ -15,5 +15,6 @@ void setup(void) { port.writeln(F(" us")); delay(400); } + port.println(F("Done!")); } void loop(void) {} diff --git a/libs/SerialPort-master/SerialPortLogger/SerialDataSource.ino b/libs/SerialPort-master/SerialPortLogger/SerialDataSource.ino new file mode 100755 index 0000000..1852a4d --- /dev/null +++ b/libs/SerialPort-master/SerialPortLogger/SerialDataSource.ino @@ -0,0 +1,29 @@ +// This program sends 280000 bytes over serial port zero. +// Maximum baud rate for a 328 Arduino is 57600. +// Maximum baud rate for a Mega Arduino is 115200 +const uint32_t BAUD_RATE = 57600; + +#include + +// Define NewSerial as serial port zero. +USE_NEW_SERIAL; + +void setup() { + NewSerial.begin(BAUD_RATE); + pinMode(13, OUTPUT); + // light pin 13 LED on Arduino Board + digitalWrite(13, HIGH); + + // write start time + NewSerial.println(millis()); + + for (uint16_t i = 0; i < 10000; i++) { + NewSerial.write("ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n"); + } + // write end time + NewSerial.println(millis()); + + // turn off pin 13 LED + digitalWrite(13, LOW); +} +void loop() {} diff --git a/libs/SerialPort-master/SerialPortLogger/SerialPortLogger.ino b/libs/SerialPort-master/SerialPortLogger/SerialPortLogger.ino new file mode 100755 index 0000000..7f6c76b --- /dev/null +++ b/libs/SerialPort-master/SerialPortLogger/SerialPortLogger.ino @@ -0,0 +1,89 @@ +// Serial data logger example. +// Maximum baud rate for a 328 Arduino is 57600. +// Maximum baud rate for a Mega Arduino is 115200. +const uint32_t BAUD_RATE = 57600; + +// Maximum time between sync() calls in milliseconds. If Serial is always +// active, you must provide a way to stop the program and close the file. +const uint32_t MAX_SYNC_TIME_MSEC = 1000; + +// Pin number for error blink LED. +// Set ERROR_LED_PIN to -1 for no error LED. +const int8_t ERROR_LED_PIN = 3; + +#include +#include + +#if defined(__AVR_ATmega1280__)\ +|| defined(__AVR_ATmega2560__) +// Mega, use 4096 byte RX buffer +SerialPort<0, 4096, 0> NewSerial; +#else // Mega +// not a Mega, use 1024 RX byte buffer +SerialPort<0, 1024, 0> NewSerial; +#endif + +SdFat sd; +SdFile file; + +//------------------------------------------------------------------------------ +// Error codes repeat as errno short blinks with a delay between codes. +const uint8_t ERROR_INIT = 1; // SD init error +const uint8_t ERROR_OPEN = 2; // file open error +const uint8_t ERROR_SERIAL = 3; // serial error +const uint8_t ERROR_WRITE = 4; // SD write or sync error +void errorBlink(uint8_t errno) { + uint8_t i; + while (ERROR_LED_PIN < 0); + while (1) { + for (i = 0; i < errno; i++) { + digitalWrite(ERROR_LED_PIN, HIGH); + delay(200); + digitalWrite(ERROR_LED_PIN, LOW); + delay(200); + } + delay(1600); + } +} +//------------------------------------------------------------------------------ +void setup() { + pinMode(ERROR_LED_PIN, OUTPUT); + NewSerial.begin(BAUD_RATE); + + if (!sd.begin()) { + errorBlink(ERROR_INIT); + } + if (!file.open("SERIAL.BIN", O_WRITE | O_CREAT | O_AT_END)) { + errorBlink(ERROR_OPEN); + } + if (file.fileSize() == 0) { + // Make sure first cluster is allocated. + file.write((uint8_t)0); + file.rewind(); + file.sync(); + } +} +//------------------------------------------------------------------------------ +// Time of last sync call. +uint32_t syncTime = 0; + +uint8_t buf[32]; +void loop() { + if (NewSerial.getRxError()) { + errorBlink(ERROR_SERIAL); + } + uint8_t n = NewSerial.read(buf, sizeof(buf)); + if (n > 0) { + if (file.write(buf, n) != n) { + errorBlink(ERROR_WRITE); + } + // Don't sync if active. + return; + } + if ((millis() - syncTime) < MAX_SYNC_TIME_MSEC) return; + + if (!file.sync()) { + errorBlink(ERROR_WRITE); + } + syncTime = millis(); +} diff --git a/libs/SerialPort-master/SerialPortLogger/readme.txt b/libs/SerialPort-master/SerialPortLogger/readme.txt new file mode 100755 index 0000000..4157b82 --- /dev/null +++ b/libs/SerialPort-master/SerialPortLogger/readme.txt @@ -0,0 +1,60 @@ +This is a demo of a data logging sketch that is capable of logging serial +data to an SD card at up to 115200 baud. + +You must install the SdFat library to use the SerialPortLogger. SdFat +can be downloaded from: + +http://code.google.com/p/sdfatlib/downloads/list + +Normally the maximum rate for a 328 Arduino is 57600 baud. + +It is possible to log data at 115200 baud with a 328 Arduino if you use a high +quality SD card. + +Lower quality cards can have an occasional write latency of over 100 +milliseconds. This will cause a receive data overrun at 115200 baud since +the RX buffer on a 328 Arduino is 1024 bytes. You need to reduce the baud +rate to 57600 if your SD card causes receive overruns. + +Most SD cards will work with a Mega Arduino at 115200 baud since the RX +buffer is set to 4096 bytes. + +It is possible to use software SPI on a Mega by setting MEGA_SOFT_SPI nonzero +in SdFatConfig.h. This will allow a shield like the Adafruit Data Logging +shield to be used on a Mega without jumper wires. + +The two programs, SerialPortLogger.ino and SerialDataSource.ino, demonstrate +high speed logging of serial data. + +To run this demo, you need two Arduino boards and an SD shield or SD module. + +The board with the SD shield should have an LED and series resistor connected +from pin 3 to ground. This LED will blink an error code if an error occurs. + +Make sure BAUD_RATE has the same value in SerialPortLogger.ino and +SerialDataSource.ino. + +Load SerialPortLogger.ino into the board with an SD shield or module and +SerialDataSource.ino into the second board. + +Connect a wire between GND pins on the two boards. + +Connect a wire between the serial RX pin (Pin 0) on the SD board and the +serial TX pin (pin 1) on the data source board. + +It is best to power the two boards with an external 9V supply. + +After the boards are powered up, wait until the pin 13 LED on the data source +board goes out. This will take up to 50 seconds. + +Insert an SD into the logger board. press reset on the logger board. The +error LED connected to pin 3 should not light. + +Press reset on the data source board. The pin 13 LED on the data source +board should light for about 50 seconds at 57600 baud or 25 seconds at +115200 baud while 280,000 bytes are transferred. + +If an error occurs, the error LED on the SD board will flash an error code. +See the SerialPortLogger.ino source for definitions of error codes. + +Remove the SD and check the file SERIAL.BIN. In this case it is a text file. \ No newline at end of file diff --git a/libs/SerialPortBeta20120106/changes.txt b/libs/SerialPort-master/changes.txt similarity index 92% rename from libs/SerialPortBeta20120106/changes.txt rename to libs/SerialPort-master/changes.txt index c9251d7..bb10d9c 100755 --- a/libs/SerialPortBeta20120106/changes.txt +++ b/libs/SerialPort-master/changes.txt @@ -1,3 +1,19 @@ +16 Feb 2014 + +Fix 300 baud problem. + +Fix FreeMem() + +22 Feb 2013 + +Fixed problems with newer versions of avr-gcc. + +Fixed compatibility problems with Arduino 1.5.2 beta. + +Added documentation. + +Code cleanup. + 6 Jan 2012 Made buffer indice type an option (uint8_t or uint16_t) with diff --git a/libs/SerialPort-master/del_htm.bat b/libs/SerialPort-master/del_htm.bat new file mode 100755 index 0000000..2cc8cc5 --- /dev/null +++ b/libs/SerialPort-master/del_htm.bat @@ -0,0 +1,2 @@ +rm -R html/* +pause \ No newline at end of file diff --git a/libs/SerialPortBeta20120106/html/class_serial_port.html b/libs/SerialPort-master/html/a00001.html similarity index 63% rename from libs/SerialPortBeta20120106/html/class_serial_port.html rename to libs/SerialPort-master/html/a00001.html index 015557b..7c2e383 100755 --- a/libs/SerialPortBeta20120106/html/class_serial_port.html +++ b/libs/SerialPort-master/html/a00001.html @@ -2,7 +2,7 @@ -SoftRTClib: SerialPort< PortNumber, RxBufSize, TxBufSize > Class Template Reference +Serial Port: SerialPort< PortNumber, RxBufSize, TxBufSize > Class Template Reference @@ -19,7 +19,7 @@ -
SoftRTClib
+
Serial Port
@@ -63,41 +63,66 @@
-

class for avr hardware USART ports - More...

+

Class for avr hardware USART ports. + More...

-

#include <SerialPort.h>

+

#include <SerialPort.h>

-

List of all members.

+

List of all members.

- - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +

Public Member Functions

int available (void)
void begin (uint32_t baud, uint8_t options=SP_8_BIT_CHAR)
void clearRxError ()
void end ()
void flush ()
void flushRx ()
void flushTx ()
uint8_t getRxError ()
int peek (void)
int read ()
size_t read (uint8_t *b, size_t n)
size_t write (const char *s)
size_t write (uint8_t b)
size_t write (const __FlashStringHelper *s)
size_t write (const uint8_t *b, size_t n)
size_t write_P (PGM_P b, size_t n)
size_t writeln (const char *s)
size_t writeln ()
size_t writeln (const __FlashStringHelper *s)
 SerialPort ()
int available (void)
void begin (uint32_t baud, uint8_t options=SP_8_BIT_CHAR)
void clearRxError ()
void end ()
void flush ()
void flushRx ()
void flushTx ()
uint8_t getRxError ()
int peek (void)
int read ()
size_t read (uint8_t *b, size_t n)
size_t write (const char *s)
size_t write (uint8_t b)
size_t write (const __FlashStringHelper *s)
size_t write (const uint8_t *b, size_t n)
size_t write_P (PGM_P b, size_t n)
size_t writeln (const char *s)
size_t writeln ()
size_t writeln (const __FlashStringHelper *s)

Detailed Description

template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize>
class SerialPort< PortNumber, RxBufSize, TxBufSize >

-

class for avr hardware USART ports

-

Member Function Documentation

+

Class for avr hardware USART ports.

+ +

Definition at line 300 of file SerialPort.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize>
+ + + + + + + +
SerialPort< PortNumber, RxBufSize, TxBufSize >::SerialPort () [inline]
+
+
+

Constructor

+ +

Definition at line 304 of file SerialPort.h.

+ +
+
+

Member Function Documentation

@@ -105,7 +130,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize>
- + @@ -116,6 +141,8 @@
Returns:
The number of bytes (characters) available for reading from the serial port.
+

Definition at line 320 of file SerialPort.h.

+
@@ -125,7 +152,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize>
int SerialPort< PortNumber, RxBufSize, TxBufSize >::available int SerialPort< PortNumber, RxBufSize, TxBufSize >::available ( void  )
- + @@ -134,7 +161,7 @@ - + @@ -147,21 +174,25 @@

Sets the data rate in bits per second (baud) for serial data transmission.

Parameters:
void SerialPort< PortNumber, RxBufSize, TxBufSize >::begin void SerialPort< PortNumber, RxBufSize, TxBufSize >::begin ( uint32_t  baud, uint8_t options = SP_8_BIT_CHAR options = SP_8_BIT_CHAR 
- +
[in]baudrate in bits per second (baud)
[in]baudRate in bits per second (baud).
[in]optionsconstructed by a bitwise-inclusive OR of values from the following list. Choose one value for stop bit, parity, and character size.
-

The default is SP_8_BIT_CHAR which results in one stop bit, no parity, and 8-bit characters.

-

SP_1_STOP_BIT - use one stop bit (default if stop bit not specified)

-

SP_2_STOP_BIT - use two stop bits

-

SP_NO_PARITY - no parity bit (default if parity not specified)

-

SP_EVEN_PARITY - add even parity bit

-

SP_ODD_PARITY - add odd parity bit

-

SP_5_BIT_CHAR - use 5-bit characters (default if size not specified)

-

SP_6_BIT_CHAR - use 6-bit characters

-

SP_7_BIT_CHAR - use 7-bit characters

-

SP_8_BIT_CHAR - use 8-bit characters

+
    +
  • SP_1_STOP_BIT - Use one stop bit (default if stop bit not specified).
  • +
  • SP_2_STOP_BIT - Use two stop bits.
  • +
  • SP_NO_PARITY - No parity bit (default if parity not specified).
  • +
  • SP_EVEN_PARITY - Add even parity bit.
  • +
  • SP_ODD_PARITY - Add odd parity bit.
  • +
  • SP_5_BIT_CHAR - Use 5-bit characters (default if size not specified).
  • +
  • SP_6_BIT_CHAR - Use 6-bit characters.
  • +
  • SP_7_BIT_CHAR - Use 7-bit characters.
  • +
  • SP_8_BIT_CHAR - Use 8-bit characters.
  • +
+

The default is SP_8_BIT_CHAR which results in one stop bit, no parity, and 8-bit characters.

+ +

Definition at line 349 of file SerialPort.h.

@@ -172,7 +203,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -180,7 +211,9 @@
void SerialPort< PortNumber, RxBufSize, TxBufSize >::clearRxError void SerialPort< PortNumber, RxBufSize, TxBufSize >::clearRxError ( ) [inline]
-

clear RX error bits

+

Clear RX error bits.

+ +

Definition at line 388 of file SerialPort.h.

@@ -191,7 +224,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -199,7 +232,9 @@
void SerialPort< PortNumber, RxBufSize, TxBufSize >::end void SerialPort< PortNumber, RxBufSize, TxBufSize >::end ( ) [inline]
-

Disables serial communication, allowing the RX and TX pins to be used for general input and output. To re-enable serial communication, call SerialPort::begin().

+

Disables serial communication, allowing the RX and TX pins to be used for general input and output. To re-enable serial communication, call SerialPort::begin().

+ +

Definition at line 404 of file SerialPort.h.

@@ -210,7 +245,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -218,7 +253,9 @@
void SerialPort< PortNumber, RxBufSize, TxBufSize >::flush void SerialPort< PortNumber, RxBufSize, TxBufSize >::flush ( ) [inline]
-

For Arduino 1.0 and greater call flushTx(). For Arduino 0023 and before call flushRx().

+

For Arduino 1.0 and greater call flushTx().

+ +

Definition at line 418 of file SerialPort.h.

@@ -229,7 +266,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -239,6 +276,8 @@

Discard any buffered incoming serial data.

+

Definition at line 423 of file SerialPort.h.

+
@@ -248,7 +287,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize>
void SerialPort< PortNumber, RxBufSize, TxBufSize >::flushRx void SerialPort< PortNumber, RxBufSize, TxBufSize >::flushRx ( ) [inline]
- + @@ -258,6 +297,8 @@

Waits for the transmission of outgoing serial data to complete.

+

Definition at line 435 of file SerialPort.h.

+
@@ -267,7 +308,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize>
void SerialPort< PortNumber, RxBufSize, TxBufSize >::flushTx void SerialPort< PortNumber, RxBufSize, TxBufSize >::flushTx ( ) [inline]
- + @@ -275,7 +316,15 @@
uint8_t SerialPort< PortNumber, RxBufSize, TxBufSize >::getRxError uint8_t SerialPort< PortNumber, RxBufSize, TxBufSize >::getRxError ( ) [inline]
-
Returns:
RX error bits
+
Returns:
RX error bits. Possible error bits are: +
+ +

Definition at line 396 of file SerialPort.h.

@@ -286,7 +335,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -295,7 +344,9 @@
int SerialPort< PortNumber, RxBufSize, TxBufSize >::peek int SerialPort< PortNumber, RxBufSize, TxBufSize >::peek ( void  )
-
Returns:
the first byte of incoming serial data available or -1 if no data is available. Peek() always return -1 for unbuffered RX.
+
Returns:
The first byte of incoming serial data available or -1 if no data is available. -1 is always returned for unbuffered RX.
+ +

Definition at line 445 of file SerialPort.h.

@@ -306,7 +357,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -315,7 +366,9 @@

Read incoming serial data.

-
Returns:
the first byte of incoming serial data available or -1 if no data is available
+
Returns:
The first byte of incoming serial data available or -1 if no data is available.
+ +

Definition at line 456 of file SerialPort.h.

@@ -326,7 +379,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize>
int SerialPort< PortNumber, RxBufSize, TxBufSize >::read int SerialPort< PortNumber, RxBufSize, TxBufSize >::read ( ) [inline]
- + @@ -348,12 +401,14 @@

Read incoming serial data. Stop when RX buffer is empty or n bytes have been read.

Parameters:
size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::read size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::read ( uint8_t *  b,
- - + +
[in]blocation to receive the data
[in]nmaximum number of bytes to read
[in]bThe location to receive the data.
[in]nMaximum number of bytes to read.
-
Returns:
number of bytes read
+
Returns:
The number of bytes read.
+ +

Definition at line 478 of file SerialPort.h.

@@ -364,7 +419,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -376,11 +431,13 @@

Write a flash string to the serial port.

Parameters:
size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::write size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::write ( const __FlashStringHelper *  s)
- +
[in]sstring to be written.
[in]sThe string to be written.
-
Returns:
number of bytes written to the serial port
+
Returns:
The number of bytes written to the serial port.
+ +

Definition at line 574 of file SerialPort.h.

@@ -391,7 +448,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -403,11 +460,13 @@

Write a string to the serial port.

Parameters:
size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::write size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::write ( const char *  s)
- +
[in]sstring to be written.
[in]sThe string to be written.
-
Returns:
number of bytes written to the serial port
+
Returns:
The number of bytes written to the serial port
+ +

Definition at line 626 of file SerialPort.h.

@@ -418,7 +477,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -440,12 +499,14 @@

Write binary data to the serial port.

Parameters:
size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::write size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::write ( const uint8_t *  b,
- - + +
[in]bbytes to be written
[in]nnumber of bytes to write
[in]bLocation of the bytes to be written.
[in]nThe number of bytes to write.
-
Returns:
number of bytes written to the serial port
+
Returns:
The number of bytes written to the serial port.
+ +

Definition at line 600 of file SerialPort.h.

@@ -456,7 +517,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -468,11 +529,13 @@

Write binary data to the serial port.

Parameters:
size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::write size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::write ( uint8_t  b)
- +
[in]bbyte to be written.
[in]bThe byte to be written.
-
Returns:
number of bytes written to the serial port
+
Returns:
The number of bytes written to the serial port.
+ +

Definition at line 504 of file SerialPort.h.

@@ -483,7 +546,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -505,12 +568,14 @@

Write binary data from flash memory to the serial port.

Parameters:
size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::write_P size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::write_P ( PGM_P  b,
- - + +
[in]bbytes to be written
[in]nnumber of bytes to write
[in]bLocation of the bytes to be written.
[in]nThe number of bytes to write.
-
Returns:
number of bytes written to the serial port
+
Returns:
The number of bytes written to the serial port.
+ +

Definition at line 548 of file SerialPort.h.

@@ -521,7 +586,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -530,14 +595,16 @@
size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::writeln size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::writeln ( const __FlashStringHelper *  s)
-

Write a flash string to the serial port followed by CF LF

+

Write a flash string to the serial port followed by CR/LF.

Parameters:
- +
[in]sstring to be written.
[in]sThe string to be written.
-
Returns:
number of bytes written to the serial port
+
Returns:
The number of bytes written to the serial port.
+ +

Definition at line 587 of file SerialPort.h.

@@ -548,7 +615,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -557,14 +624,16 @@
size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::writeln size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::writeln ( const char *  s)
-

Write a string to the serial port followed by CF LF

+

Write a string to the serial port followed by CR/LF.

Parameters:
- +
[in]sstring to be written.
[in]sThe string to be written.
-
Returns:
number of bytes written to the serial port
+
Returns:
The number of bytes written to the serial port.
+ +

Definition at line 535 of file SerialPort.h.

@@ -575,7 +644,7 @@ template<uint8_t PortNumber, size_t RxBufSize, size_t TxBufSize> - + @@ -583,13 +652,15 @@
size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::writeln size_t SerialPort< PortNumber, RxBufSize, TxBufSize >::writeln ( ) [inline]
-

write CR LF

+

Write CR/LF.

Returns:
2
+

Definition at line 522 of file SerialPort.h.

+

The documentation for this class was generated from the following file: @@ -606,7 +677,7 @@ -