├── .cproject ├── .gitignore ├── Makefile ├── OpenLog_v3_Blackbox ├── .gitignore └── OpenLog_v3_Blackbox.ino ├── Readme.md ├── libs ├── SdFat-master │ ├── .gitattributes │ ├── .gitignore │ ├── AnalogBinLoggerExtras │ │ ├── ADC_ENOB.PNG │ │ ├── ADCdocs │ │ │ ├── ATmegaADCAccuracy.pdf │ │ │ └── ExcelFFT.pdf │ │ ├── AdcErrorStudy.txt │ │ ├── DATA.png │ │ ├── FFT.png │ │ ├── RateTable.txt │ │ ├── bintocsv │ │ │ ├── AnalogBinLogger.h │ │ │ ├── bintocsv.cpp │ │ │ └── bintocsv.exe │ │ └── readme.txt │ ├── ArduinoDue.txt │ ├── MultipleCards.txt │ ├── QuickStart.txt │ ├── SPI_Transactions.txt │ ├── SdFat.html │ ├── SdFat │ │ ├── ArduinoStream.h │ │ ├── MinimumSerial.cpp │ │ ├── MinimumSerial.h │ │ ├── Sd2Card.cpp │ │ ├── Sd2Card.h │ │ ├── SdBaseFile.cpp │ │ ├── SdBaseFile.h │ │ ├── SdBaseFilePrint.cpp │ │ ├── SdFat.cpp │ │ ├── SdFat.h │ │ ├── SdFatConfig.h │ │ ├── SdFatErrorPrint.cpp │ │ ├── SdFatUtil.cpp │ │ ├── SdFatUtil.h │ │ ├── SdFatmainpage.h │ │ ├── SdFile.cpp │ │ ├── SdFile.h │ │ ├── SdInfo.h │ │ ├── SdSpi.h │ │ ├── SdSpiAVR.cpp │ │ ├── SdSpiArduino.cpp │ │ ├── SdSpiSAM3X.cpp │ │ ├── SdSpiSoft.cpp │ │ ├── SdSpiTeensy3.cpp │ │ ├── SdStream.cpp │ │ ├── SdStream.h │ │ ├── SdVolume.cpp │ │ ├── SdVolume.h │ │ ├── StdioStream.cpp │ │ ├── StdioStream.h │ │ ├── bufstream.h │ │ ├── examples │ │ │ ├── #attic │ │ │ │ ├── AnalogLogger │ │ │ │ │ └── AnalogLogger.ino │ │ │ │ ├── HelloWorld │ │ │ │ │ └── HelloWorld.ino │ │ │ │ ├── MiniSerial │ │ │ │ │ └── MiniSerial.ino │ │ │ │ ├── PrintBenchmarkSD │ │ │ │ │ └── PrintBenchmarkSD.ino │ │ │ │ ├── SD_Size │ │ │ │ │ └── SD_Size.ino │ │ │ │ ├── SdFatSize │ │ │ │ │ └── SdFatSize.ino │ │ │ │ ├── TestMkdir │ │ │ │ │ └── TestMkdir.ino │ │ │ │ ├── TestRmdir │ │ │ │ │ └── TestRmdir.ino │ │ │ │ ├── append │ │ │ │ │ └── append.ino │ │ │ │ ├── average │ │ │ │ │ └── average.ino │ │ │ │ ├── benchSD │ │ │ │ │ └── benchSD.ino │ │ │ │ ├── bufstream │ │ │ │ │ └── bufstream.ino │ │ │ │ ├── eventlog │ │ │ │ │ └── eventlog.ino │ │ │ │ ├── fgetsRewrite │ │ │ │ │ └── fgetsRewrite.ino │ │ │ │ ├── readlog │ │ │ │ │ └── readlog.ino │ │ │ │ └── readme.txt │ │ │ ├── AnalogBinLogger │ │ │ │ ├── AnalogBinLogger.h │ │ │ │ └── AnalogBinLogger.ino │ │ │ ├── LowLatencyLogger │ │ │ │ ├── LowLatencyLogger.ino │ │ │ │ └── UserDataType.h │ │ │ ├── OpenNext │ │ │ │ └── OpenNext.ino │ │ │ ├── PrintBenchmark │ │ │ │ └── PrintBenchmark.ino │ │ │ ├── QuickStart │ │ │ │ └── QuickStart.ino │ │ │ ├── RawWrite │ │ │ │ └── RawWrite.ino │ │ │ ├── ReadWriteSdFat │ │ │ │ └── ReadWriteSdFat.ino │ │ │ ├── SdFormatter │ │ │ │ └── SdFormatter.ino │ │ │ ├── SdInfo │ │ │ │ └── SdInfo.ino │ │ │ ├── StdioBench │ │ │ │ └── StdioBench.ino │ │ │ ├── StreamParseInt │ │ │ │ └── StreamParseInt.ino │ │ │ ├── StressTest │ │ │ │ └── StressTest.ino │ │ │ ├── Timestamp │ │ │ │ └── Timestamp.ino │ │ │ ├── TwoCards │ │ │ │ └── TwoCards.ino │ │ │ ├── bench │ │ │ │ └── bench.ino │ │ │ ├── cin_cout │ │ │ │ └── cin_cout.ino │ │ │ ├── dataLogger │ │ │ │ └── dataLogger.ino │ │ │ ├── directoryFunctions │ │ │ │ └── directoryFunctions.ino │ │ │ ├── fgets │ │ │ │ └── fgets.ino │ │ │ ├── formatting │ │ │ │ └── formatting.ino │ │ │ ├── getline │ │ │ │ └── getline.ino │ │ │ ├── readCSV │ │ │ │ └── readCSV.ino │ │ │ └── rename │ │ │ │ └── rename.ino │ │ ├── ios.h │ │ ├── iostream.h │ │ ├── istream.cpp │ │ ├── istream.h │ │ ├── ostream.cpp │ │ ├── ostream.h │ │ └── utility │ │ │ ├── DigitalPin.h │ │ │ ├── FatApiConstants.h │ │ │ ├── FatStructs.h │ │ │ ├── FmtNumber.cpp │ │ │ ├── FmtNumber.h │ │ │ └── SoftSPI.h │ ├── SdFatTestSuite │ │ ├── SdFatTestSuite.cpp │ │ ├── SdFatTestSuite.h │ │ └── examples │ │ │ ├── ATS_SD_File │ │ │ └── ATS_SD_File.ino │ │ │ ├── ATS_SD_Files │ │ │ └── ATS_SD_Files.ino │ │ │ ├── ATS_SD_Seek │ │ │ └── ATS_SD_Seek.ino │ │ │ ├── fstreamTest │ │ │ └── fstreamTest.ino │ │ │ ├── istreamTest │ │ │ └── istreamTest.ino │ │ │ └── ostreamTest │ │ │ └── ostreamTest.ino │ ├── SdLevel.png │ ├── SoftwareSPI.txt │ ├── WorkingDirectory.txt │ ├── changes.txt │ ├── html │ │ ├── _arduino_stream_8h.html │ │ ├── _arduino_stream_8h__dep__incl.png │ │ ├── _arduino_stream_8h__incl.png │ │ ├── _sd2_card_8h.html │ │ ├── _sd2_card_8h__dep__incl.png │ │ ├── _sd2_card_8h__incl.png │ │ ├── _sd_base_file_8h.html │ │ ├── _sd_base_file_8h__dep__incl.png │ │ ├── _sd_base_file_8h__incl.png │ │ ├── _sd_fat_8h.html │ │ ├── _sd_fat_8h__dep__incl.png │ │ ├── _sd_fat_8h__incl.png │ │ ├── _sd_fat_config_8h.html │ │ ├── _sd_fat_config_8h__dep__incl.png │ │ ├── _sd_fat_config_8h__incl.png │ │ ├── _sd_fat_util_8h.html │ │ ├── _sd_fat_util_8h__incl.png │ │ ├── _sd_file_8h.html │ │ ├── _sd_file_8h__dep__incl.png │ │ ├── _sd_file_8h__incl.png │ │ ├── _sd_spi_8h.html │ │ ├── _sd_spi_8h__dep__incl.png │ │ ├── _sd_spi_8h__incl.png │ │ ├── _sd_stream_8h.html │ │ ├── _sd_stream_8h__dep__incl.png │ │ ├── _sd_stream_8h__incl.png │ │ ├── _sd_volume_8h.html │ │ ├── _sd_volume_8h__dep__incl.png │ │ ├── _sd_volume_8h__incl.png │ │ ├── _stdio_stream_8h.html │ │ ├── _stdio_stream_8h__dep__incl.png │ │ ├── _stdio_stream_8h__incl.png │ │ ├── annotated.html │ │ ├── bc_s.png │ │ ├── bdwn.png │ │ ├── bufstream_8h.html │ │ ├── bufstream_8h__dep__incl.png │ │ ├── bufstream_8h__incl.png │ │ ├── class_arduino_in_stream-members.html │ │ ├── class_arduino_in_stream.html │ │ ├── class_arduino_in_stream__coll__graph.png │ │ ├── class_arduino_in_stream__inherit__graph.png │ │ ├── class_arduino_out_stream-members.html │ │ ├── class_arduino_out_stream.html │ │ ├── class_arduino_out_stream__coll__graph.png │ │ ├── class_arduino_out_stream__inherit__graph.png │ │ ├── class_file-members.html │ │ ├── class_file.html │ │ ├── class_file__coll__graph.png │ │ ├── class_file__inherit__graph.png │ │ ├── class_minimum_serial-members.html │ │ ├── class_minimum_serial.html │ │ ├── class_minimum_serial__coll__graph.png │ │ ├── class_minimum_serial__inherit__graph.png │ │ ├── class_sd2_card-members.html │ │ ├── class_sd2_card.html │ │ ├── class_sd_base_file-members.html │ │ ├── class_sd_base_file.html │ │ ├── class_sd_base_file__inherit__graph.png │ │ ├── class_sd_fat-members.html │ │ ├── class_sd_fat.html │ │ ├── class_sd_file-members.html │ │ ├── class_sd_file.html │ │ ├── class_sd_file__coll__graph.png │ │ ├── class_sd_file__inherit__graph.png │ │ ├── class_sd_spi-members.html │ │ ├── class_sd_spi.html │ │ ├── class_sd_stream_base-members.html │ │ ├── class_sd_stream_base.html │ │ ├── class_sd_stream_base__coll__graph.png │ │ ├── class_sd_stream_base__inherit__graph.png │ │ ├── class_sd_volume-members.html │ │ ├── class_sd_volume.html │ │ ├── class_stdio_stream-members.html │ │ ├── class_stdio_stream.html │ │ ├── class_stdio_stream__coll__graph.png │ │ ├── class_stdio_stream__inherit__graph.png │ │ ├── classes.html │ │ ├── classfstream-members.html │ │ ├── classfstream.html │ │ ├── classfstream__coll__graph.png │ │ ├── classfstream__inherit__graph.png │ │ ├── classibufstream-members.html │ │ ├── classibufstream.html │ │ ├── classibufstream__coll__graph.png │ │ ├── classibufstream__inherit__graph.png │ │ ├── classifstream-members.html │ │ ├── classifstream.html │ │ ├── classifstream__coll__graph.png │ │ ├── classifstream__inherit__graph.png │ │ ├── classios-members.html │ │ ├── classios.html │ │ ├── classios__base-members.html │ │ ├── classios__base.html │ │ ├── classios__base__inherit__graph.png │ │ ├── classios__coll__graph.png │ │ ├── classios__inherit__graph.png │ │ ├── classiostream-members.html │ │ ├── classiostream.html │ │ ├── classiostream__coll__graph.png │ │ ├── classiostream__inherit__graph.png │ │ ├── classistream-members.html │ │ ├── classistream.html │ │ ├── classistream__coll__graph.png │ │ ├── classistream__inherit__graph.png │ │ ├── classobufstream-members.html │ │ ├── classobufstream.html │ │ ├── classobufstream__coll__graph.png │ │ ├── classobufstream__inherit__graph.png │ │ ├── classofstream-members.html │ │ ├── classofstream.html │ │ ├── classofstream__coll__graph.png │ │ ├── classofstream__inherit__graph.png │ │ ├── classostream-members.html │ │ ├── classostream.html │ │ ├── classostream__coll__graph.png │ │ ├── classostream__inherit__graph.png │ │ ├── closed.png │ │ ├── dir_1281b15c327061056ab3b326e90c50cf.html │ │ ├── dir_1281b15c327061056ab3b326e90c50cf_dep.png │ │ ├── dir_481cc946b8a81b8d9363a4aad6201160.html │ │ ├── dir_481cc946b8a81b8d9363a4aad6201160_dep.png │ │ ├── dir_a991eec27578c865874ede3d8ec657c2.html │ │ ├── dir_a991eec27578c865874ede3d8ec657c2_dep.png │ │ ├── doxygen.css │ │ ├── doxygen.png │ │ ├── dynsections.js │ │ ├── files.html │ │ ├── ftv2blank.png │ │ ├── ftv2doc.png │ │ ├── ftv2folderclosed.png │ │ ├── ftv2folderopen.png │ │ ├── ftv2lastnode.png │ │ ├── ftv2link.png │ │ ├── ftv2mlastnode.png │ │ ├── ftv2mnode.png │ │ ├── ftv2node.png │ │ ├── ftv2plastnode.png │ │ ├── ftv2pnode.png │ │ ├── ftv2splitbar.png │ │ ├── ftv2vertline.png │ │ ├── functions.html │ │ ├── functions_b.html │ │ ├── functions_c.html │ │ ├── functions_d.html │ │ ├── functions_e.html │ │ ├── functions_enum.html │ │ ├── functions_eval.html │ │ ├── functions_f.html │ │ ├── functions_func.html │ │ ├── functions_func_b.html │ │ ├── functions_func_c.html │ │ ├── functions_func_d.html │ │ ├── functions_func_e.html │ │ ├── functions_func_f.html │ │ ├── functions_func_g.html │ │ ├── functions_func_i.html │ │ ├── functions_func_l.html │ │ ├── functions_func_m.html │ │ ├── functions_func_n.html │ │ ├── functions_func_o.html │ │ ├── functions_func_p.html │ │ ├── functions_func_r.html │ │ ├── functions_func_s.html │ │ ├── functions_func_t.html │ │ ├── functions_func_u.html │ │ ├── functions_func_v.html │ │ ├── functions_func_w.html │ │ ├── functions_g.html │ │ ├── functions_h.html │ │ ├── functions_i.html │ │ ├── functions_l.html │ │ ├── functions_m.html │ │ ├── functions_n.html │ │ ├── functions_o.html │ │ ├── functions_p.html │ │ ├── functions_r.html │ │ ├── functions_s.html │ │ ├── functions_t.html │ │ ├── functions_type.html │ │ ├── functions_u.html │ │ ├── functions_v.html │ │ ├── functions_vars.html │ │ ├── functions_w.html │ │ ├── globals.html │ │ ├── globals_defs.html │ │ ├── globals_func.html │ │ ├── globals_vars.html │ │ ├── graph_legend.html │ │ ├── graph_legend.png │ │ ├── hierarchy.html │ │ ├── index.html │ │ ├── inherit_graph_0.png │ │ ├── inherit_graph_1.png │ │ ├── inherit_graph_10.png │ │ ├── inherit_graph_2.png │ │ ├── inherit_graph_3.png │ │ ├── inherit_graph_4.png │ │ ├── inherit_graph_5.png │ │ ├── inherit_graph_6.png │ │ ├── inherit_graph_7.png │ │ ├── inherit_graph_8.png │ │ ├── inherit_graph_9.png │ │ ├── inherits.html │ │ ├── ios_8h.html │ │ ├── ios_8h__dep__incl.png │ │ ├── ios_8h__incl.png │ │ ├── iostream_8h.html │ │ ├── iostream_8h__dep__incl.png │ │ ├── iostream_8h__incl.png │ │ ├── istream_8h.html │ │ ├── istream_8h__dep__incl.png │ │ ├── istream_8h__incl.png │ │ ├── jquery.js │ │ ├── nav_f.png │ │ ├── nav_g.png │ │ ├── nav_h.png │ │ ├── open.png │ │ ├── ostream_8h.html │ │ ├── ostream_8h__dep__incl.png │ │ ├── ostream_8h__incl.png │ │ ├── struct_fat_pos__t-members.html │ │ ├── struct_fat_pos__t.html │ │ ├── structpgm-members.html │ │ ├── structpgm.html │ │ ├── structsetfill-members.html │ │ ├── structsetfill.html │ │ ├── structsetprecision-members.html │ │ ├── structsetprecision.html │ │ ├── structsetw-members.html │ │ ├── structsetw.html │ │ ├── sync_off.png │ │ ├── sync_on.png │ │ ├── tab_a.png │ │ ├── tab_b.png │ │ ├── tab_h.png │ │ ├── tab_s.png │ │ ├── tabs.css │ │ ├── unioncache__t-members.html │ │ └── unioncache__t.html │ ├── readme.txt │ └── troubleshooting.txt └── SerialPort-master │ ├── .gitattributes │ ├── .gitignore │ ├── Doxyfile │ ├── MainPage │ └── SerialPortMainPage.h │ ├── SerialPort.html │ ├── SerialPort │ ├── SerialPort.cpp │ ├── SerialPort.h │ └── examples │ │ ├── ArduinoSize │ │ ├── ArduinoSize.ino │ │ └── FreeRam.h │ │ ├── ArduinoTest │ │ └── ArduinoTest.ino │ │ ├── BufferedSize │ │ ├── BufferedSize.ino │ │ └── FreeRam.h │ │ ├── BufferedTest │ │ └── BufferedTest.ino │ │ ├── HelloWorld │ │ └── HelloWorld.ino │ │ ├── MegaTest │ │ └── MegaTest.ino │ │ ├── MegaTestArduino │ │ └── MegaTestArduino.ino │ │ ├── ReadWriteTest │ │ └── ReadWriteTest.ino │ │ ├── UnbufferedSize │ │ ├── FreeRam.h │ │ └── UnbufferedSize.ino │ │ ├── UnbufferedTest │ │ └── UnbufferedTest.ino │ │ └── WriteFlash │ │ └── WriteFlash.ino │ ├── SerialPortLogger │ ├── SerialDataSource.ino │ ├── SerialPortLogger.ino │ └── readme.txt │ ├── changes.txt │ ├── del_htm.bat │ ├── html │ ├── a00001.html │ ├── a00002.html │ ├── a00003.html │ ├── a00004.html │ ├── a00004_source.html │ ├── a00005.html │ ├── a00005_source.html │ ├── a00006_source.html │ ├── a00009.html │ ├── a00010.html │ ├── a00011.html │ ├── annotated.html │ ├── bc_s.png │ ├── classes.html │ ├── closed.png │ ├── doxygen.css │ ├── doxygen.png │ ├── files.html │ ├── functions.html │ ├── functions_func.html │ ├── functions_type.html │ ├── functions_vars.html │ ├── globals.html │ ├── globals_defs.html │ ├── globals_func.html │ ├── globals_vars.html │ ├── index.html │ ├── installdox │ ├── jquery.js │ ├── nav_f.png │ ├── nav_h.png │ ├── open.png │ ├── search │ │ ├── all_61.html │ │ ├── all_62.html │ │ ├── all_63.html │ │ ├── all_65.html │ │ ├── all_66.html │ │ ├── all_67.html │ │ ├── all_69.html │ │ ├── all_70.html │ │ ├── all_72.html │ │ ├── all_73.html │ │ ├── all_74.html │ │ ├── all_75.html │ │ ├── all_77.html │ │ ├── classes_73.html │ │ ├── classes_75.html │ │ ├── close.png │ │ ├── defines_61.html │ │ ├── defines_62.html │ │ ├── defines_65.html │ │ ├── defines_73.html │ │ ├── defines_75.html │ │ ├── files_73.html │ │ ├── functions_61.html │ │ ├── functions_62.html │ │ ├── functions_63.html │ │ ├── functions_65.html │ │ ├── functions_66.html │ │ ├── functions_67.html │ │ ├── functions_69.html │ │ ├── functions_70.html │ │ ├── functions_72.html │ │ ├── functions_73.html │ │ ├── functions_77.html │ │ ├── mag_sel.png │ │ ├── nomatches.html │ │ ├── search.css │ │ ├── search.js │ │ ├── search_l.png │ │ ├── search_m.png │ │ ├── search_r.png │ │ ├── typedefs_62.html │ │ ├── variables_72.html │ │ ├── variables_73.html │ │ ├── variables_74.html │ │ └── variables_75.html │ ├── tab_a.png │ ├── tab_b.png │ ├── tab_h.png │ ├── tab_s.png │ └── tabs.css │ └── readme.txt └── utils ├── .gitignore ├── Makefile └── src ├── blackbox_bench.c ├── serial.c └── serial.h /.gitignore: -------------------------------------------------------------------------------- 1 | /.project 2 | /.cproject 3 | /.settings -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: openlog_blackbox.zip 2 | 3 | openlog_blackbox.zip : Readme.md OpenLog_v3_Blackbox/OpenLog_v3_Blackbox.ino OpenLog_v3_Blackbox/OpenLog_v3_Blackbox.cpp.hex 4 | zip $@ $^ -r libs/ 5 | 6 | clean: 7 | rm openlog_blackbox.zip -------------------------------------------------------------------------------- /OpenLog_v3_Blackbox/.gitignore: -------------------------------------------------------------------------------- 1 | /OpenLog_v3_Blackbox.cpp.hex 2 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Blackbox firmware for the OpenLog 2 | 3 | This modified version of [OpenLog 3 Light][] modifies the "CONFIG.TXT" system that is normally used to configure the 4 | OpenLog in order to simplify the available settings and ensure it is compatible with the Blackbox. The only available 5 | setting in CONFIG.TXT is the baud rate, which defaults to 115200. 6 | 7 | You will find a zip file containing the required libraries, the source-code and the compiled hex file on the "releases" page above. 8 | 9 | You'll need to copy the required libraries to your Arduino IDE's library path in order to build this from 10 | 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/`.) 11 | 12 | To flash the firmware to the OpenLog, you can use an FTDI programmer like the [FTDI Basic Breakout][] along with some 13 | way of switching the Tx and Rx pins over (since the OpenLog has them switched) like the [FTDI crossover][] . 14 | 15 | If you are using the FTDI USB to TTL cable you must also connect the DTR/RTS pin (green wire in my cable) to the hole labeled "GRN" on the OpenLog. This is what Arduino uses to cause a reset on the processor so programming can begin. 16 | 17 | In the Arduino IDE, choose the "Arduino Uno" as your board and select your serial port (if you use an FTDI cable) or 18 | your programmer if you're using one. Then click Sketch -> Verify/Compile and File -> Upload (if using FTDI do not choose upload using programmer) to send it to the OpenLog. 19 | 20 | [OpenLog 3 Light]: https://github.com/sparkfun/OpenLog/tree/master/firmware/OpenLog_v3_Light 21 | [FTDI Basic Breakout]: https://www.sparkfun.com/products/9716 22 | [FTDI crossover]: https://www.sparkfun.com/products/10660 23 | [1.0.6]: http://arduino.cc/en/Main/Software#toc2 24 | -------------------------------------------------------------------------------- /libs/SdFat-master/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /libs/SdFat-master/AnalogBinLoggerExtras/ADC_ENOB.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/AnalogBinLoggerExtras/ADC_ENOB.PNG -------------------------------------------------------------------------------- /libs/SdFat-master/AnalogBinLoggerExtras/ADCdocs/ATmegaADCAccuracy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/AnalogBinLoggerExtras/ADCdocs/ATmegaADCAccuracy.pdf -------------------------------------------------------------------------------- /libs/SdFat-master/AnalogBinLoggerExtras/ADCdocs/ExcelFFT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/AnalogBinLoggerExtras/ADCdocs/ExcelFFT.pdf -------------------------------------------------------------------------------- /libs/SdFat-master/AnalogBinLoggerExtras/DATA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/AnalogBinLoggerExtras/DATA.png -------------------------------------------------------------------------------- /libs/SdFat-master/AnalogBinLoggerExtras/FFT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/AnalogBinLoggerExtras/FFT.png -------------------------------------------------------------------------------- /libs/SdFat-master/AnalogBinLoggerExtras/RateTable.txt: -------------------------------------------------------------------------------- 1 | Maximum Sample Rate Table 2 | 3 | ADC clock kHz 4 | 125 250 500 1000 5 | pins 6 | 1 7692 14286 25000 40000 7 | 2 3810 6667 11111 16667 8 | 3 2572 4790 8421 13559 9 | 4 1942 3636 6452 10526 10 | 5 1559 2930 5229 8602 11 | 6 1303 2454 4396 7273 12 | 7 1119 2111 3791 6299 13 | 8 980 1852 3333 5556 14 | 9 872 1649 2974 4969 15 | 10 786 1487 2685 4494 16 | 11 715 1354 2446 4103 17 | 12 656 1242 2247 3774 18 | 13 606 1148 2078 3493 19 | 14 563 1067 1932 3252 20 | 15 525 996 1806 3042 21 | 16 493 935 1695 2857 22 | -------------------------------------------------------------------------------- /libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/AnalogBinLogger.h: -------------------------------------------------------------------------------- 1 | #ifndef AnalogBinLogger_h 2 | #define AnalogBinLogger_h 3 | //------------------------------------------------------------------------------ 4 | // First block of file. 5 | struct metadata_t { 6 | unsigned long adcFrequency; // ADC clock frequency 7 | unsigned long cpuFrequency; // CPU clock frequency 8 | unsigned long sampleInterval; // Sample interval in CPU cycles. 9 | unsigned long recordEightBits; // Size of ADC values, nonzero for 8-bits. 10 | unsigned long pinCount; // Number of analog pins in a sample. 11 | unsigned long pinNumber[123]; // List of pin numbers in a sample. 12 | }; 13 | //------------------------------------------------------------------------------ 14 | // Data block for 8-bit ADC mode. 15 | const size_t DATA_DIM8 = 508; 16 | struct block8_t { 17 | unsigned short count; // count of data bytes 18 | unsigned short overrun; // count of overruns since last block 19 | unsigned char data[DATA_DIM8]; 20 | }; 21 | //------------------------------------------------------------------------------ 22 | // Data block for 10-bit ADC mode. 23 | const size_t DATA_DIM16 = 254; 24 | struct block16_t { 25 | unsigned short count; // count of data bytes 26 | unsigned short overrun; // count of overruns since last block 27 | unsigned short data[DATA_DIM16]; 28 | }; 29 | //------------------------------------------------------------------------------ 30 | // Data block for PC use 31 | struct adcdata_t { 32 | unsigned short count; // count of data bytes 33 | unsigned short overrun; // count of overruns since last block 34 | union { 35 | unsigned char u8[DATA_DIM8]; 36 | unsigned short u16[DATA_DIM16]; 37 | } data; 38 | }; 39 | #endif // AnalogBinLogger_h -------------------------------------------------------------------------------- /libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/bintocsv.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "AnalogBinLogger.h" 3 | FILE *source; 4 | FILE *destination; 5 | int count = 0; 6 | 7 | int main(int argc, char** argv) { 8 | metadata_t meta; 9 | adcdata_t adc; 10 | // Make sure no padding/size problems. 11 | if (sizeof(meta) != 512 || sizeof(adc) != 512) { 12 | printf("block size error\n"); 13 | return 0; 14 | } 15 | if (argc != 3) { 16 | printf("missing arguments:\n"); 17 | printf("%s binFile csvFile\n", argv[0]); 18 | return 0; 19 | } 20 | source = fopen(argv[1], "rb"); 21 | if (!source) { 22 | printf("open failed for %s\n", argv[1]); 23 | return 0; 24 | } 25 | if (fread(&meta, sizeof(meta), 1, source) != 1) { 26 | printf("read meta data failed\n"); 27 | return 0; 28 | } 29 | if ( meta.pinCount == 0 30 | || meta.pinCount > (sizeof(meta.pinNumber)/sizeof(meta.pinNumber[0])) 31 | || meta.adcFrequency < 50000 || meta.adcFrequency > 4000000) { 32 | printf("Invalid meta data\n"); 33 | return 0; 34 | } 35 | destination = fopen(argv[2], "w"); 36 | if (!destination) { 37 | printf("open failed for %s\n", argv[2]); 38 | return 0; 39 | } 40 | int pinCount = meta.pinCount; 41 | printf("pinCount: %d\n", pinCount); 42 | printf("Sample pins:"); 43 | for (unsigned i = 0; i < meta.pinCount; i++) { 44 | printf(" %d", meta.pinNumber[i]); 45 | } 46 | printf("\n"); 47 | printf("ADC clock rate: %g kHz\n", 0.001*meta.adcFrequency); 48 | float sampleInterval = (float)meta.sampleInterval/(float)meta.cpuFrequency; 49 | printf("Sample rate: %g per sec\n", 1.0/sampleInterval); 50 | printf("Sample interval: %.4f usec\n", 1.0e6*sampleInterval); 51 | 52 | fprintf(destination, "Interval,%.4f,usec\n", 1.0e6*sampleInterval); 53 | // Write header with pin numbers 54 | for (int i = 0; i < ((int)meta.pinCount - 1); i++) { 55 | fprintf(destination, "pin%d,", meta.pinNumber[i]); 56 | } 57 | fprintf(destination, "pin%d\n", meta.pinNumber[meta.pinCount - 1]); 58 | unsigned maxCount = meta.recordEightBits ? DATA_DIM8 : DATA_DIM16; 59 | while (!feof(source)) { 60 | if (fread(&adc, sizeof(adc), 1, source) != 1) break; 61 | if (adc.count > maxCount) { 62 | printf("****Invalid data block****\n"); 63 | return 0; 64 | } 65 | if (adc.overrun) { 66 | fprintf(destination, "Overruns,%d\n", adc.overrun); 67 | } 68 | for (int i = 0; i < adc.count; i++) { 69 | unsigned value = meta.recordEightBits ? adc.data.u8[i] : adc.data.u16[i]; 70 | if ((i + 1)%pinCount) { 71 | fprintf(destination, "%d,", value); 72 | } else { 73 | fprintf(destination, "%d\n", value); 74 | } 75 | } 76 | count += adc.count; 77 | } 78 | printf("%d ADC values read\n", count); 79 | fclose(source); 80 | fclose(destination); 81 | return 0; 82 | } -------------------------------------------------------------------------------- /libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/bintocsv.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/AnalogBinLoggerExtras/bintocsv/bintocsv.exe -------------------------------------------------------------------------------- /libs/SdFat-master/ArduinoDue.txt: -------------------------------------------------------------------------------- 1 | Support has been added for the Arduino Due. 2 | 3 | You must connect your SD socket to the 6-pin "ISP connector". You must have short 4 | wires or a custom shield to run at full speed, 42 MHz. 5 | 6 | If you have problems use a lower SPI speed. You can also check for SPI 7 | errors by editing SdFatCobfig.h to enable CRC checking. 8 | 9 | You should be be able to use any digital pin for SD chip select. The default 10 | pin is SS which is pin 10 for Due. 11 | 12 | The default SPI rate is 42 MHz. You can set SD chip select and the SPI rate 13 | by calling: 14 | 15 | bool SdFat::begin(uint8_t chipSelectPin, uint8_t spiRateID); 16 | 17 | The second argument, spiRateID, sets the SCK rate and can be these symbols: 18 | 19 | SPI_FULL_SPEED - 42 MHz 20 | 21 | SPI_DIV3_SPEED - 28 MHz 22 | 23 | SPI_HALF_SPEED - 21 MHz 24 | 25 | SPI_DIV6_SPEED - 14 MHz 26 | 27 | SPI_QUARTER_SPEED 10.5 MHz 28 | 29 | SPI_EIGHTH_SPEED 5.25 MHz 30 | 31 | Large reads and writes use fast multi-block SD read/write commands. For optimal 32 | speed, use records that are a multiple of 512 bytes. 33 | 34 | Run the bench.ino example to explore large read/write speed. 35 | 36 | Replace this line: 37 | 38 | #define BUF_SIZE 100 39 | 40 | With a large size like this: 41 | 42 | #define BUF_SIZE 8192 43 | 44 | For best results the record size should be a power of two (512, 1024, 2048, 45 | 4096, 8192). In this case records will be aligned with FAT cluster boundaries. 46 | 47 | Since Due is fast, increase the test file size by editing this line: 48 | 49 | #define FILE_SIZE_MB 5 50 | 51 | Run the PrintBenchmark.ino example to compare text formatting speed of Due 52 | with AVR boards. 53 | 54 | A number of options are available to configure SPI for the Due board. 55 | 56 | You can use the standard SPI.h library by editing SdFatConfig.h and set 57 | USE_ARDUINO_SPI_LIBRARY nonzero. You must include SPI.h in your sketch. 58 | 59 | Several options can be set in Sd2Card.cpp in the USE_NATIVE_SAM3X_SPI 60 | section. These include USE_SAM3X_DMAC to control use of DMA and 61 | USE_SAM3X_BUS_MATRIX_FIX to change Bus Matrix operation. Most people 62 | will not need to change these. -------------------------------------------------------------------------------- /libs/SdFat-master/MultipleCards.txt: -------------------------------------------------------------------------------- 1 | SdFat has support for multiple SD cards. This requires multiple instances 2 | of SdFat objects. 3 | 4 | You must edit SdFatConfig.h to enable multiple instances of SdFat. Set 5 | USE_MULTIPLE_CARDS nonzero like this: 6 | 7 | #define USE_MULTIPLE_CARDS 1 8 | 9 | Look at TwoCards.pde in the SdFat/examples folder. This example demonstrates 10 | use of two SD cards. 11 | 12 | Read WorkingDirectory.txt for more information on volume working 13 | directories and the current working directory. 14 | -------------------------------------------------------------------------------- /libs/SdFat-master/QuickStart.txt: -------------------------------------------------------------------------------- 1 | For those who don't like too much documentation. 2 | 3 | To use this library place the SdFat folder into the libraries 4 | subfolder in your main sketches folder. You may need to 5 | create the libraries folder. Restart the Arduino IDE if 6 | it was open. 7 | 8 | Run the QuickStart.ino sketch from the 9 | libraries/SdFat/examples/QuickStart folder. Click the 10 | IDE up-arrow icon then -> libraries -> SdFat -> QuickStart. 11 | 12 | You can also click File -> Examples -> SdFat -> QuickStart. 13 | 14 | If problems occur try reading more documentation and use these 15 | forums for help: 16 | 17 | http://forums.adafruit.com/ 18 | 19 | http://arduino.cc/forum/ 20 | 21 | If QuickStart.ino runs successfully try more examples. 22 | -------------------------------------------------------------------------------- /libs/SdFat-master/SPI_Transactions.txt: -------------------------------------------------------------------------------- 1 | To enable support for SPI transactions, edit SfFatCinfig.h and modify these 2 | defines. 3 | 4 | //------------------------------------------------------------------------------ 5 | /** 6 | * Set ENABLE_SPI_TRANSACTION nonzero to enable the SPI transaction feature 7 | * of the standard Arduino SPI library. You must include SPI.h in your 8 | * sketches when ENABLE_SPI_TRANSACTION is nonzero. 9 | */ 10 | #define ENABLE_SPI_TRANSACTION 0 11 | //------------------------------------------------------------------------------ 12 | /** 13 | * Set ENABLE_SPI_YIELD nonzero to enable release of the SPI bus during 14 | * SD card busy waits. 15 | * 16 | * This will allow interrupt routines to access the SPI bus if 17 | * ENABLE_SPI_TRANSACTION is nonzero. 18 | * 19 | * Setting ENABLE_SPI_YIELD will introduce some extra overhead and will 20 | * slightly slow transfer rates. A few older SD cards may fail when 21 | * ENABLE_SPI_YIELD is nonzero. 22 | */ 23 | #define ENABLE_SPI_YIELD 0 -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | A web page that points a browser to a different page 4 | 5 | 6 | 7 | 8 | Your browser didn't automatically redirect. Open html/index.html manually. 9 | 10 | 11 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/MinimumSerial.cpp: -------------------------------------------------------------------------------- 1 | /* Arduino SdFat Library 2 | * Copyright (C) 2012 by William Greiman 3 | * 4 | * This file is part of the Arduino SdFat Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with the Arduino SdFat Library. If not, see 18 | * . 19 | */ 20 | #include 21 | #if defined(UDR0) || defined(DOXYGEN) 22 | #include 23 | //------------------------------------------------------------------------------ 24 | /** 25 | * Set baud rate for serial port zero and enable in non interrupt mode. 26 | * Do not call this function if you use another serial library. 27 | * \param[in] baud rate 28 | */ 29 | void MinimumSerial::begin(uint32_t baud) { 30 | uint16_t baud_setting; 31 | // don't worry, the compiler will squeeze out F_CPU != 16000000UL 32 | if (F_CPU != 16000000UL || baud != 57600) { 33 | // Double the USART Transmission Speed 34 | UCSR0A = 1 << U2X0; 35 | baud_setting = (F_CPU / 4 / baud - 1) / 2; 36 | } else { 37 | // hardcoded exception for compatibility with the bootloader shipped 38 | // with the Duemilanove and previous boards and the firmware on the 8U2 39 | // on the Uno and Mega 2560. 40 | UCSR0A = 0; 41 | baud_setting = (F_CPU / 8 / baud - 1) / 2; 42 | } 43 | // assign the baud_setting 44 | UBRR0H = baud_setting >> 8; 45 | UBRR0L = baud_setting; 46 | // enable transmit and receive 47 | UCSR0B |= (1 << TXEN0) | (1 << RXEN0); 48 | } 49 | //------------------------------------------------------------------------------ 50 | /** 51 | * Unbuffered read 52 | * \return -1 if no character is available or an available character. 53 | */ 54 | int MinimumSerial::read() { 55 | if (UCSR0A & (1 << RXC0)) return UDR0; 56 | return -1; 57 | } 58 | //------------------------------------------------------------------------------ 59 | /** 60 | * Unbuffered write 61 | * 62 | * \param[in] b byte to write. 63 | * \return 1 64 | */ 65 | size_t MinimumSerial::write(uint8_t b) { 66 | while (((1 << UDRIE0) & UCSR0B) || !(UCSR0A & (1 << UDRE0))) {} 67 | UDR0 = b; 68 | return 1; 69 | } 70 | MinimumSerial MiniSerial; 71 | #endif // defined(UDR0) || defined(DOXYGEN) 72 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/MinimumSerial.h: -------------------------------------------------------------------------------- 1 | /* Arduino SdFat Library 2 | * Copyright (C) 2012 by William Greiman 3 | * 4 | * This file is part of the Arduino SdFat Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with the Arduino SdFat Library. If not, see 18 | * . 19 | */ 20 | #ifndef MinimumSerial_h 21 | #define MinimumSerial_h 22 | /** 23 | * \class MinimumSerial 24 | * \brief mini serial class for the %SdFat library. 25 | */ 26 | class MinimumSerial : public Print { 27 | public: 28 | void begin(uint32_t baud); 29 | int read(); 30 | size_t write(uint8_t b); 31 | using Print::write; 32 | }; 33 | #ifdef UDR0 34 | extern MinimumSerial MiniSerial; 35 | #endif // UDR0 36 | #endif // MinimumSerial_h 37 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/SdFatUtil.cpp: -------------------------------------------------------------------------------- 1 | /* Arduino SdFat Library 2 | * Copyright (C) 2012 by William Greiman 3 | * 4 | * This file is part of the Arduino SdFat Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | 16 | * You should have received a copy of the GNU General Public License 17 | * along with the Arduino SdFat Library. If not, see 18 | * . 19 | */ 20 | #include 21 | #include 22 | #include 23 | #ifdef __arm__ 24 | // should use uinstd.h to define sbrk but Due causes a conflict 25 | extern "C" char* sbrk(int incr); 26 | #else // __ARM__ 27 | extern char *__brkval; 28 | extern char __bss_end; 29 | #endif // __arm__ 30 | //------------------------------------------------------------------------------ 31 | /** Amount of free RAM 32 | * \return The number of free bytes. 33 | */ 34 | int SdFatUtil::FreeRam() { 35 | char top; 36 | #ifdef __arm__ 37 | return &top - reinterpret_cast(sbrk(0)); 38 | #else // __arm__ 39 | return __brkval ? &top - __brkval : &top - &__bss_end; 40 | #endif // __arm__ 41 | } 42 | //------------------------------------------------------------------------------ 43 | /** %Print a string in flash memory. 44 | * 45 | * \param[in] pr Print object for output. 46 | * \param[in] str Pointer to string stored in flash memory. 47 | */ 48 | void SdFatUtil::print_P(Print* pr, PGM_P str) { 49 | for (uint8_t c; (c = pgm_read_byte(str)); str++) pr->write(c); 50 | } 51 | //------------------------------------------------------------------------------ 52 | /** %Print a string in flash memory followed by a CR/LF. 53 | * 54 | * \param[in] pr Print object for output. 55 | * \param[in] str Pointer to string stored in flash memory. 56 | */ 57 | void SdFatUtil::println_P(Print* pr, PGM_P str) { 58 | print_P(pr, str); 59 | pr->println(); 60 | } 61 | //------------------------------------------------------------------------------ 62 | /** %Print a string in flash memory to Serial. 63 | * 64 | * \param[in] str Pointer to string stored in flash memory. 65 | */ 66 | void SdFatUtil::SerialPrint_P(PGM_P str) { 67 | print_P(SdFat::stdOut(), str); 68 | } 69 | //------------------------------------------------------------------------------ 70 | /** %Print a string in flash memory to Serial followed by a CR/LF. 71 | * 72 | * \param[in] str Pointer to string stored in flash memory. 73 | */ 74 | void SdFatUtil::SerialPrintln_P(PGM_P str) { 75 | println_P(SdFat::stdOut(), str); 76 | } 77 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/SdFatUtil.h: -------------------------------------------------------------------------------- 1 | /* Arduino SdFat Library 2 | * Copyright (C) 2012 by William Greiman 3 | * 4 | * This file is part of the Arduino SdFat Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | 16 | * You should have received a copy of the GNU General Public License 17 | * along with the Arduino SdFat Library. If not, see 18 | * . 19 | */ 20 | #ifndef SdFatUtil_h 21 | #define SdFatUtil_h 22 | /** 23 | * \file 24 | * \brief Useful utility functions. 25 | */ 26 | #include 27 | /** Store and print a string in flash memory.*/ 28 | #define PgmPrint(x) SerialPrint_P(PSTR(x)) 29 | /** Store and print a string in flash memory followed by a CR/LF.*/ 30 | #define PgmPrintln(x) SerialPrintln_P(PSTR(x)) 31 | 32 | namespace SdFatUtil { 33 | int FreeRam(); 34 | void print_P(Print* pr, PGM_P str); 35 | void println_P(Print* pr, PGM_P str); 36 | void SerialPrint_P(PGM_P str); 37 | void SerialPrintln_P(PGM_P str); 38 | } 39 | using namespace SdFatUtil; // NOLINT 40 | #endif // #define SdFatUtil_h 41 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/SdSpiAVR.cpp: -------------------------------------------------------------------------------- 1 | /* Arduino SdSpi Library 2 | * Copyright (C) 2013 by William Greiman 3 | * 4 | * This file is part of the Arduino SdSpi Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with the Arduino SdSpi Library. If not, see 18 | * . 19 | */ 20 | #include 21 | #if USE_NATIVE_AVR_SPI 22 | //------------------------------------------------------------------------------ 23 | void SdSpi::begin() { 24 | // set SS high - may be chip select for another SPI device 25 | digitalWrite(SS, HIGH); 26 | 27 | // SS must be in output mode even it is not chip select 28 | pinMode(SS, OUTPUT); 29 | pinMode(MISO, INPUT); 30 | pinMode(MOSI, OUTPUT); 31 | pinMode(SCK, OUTPUT); 32 | } 33 | //------------------------------------------------------------------------------ 34 | void SdSpi::init(uint8_t sckDivisor) { 35 | uint8_t r = 0; 36 | 37 | for (uint8_t b = 2; sckDivisor > b && r < 6; b <<= 1, r++) {} 38 | // See avr processor documentation 39 | SPCR = (1 << SPE) | (1 << MSTR) | (r >> 1); 40 | SPSR = r & 1 || r == 6 ? 0 : 1 << SPI2X; 41 | } 42 | #if !USE_AVR_NATIVE_SPI_INLINE 43 | //------------------------------------------------------------------------------ 44 | uint8_t SdSpi::receive() { 45 | SPDR = 0XFF; 46 | while (!(SPSR & (1 << SPIF))) {} 47 | return SPDR; 48 | } 49 | //------------------------------------------------------------------------------ 50 | uint8_t SdSpi::receive(uint8_t* buf, size_t n) { 51 | if (n-- == 0) return 0; 52 | SPDR = 0XFF; 53 | for (size_t i = 0; i < n; i++) { 54 | while (!(SPSR & (1 << SPIF))) {} 55 | uint8_t b = SPDR; 56 | SPDR = 0XFF; 57 | buf[i] = b; 58 | } 59 | while (!(SPSR & (1 << SPIF))) {} 60 | buf[n] = SPDR; 61 | return 0; 62 | } 63 | //------------------------------------------------------------------------------ 64 | void SdSpi::send(uint8_t data) { 65 | SPDR = data; 66 | while (!(SPSR & (1 << SPIF))) {} 67 | } 68 | //------------------------------------------------------------------------------ 69 | void SdSpi::send(const uint8_t* buf , size_t n) { 70 | if (n == 0) return; 71 | SPDR = buf[0]; 72 | if (n > 1) { 73 | uint8_t b = buf[1]; 74 | size_t i = 2; 75 | while (1) { 76 | while (!(SPSR & (1 << SPIF))) {} 77 | SPDR = b; 78 | if (i == n) break; 79 | b = buf[i++]; 80 | } 81 | } 82 | while (!(SPSR & (1 << SPIF))) {} 83 | } 84 | #endif // !USE_AVR_NATIVE_SPI_INLINE 85 | #endif // USE_NATIVE_AVR_SPI 86 | 87 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/SdSpiArduino.cpp: -------------------------------------------------------------------------------- 1 | /* Arduino SdSpi Library 2 | * Copyright (C) 2013 by William Greiman 3 | * 4 | * This file is part of the Arduino SdSpi Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with the Arduino SdSpi Library. If not, see 18 | * . 19 | */ 20 | #include 21 | #if USE_ARDUINO_SPI_LIBRARY 22 | #include 23 | //------------------------------------------------------------------------------ 24 | void SdSpi::begin() { 25 | SPI.begin(); 26 | } 27 | //------------------------------------------------------------------------------ 28 | void SdSpi::init(uint8_t sckDivisor) { 29 | SPI.setBitOrder(MSBFIRST); 30 | SPI.setDataMode(SPI_MODE0); 31 | #ifndef SPI_CLOCK_DIV128 32 | SPI.setClockDivider(sckDivisor); 33 | #else // SPI_CLOCK_DIV128 34 | int v; 35 | if (sckDivisor <= 2) v = SPI_CLOCK_DIV2; 36 | else if (sckDivisor <= 4) v = SPI_CLOCK_DIV4; 37 | else if (sckDivisor <= 8) v = SPI_CLOCK_DIV8; 38 | else if (sckDivisor <= 16) v = SPI_CLOCK_DIV16; 39 | else if (sckDivisor <= 32) v = SPI_CLOCK_DIV32; 40 | else if (sckDivisor <= 64) v = SPI_CLOCK_DIV64; 41 | else v = SPI_CLOCK_DIV128; 42 | SPI.setClockDivider(v); 43 | #endif // SPI_CLOCK_DIV128 44 | } 45 | //------------------------------------------------------------------------------ 46 | /** SPI receive a byte */ 47 | uint8_t SdSpi::receive() { 48 | return SPI.transfer(0XFF); 49 | } 50 | //------------------------------------------------------------------------------ 51 | /** SPI receive multiple bytes */ 52 | uint8_t SdSpi::receive(uint8_t* buf, size_t n) { 53 | for (size_t i = 0; i < n; i++) { 54 | buf[i] = SPI.transfer(0XFF); 55 | } 56 | return 0; 57 | } 58 | //------------------------------------------------------------------------------ 59 | /** SPI send a byte */ 60 | void SdSpi::send(uint8_t b) { 61 | SPI.transfer(b); 62 | } 63 | //------------------------------------------------------------------------------ 64 | /** SPI send multiple bytes */ 65 | void SdSpi::send(const uint8_t* buf , size_t n) { 66 | for (size_t i = 0; i < n; i++) { 67 | SPI.transfer(buf[i]); 68 | } 69 | } 70 | #endif // USE_ARDUINO_SPI_LIBRARY 71 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/SdSpiSoft.cpp: -------------------------------------------------------------------------------- 1 | /* Arduino SdSpi Library 2 | * Copyright (C) 2013 by William Greiman 3 | * 4 | * This file is part of the Arduino SdSpi Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with the Arduino SdSpi Library. If not, see 18 | * . 19 | */ 20 | #include 21 | #if USE_SOFTWARE_SPI 22 | #include 23 | static 24 | SoftSPI softSpiBus; 25 | //------------------------------------------------------------------------------ 26 | /** 27 | * initialize SPI pins 28 | */ 29 | void SdSpi::begin() { 30 | softSpiBus.begin(); 31 | } 32 | //------------------------------------------------------------------------------ 33 | /** 34 | * Initialize hardware SPI - dummy for soft SPI 35 | */ 36 | void SdSpi::init(uint8_t sckDivisor) {} 37 | //------------------------------------------------------------------------------ 38 | /** Soft SPI receive byte */ 39 | uint8_t SdSpi::receive() { 40 | return softSpiBus.receive(); 41 | } 42 | //------------------------------------------------------------------------------ 43 | /** Soft SPI read data */ 44 | uint8_t SdSpi::receive(uint8_t* buf, size_t n) { 45 | for (size_t i = 0; i < n; i++) { 46 | buf[i] = receive(); 47 | } 48 | return 0; 49 | } 50 | //------------------------------------------------------------------------------ 51 | /** Soft SPI send byte */ 52 | void SdSpi::send(uint8_t data) { 53 | softSpiBus.send(data); 54 | } 55 | //------------------------------------------------------------------------------ 56 | void SdSpi::send(const uint8_t* buf , size_t n) { 57 | for (size_t i = 0; i < n; i++) { 58 | send(buf[i]); 59 | } 60 | } 61 | #endif // USE_SOFTWARE_SPI -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/HelloWorld/HelloWorld.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // create a serial output stream 4 | ArduinoOutStream cout(Serial); 5 | 6 | void setup() { 7 | Serial.begin(9600); 8 | 9 | while (!Serial) {} // wait for Leonardo 10 | delay(2000); 11 | 12 | cout << "Hello, World!\n"; 13 | } 14 | 15 | void loop() {} 16 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/MiniSerial/MiniSerial.ino: -------------------------------------------------------------------------------- 1 | // This example illustrates use of SdFat's 2 | // minimal unbuffered AVR Serial support. 3 | // 4 | // This is useful for debug and saves RAM 5 | // Will not work on Due, Leonardo, or Teensy 6 | #include 7 | #include 8 | #ifndef UDR0 9 | #error no AVR serial port0 10 | #endif 11 | void setup() { 12 | MiniSerial.begin(9600); 13 | MiniSerial.println(FreeRam()); 14 | MiniSerial.println(F("Type any Character")); 15 | while(MiniSerial.read() < 0) {} 16 | MiniSerial.println(F("Done")); 17 | } 18 | void loop() {} 19 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/SD_Size/SD_Size.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Sketch to compare size of Arduino SD library with SdFat V2. 3 | * See SdFatSize.pde for SdFat sketch. 4 | */ 5 | #include 6 | #include 7 | 8 | File file; 9 | //------------------------------------------------------------------------------ 10 | void setup() { 11 | Serial.begin(9600); 12 | while (!Serial) {} // wait for Leonardo 13 | 14 | if (!SD.begin()) { 15 | Serial.println("begin failed"); 16 | return; 17 | } 18 | file = SD.open("TEST_SD.TXT", FILE_WRITE); 19 | 20 | file.println("Hello"); 21 | 22 | file.close(); 23 | Serial.println("Done"); 24 | } 25 | //------------------------------------------------------------------------------ 26 | void loop() {} 27 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/SdFatSize/SdFatSize.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Sketch to compare size of SdFat V2 with Arduino SD library. 3 | * See SD_Size.pde for Arduino SD sketch. 4 | * 5 | */ 6 | #include 7 | 8 | SdFat sd; 9 | 10 | SdFile file; 11 | //------------------------------------------------------------------------------ 12 | void setup() { 13 | Serial.begin(9600); 14 | while (!Serial) {} // wait for Leonardo 15 | 16 | if (!sd.begin()) { 17 | Serial.println("begin failed"); 18 | return; 19 | } 20 | file.open("SIZE_TST.TXT", O_RDWR | O_CREAT | O_AT_END); 21 | 22 | file.println("Hello"); 23 | 24 | file.close(); 25 | Serial.println("Done"); 26 | } 27 | //------------------------------------------------------------------------------ 28 | void loop() {} 29 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/TestRmdir/TestRmdir.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * This sketch will remove the files and directories 3 | * created by the SdFatMakeDir.pde sketch. 4 | * 5 | * Performance is erratic due to the large number 6 | * of flash erase operations caused by many random 7 | * writes to file structures. 8 | */ 9 | #include 10 | #include 11 | 12 | const uint8_t SD_CHIP_SELECT = SS; 13 | 14 | SdFat sd; 15 | 16 | // store error strings in flash to save RAM 17 | #define error(s) sd.errorHalt_P(PSTR(s)) 18 | 19 | /* 20 | * remove all files in dir. 21 | */ 22 | void deleteFiles(SdBaseFile* dir) { 23 | char name[13]; 24 | SdFile file; 25 | 26 | // open and delete files 27 | for (uint16_t n = 0; ; n++){ 28 | sprintf(name, "%u.TXT", n); 29 | 30 | // open start time 31 | uint32_t t0 = millis(); 32 | 33 | // assume done if open fails 34 | if (!file.open(dir, name, O_WRITE)) return; 35 | 36 | // open end time and remove start time 37 | uint32_t t1 = millis(); 38 | if (!file.remove()) error("file.remove failed"); 39 | 40 | // remove end time 41 | uint32_t t2 = millis(); 42 | 43 | PgmPrint("RM "); 44 | Serial.print(n); 45 | Serial.write(' '); 46 | 47 | // open time 48 | Serial.print(t1 - t0); 49 | Serial.write(' '); 50 | 51 | // remove time 52 | Serial.println(t2 - t1); 53 | } 54 | } 55 | 56 | void setup() { 57 | Serial.begin(9600); 58 | while (!Serial) {} // wait for Leonardo 59 | PgmPrintln("Type any character to start"); 60 | while (Serial.read() <= 0) {} 61 | delay(200); // Catch Due reset problem 62 | 63 | // initialize the SD card at SPI_FULL_SPEED for best performance. 64 | // try SPI_HALF_SPEED if bus errors occur. 65 | if (!sd.begin(SD_CHIP_SELECT, SPI_FULL_SPEED)) sd.initErrorHalt(); 66 | 67 | 68 | // delete files in root if FAT32 69 | if (sd.vol()->fatType() == 32) { 70 | PgmPrintln("Remove files in root"); 71 | deleteFiles(sd.vwd()); 72 | } 73 | 74 | // open SUB1 and delete files 75 | SdFile sub1; 76 | if (!sub1.open("SUB1", O_READ)) error("open SUB1 failed"); 77 | PgmPrintln("Remove files in SUB1"); 78 | deleteFiles(&sub1); 79 | 80 | // open SUB2 and delete files 81 | SdFile sub2; 82 | if (!sub2.open(&sub1, "SUB2", O_READ)) error("open SUB2 failed"); 83 | PgmPrintln("Remove files in SUB2"); 84 | deleteFiles(&sub2); 85 | 86 | // remove SUB2 87 | if (!sub2.rmDir()) error("sub2.rmDir failed"); 88 | PgmPrintln("SUB2 removed"); 89 | 90 | // remove SUB1 91 | if (!sub1.rmDir()) error("sub1.rmDir failed"); 92 | PgmPrintln("SUB1 removed"); 93 | 94 | PgmPrintln("Done"); 95 | } 96 | 97 | void loop() { } 98 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/append/append.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Append Example 3 | * 4 | * This sketch shows how to use open for append. 5 | * The sketch will append 100 line each time it opens the file. 6 | * The sketch will open and close the file 100 times. 7 | */ 8 | #include 9 | 10 | // SD chip select pin 11 | const uint8_t chipSelect = SS; 12 | 13 | // file system object 14 | SdFat sd; 15 | 16 | // create Serial stream 17 | ArduinoOutStream cout(Serial); 18 | 19 | // store error strings in flash to save RAM 20 | #define error(s) sd.errorHalt_P(PSTR(s)) 21 | //------------------------------------------------------------------------------ 22 | void setup() { 23 | // filename for this example 24 | char name[] = "APPEND.TXT"; 25 | 26 | Serial.begin(9600); 27 | while (!Serial) {} // wait for Leonardo 28 | 29 | // pstr() stores strings in flash to save RAM 30 | cout << endl << pstr("Type any character to start\n"); 31 | while (Serial.read() <= 0) {} 32 | delay(400); // Catch Due reset problem 33 | 34 | // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with 35 | // breadboards. use SPI_FULL_SPEED for better performance. 36 | if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); 37 | 38 | cout << pstr("Appending to: ") << name; 39 | 40 | for (uint8_t i = 0; i < 100; i++) { 41 | // open stream for append 42 | ofstream sdout(name, ios::out | ios::app); 43 | if (!sdout) error("open failed"); 44 | 45 | // append 100 lines to the file 46 | for (uint8_t j = 0; j < 100; j++) { 47 | // use int() so byte will print as decimal number 48 | sdout << "line " << int(j) << " of pass " << int(i); 49 | sdout << " millis = " << millis() << endl; 50 | } 51 | // close the stream 52 | sdout.close(); 53 | 54 | if (!sdout) error("append data failed"); 55 | 56 | // output progress indicator 57 | if (i % 25 == 0) cout << endl; 58 | cout << '.'; 59 | } 60 | cout << endl << "Done" << endl; 61 | } 62 | //------------------------------------------------------------------------------ 63 | void loop() {} 64 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/average/average.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculate the sum and average of a list of floating point numbers 3 | */ 4 | #include 5 | 6 | // SD chip select pin 7 | const uint8_t chipSelect = SS; 8 | 9 | // object for the SD file system 10 | SdFat sd; 11 | 12 | // define a serial output stream 13 | ArduinoOutStream cout(Serial); 14 | //------------------------------------------------------------------------------ 15 | void writeTestFile() { 16 | // open the output file 17 | ofstream sdout("AVG_TEST.TXT"); 18 | 19 | // write a series of float numbers 20 | for (int16_t i = -1001; i < 2000; i += 13) { 21 | sdout << 0.1 * i << endl; 22 | } 23 | if (!sdout) sd.errorHalt("sdout failed"); 24 | 25 | sdout.close(); 26 | } 27 | //------------------------------------------------------------------------------ 28 | void calcAverage() { 29 | uint16_t n = 0; // count of input numbers 30 | double num; // current input number 31 | double sum = 0; // sum of input numbers 32 | 33 | // open the input file 34 | ifstream sdin("AVG_TEST.TXT"); 35 | 36 | // check for an open failure 37 | if (!sdin) sd.errorHalt("sdin failed"); 38 | 39 | // read and sum the numbers 40 | while (sdin >> num) { 41 | n++; 42 | sum += num; 43 | } 44 | 45 | // print the results 46 | cout << "sum of " << n << " numbers = " << sum << endl; 47 | cout << "average = " << sum/n << endl; 48 | } 49 | //------------------------------------------------------------------------------ 50 | void setup() { 51 | Serial.begin(9600); 52 | while (!Serial) {} // wait for Leonardo 53 | 54 | // pstr stores strings in flash to save RAM 55 | cout << pstr("Type any character to start\n"); 56 | while (Serial.read() <= 0) {} 57 | delay(400); // Catch Due reset problem 58 | 59 | // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with 60 | // breadboards. use SPI_FULL_SPEED for better performance. 61 | if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); 62 | 63 | // write the test file 64 | writeTestFile(); 65 | 66 | // read the test file and calculate the average 67 | calcAverage(); 68 | } 69 | //------------------------------------------------------------------------------ 70 | void loop() {} 71 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/bufstream/bufstream.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Use of ibufsteam to parse a line and obufstream to format a line 3 | */ 4 | #include 5 | 6 | // create a serial output stream 7 | ArduinoOutStream cout(Serial); 8 | //------------------------------------------------------------------------------ 9 | void setup() { 10 | char buf[20]; // buffer for formatted line 11 | int i, j, k; // values from parsed line 12 | 13 | Serial.begin(9600); 14 | while (!Serial) {} // wait for Leonardo 15 | delay(2000); 16 | 17 | // initialize input string 18 | ibufstream bin("123 456 789"); 19 | 20 | // parse the string "123 456 789" 21 | bin >> i >> j >> k; 22 | 23 | // initialize output buffer 24 | obufstream bout(buf, sizeof(buf)); 25 | 26 | // format the output string 27 | bout << k << ',' << j << ',' << i << endl; 28 | 29 | // write the string to serial 30 | cout << buf; 31 | } 32 | 33 | void loop() {} 34 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/eventlog/eventlog.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Append a line to a file - demo of pathnames and streams 3 | */ 4 | #include 5 | 6 | // SD chip select pin 7 | const uint8_t chipSelect = SS; 8 | 9 | // file system object 10 | SdFat sd; 11 | 12 | // define a serial output stream 13 | ArduinoOutStream cout(Serial); 14 | //------------------------------------------------------------------------------ 15 | /* 16 | * Append a line to LOGFILE.TXT 17 | */ 18 | void logEvent(const char *msg) { 19 | // create dir if needed 20 | sd.mkdir("LOGS/2011/JAN"); 21 | 22 | // create or open a file for append 23 | ofstream sdlog("LOGS/2011/JAN/LOGFILE.TXT", ios::out | ios::app); 24 | 25 | // append a line to the file 26 | sdlog << msg << endl; 27 | 28 | // check for errors 29 | if (!sdlog) sd.errorHalt("append failed"); 30 | 31 | sdlog.close(); 32 | } 33 | //------------------------------------------------------------------------------ 34 | void setup() { 35 | Serial.begin(9600); 36 | while (!Serial) {} // wait for Leonardo 37 | 38 | // pstr stores strings in flash to save RAM 39 | cout << pstr("Type any character to start\n"); 40 | while (Serial.read() <= 0) {} 41 | delay(400); // catch Due reset problem 42 | 43 | // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with 44 | // breadboards. use SPI_FULL_SPEED for better performance. 45 | if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); 46 | 47 | // append a line to the logfile 48 | logEvent("Another line for the logfile"); 49 | 50 | cout << "Done - check /LOGS/2011/JAN/LOGFILE.TXT on the SD" << endl; 51 | } 52 | //------------------------------------------------------------------------------ 53 | void loop() {} 54 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/fgetsRewrite/fgetsRewrite.ino: -------------------------------------------------------------------------------- 1 | // Demo of rewriting a line read by fgets 2 | #include 3 | 4 | // SD card chip select pin 5 | const uint8_t chipSelect = SS; 6 | 7 | // file system 8 | SdFat sd; 9 | 10 | // print stream 11 | ArduinoOutStream cout(Serial); 12 | //------------------------------------------------------------------------------ 13 | // store error strings in flash memory 14 | #define error(s) sd.errorHalt_P(PSTR(s)) 15 | //------------------------------------------------------------------------------ 16 | void demoFgets() { 17 | char line[25]; 18 | int c; 19 | uint32_t pos; 20 | 21 | // open test file 22 | SdFile rdfile("FGETS.TXT", O_RDWR); 23 | 24 | // check for open error 25 | if (!rdfile.isOpen()) error("demoFgets"); 26 | 27 | // list file 28 | cout << pstr("-----Before Rewrite\r\n"); 29 | while ((c = rdfile.read()) >= 0) Serial.write(c); 30 | 31 | rdfile.rewind(); 32 | // read lines from the file to get position 33 | while (1) { 34 | pos = rdfile.curPosition(); 35 | if (rdfile.fgets(line, sizeof(line)) < 0) { 36 | error("Line not found"); 37 | } 38 | // find line that contains "Line C" 39 | if (strstr(line, "Line C"))break; 40 | } 41 | 42 | // rewrite line with 'C' 43 | if (!rdfile.seekSet(pos))error("seekSet"); 44 | rdfile.println("Line R"); 45 | rdfile.rewind(); 46 | 47 | // list file 48 | cout << pstr("\r\n-----After Rewrite\r\n"); 49 | while ((c = rdfile.read()) >= 0) Serial.write(c); 50 | 51 | // close so rewrite is not lost 52 | rdfile.close(); 53 | } 54 | //------------------------------------------------------------------------------ 55 | void makeTestFile() { 56 | // create or open test file 57 | SdFile wrfile("FGETS.TXT", O_WRITE | O_CREAT | O_TRUNC); 58 | 59 | // check for open error 60 | if (!wrfile.isOpen()) error("MakeTestFile"); 61 | 62 | // write test file 63 | wrfile.write_P(PSTR( 64 | "Line A\r\n" 65 | "Line B\r\n" 66 | "Line C\r\n" 67 | "Line D\r\n" 68 | "Line E\r\n" 69 | )); 70 | wrfile.close(); 71 | } 72 | //------------------------------------------------------------------------------ 73 | void setup(void) { 74 | Serial.begin(9600); 75 | while (!Serial){} // wait for Leonardo 76 | 77 | cout << pstr("Type any character to start\n"); 78 | while (Serial.read() <= 0) {} 79 | delay(400); // catch Due reset problem 80 | 81 | // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with 82 | // breadboards. use SPI_FULL_SPEED for better performance. 83 | if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); 84 | 85 | makeTestFile(); 86 | 87 | demoFgets(); 88 | 89 | cout << pstr("\nDone\n"); 90 | } 91 | void loop(void) {} 92 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/readlog/readlog.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Read the logfile created by the eventlog.pde example. 3 | * Demo of pathnames and working directories 4 | */ 5 | #include 6 | 7 | // SD chip select pin 8 | const uint8_t chipSelect = SS; 9 | 10 | // file system object 11 | SdFat sd; 12 | 13 | // define a serial output stream 14 | ArduinoOutStream cout(Serial); 15 | //------------------------------------------------------------------------------ 16 | void setup() { 17 | int c; 18 | Serial.begin(9600); 19 | while (!Serial) {} // wait for Leonardo 20 | 21 | // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with 22 | // breadboards. use SPI_FULL_SPEED for better performance. 23 | if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); 24 | 25 | // set current working directory 26 | if (!sd.chdir("LOGS/2011/JAN/")) { 27 | sd.errorHalt("chdir failed. Did you run eventlog.pde?"); 28 | } 29 | // open file in current working directory 30 | ifstream file("LOGFILE.TXT"); 31 | 32 | if (!file.is_open()) sd.errorHalt("open failed"); 33 | 34 | // copy the file to Serial 35 | while ((c = file.get()) >= 0) cout << (char)c; 36 | 37 | cout << "Done" << endl; 38 | } 39 | //------------------------------------------------------------------------------ 40 | void loop() {} -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/#attic/readme.txt: -------------------------------------------------------------------------------- 1 | Old and debug examples. 2 | 3 | AnalogLogger - A simple data logger for one or more analog pins. 4 | 5 | append - This sketch creates a large file by successive 6 | open/write/close operations. 7 | 8 | average - A demonstration of parsing floating point numbers. 9 | 10 | benchSD - A read/write benchmark for the standard Arduino SD.h library. 11 | 12 | bufstream - ibufsteam to parse a line and obufstream to format a line. 13 | 14 | eventlog - Append a line to a file - demo of pathnames and streams. 15 | 16 | fgetsRewrite - Demo of rewriting a line read by fgets. 17 | 18 | HelloWorld - Create a serial output stream. 19 | 20 | MiniSerial - SdFat minimal serial support for debug. 21 | 22 | PrintBenchmarkSD - Bench mark SD.h print. 23 | 24 | readlog - Read file. Demo of pathnames and current working directory. 25 | 26 | SD_Size - Determine flash used by SD.h example. 27 | 28 | SdFatSize - Determine flash used by SdFat. 29 | 30 | TestMkdirRmdir - Test mkdir, rmdir, and directory management. -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/AnalogBinLogger/AnalogBinLogger.h: -------------------------------------------------------------------------------- 1 | #ifndef AnalogBinLogger_h 2 | #define AnalogBinLogger_h 3 | //------------------------------------------------------------------------------ 4 | // First block of file. 5 | struct metadata_t { 6 | unsigned long adcFrequency; // ADC clock frequency 7 | unsigned long cpuFrequency; // CPU clock frequency 8 | unsigned long sampleInterval; // Sample interval in CPU cycles. 9 | unsigned long recordEightBits; // Size of ADC values, nonzero for 8-bits. 10 | unsigned long pinCount; // Number of analog pins in a sample. 11 | unsigned long pinNumber[123]; // List of pin numbers in a sample. 12 | }; 13 | //------------------------------------------------------------------------------ 14 | // Data block for 8-bit ADC mode. 15 | const size_t DATA_DIM8 = 508; 16 | struct block8_t { 17 | unsigned short count; // count of data bytes 18 | unsigned short overrun; // count of overruns since last block 19 | unsigned char data[DATA_DIM8]; 20 | }; 21 | //------------------------------------------------------------------------------ 22 | // Data block for 10-bit ADC mode. 23 | const size_t DATA_DIM16 = 254; 24 | struct block16_t { 25 | unsigned short count; // count of data bytes 26 | unsigned short overrun; // count of overruns since last block 27 | unsigned short data[DATA_DIM16]; 28 | }; 29 | //------------------------------------------------------------------------------ 30 | // Data block for PC use 31 | struct adcdata_t { 32 | unsigned short count; // count of data bytes 33 | unsigned short overrun; // count of overruns since last block 34 | union { 35 | unsigned char u8[DATA_DIM8]; 36 | unsigned short u16[DATA_DIM16]; 37 | } data; 38 | }; 39 | #endif // AnalogBinLogger_h -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/LowLatencyLogger/UserDataType.h: -------------------------------------------------------------------------------- 1 | #ifndef UserDataType_h 2 | #define UserDataType_h 3 | const uint8_t ADC_DIM = 4; 4 | struct data_t { 5 | unsigned long time; 6 | unsigned short adc[ADC_DIM]; 7 | }; 8 | #endif // UserDataType_h 9 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/OpenNext/OpenNext.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Print size, modify date/time, and name for all files in root. 3 | */ 4 | #include 5 | 6 | // SD chip select pin 7 | const uint8_t chipSelect = SS; 8 | 9 | // file system object 10 | SdFat sd; 11 | 12 | SdFile file; 13 | //------------------------------------------------------------------------------ 14 | void setup() { 15 | Serial.begin(9600); 16 | while (!Serial) {} // wait for Leonardo 17 | delay(1000); 18 | 19 | // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with 20 | // breadboards. use SPI_FULL_SPEED for better performance. 21 | if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); 22 | 23 | // open next file in root. The volume working directory, vwd, is root 24 | while (file.openNext(sd.vwd(), O_READ)) { 25 | file.printFileSize(&Serial); 26 | Serial.write(' '); 27 | file.printModifyDateTime(&Serial); 28 | Serial.write(' '); 29 | file.printName(&Serial); 30 | if (file.isDir()) { 31 | // Indicate a directory. 32 | Serial.write('/'); 33 | } 34 | Serial.println(); 35 | file.close(); 36 | } 37 | Serial.println("Done!"); 38 | } 39 | //------------------------------------------------------------------------------ 40 | void loop() {} 41 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/ReadWriteSdFat/ReadWriteSdFat.ino: -------------------------------------------------------------------------------- 1 | // Ported to SdFat from the native Arduino SD library example by Bill Greiman 2 | // On the Ethernet Shield, CS is pin 4. SdFat handles setting SS 3 | const int chipSelect = 4; 4 | /* 5 | SD card read/write 6 | 7 | This example shows how to read and write data to and from an SD card file 8 | The circuit: 9 | * SD card attached to SPI bus as follows: 10 | ** MOSI - pin 11 11 | ** MISO - pin 12 12 | ** CLK - pin 13 13 | ** CS - pin 4 14 | 15 | created Nov 2010 16 | by David A. Mellis 17 | updated 2 Dec 2010 18 | by Tom Igoe 19 | modified by Bill Greiman 11 Apr 2011 20 | This example code is in the public domain. 21 | 22 | */ 23 | #include 24 | SdFat sd; 25 | SdFile myFile; 26 | 27 | void setup() { 28 | Serial.begin(9600); 29 | while (!Serial) {} // wait for Leonardo 30 | Serial.println("Type any character to start"); 31 | while (Serial.read() <= 0) {} 32 | delay(400); // catch Due reset problem 33 | 34 | // Initialize SdFat or print a detailed error message and halt 35 | // Use half speed like the native library. 36 | // change to SPI_FULL_SPEED for more performance. 37 | if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); 38 | 39 | // open the file for write at end like the Native SD library 40 | if (!myFile.open("test.txt", O_RDWR | O_CREAT | O_AT_END)) { 41 | sd.errorHalt("opening test.txt for write failed"); 42 | } 43 | // if the file opened okay, write to it: 44 | Serial.print("Writing to test.txt..."); 45 | myFile.println("testing 1, 2, 3."); 46 | 47 | // close the file: 48 | myFile.close(); 49 | Serial.println("done."); 50 | 51 | // re-open the file for reading: 52 | if (!myFile.open("test.txt", O_READ)) { 53 | sd.errorHalt("opening test.txt for read failed"); 54 | } 55 | Serial.println("test.txt:"); 56 | 57 | // read from the file until there's nothing else in it: 58 | int data; 59 | while ((data = myFile.read()) >= 0) Serial.write(data); 60 | // close the file: 61 | myFile.close(); 62 | } 63 | 64 | void loop() { 65 | // nothing happens after setup 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/StreamParseInt/StreamParseInt.ino: -------------------------------------------------------------------------------- 1 | // Simple demo of the Stream parsInt() member function. 2 | #include 3 | 4 | // SD card chip select pin - Modify the value of csPin for your SD module. 5 | const uint8_t csPin = 10; 6 | 7 | SdFat SD; 8 | File file; 9 | //------------------------------------------------------------------------------ 10 | void setup() { 11 | Serial.begin(9600); 12 | 13 | // Initialize the SD. 14 | if (!SD.begin(csPin)) { 15 | Serial.println(F("begin error")); 16 | return; 17 | } 18 | // Create and open the file. Use flag to truncate an existing file. 19 | if (!file.open("stream.txt", O_RDWR|O_CREAT|O_TRUNC)) { 20 | Serial.println(F("open error")); 21 | return; 22 | } 23 | // Write a test number to the file. 24 | file.println("12345"); 25 | 26 | // Rewind the file and read the number with parseInt(). 27 | file.rewind(); 28 | int i = file.parseInt(); 29 | Serial.print(F("parseInt: ")); 30 | Serial.println(i); 31 | file.close(); 32 | } 33 | 34 | void loop() {} 35 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/StressTest/StressTest.ino: -------------------------------------------------------------------------------- 1 | // This stress test will create and write files until the SD is full. 2 | #include 3 | 4 | // SD chip select pin. 5 | const uint8_t SD_CS_PIN = SS; 6 | 7 | // Set write buffer size. 8 | #ifdef __arm__ 9 | #ifndef CORE_TEENSY 10 | // Due 11 | const size_t BUF_SIZE = 32768; 12 | #else // CORE_TEENSY 13 | // Teensy 3.0 14 | const size_t BUF_SIZE = 8192; 15 | #endif // CORE_TEENSY 16 | #elif defined(RAMEND) && RAMEND > 5000 17 | // AVR with more than 4 KB RAM 18 | const size_t BUF_SIZE = 4096; 19 | #else // __arm__ 20 | // other 21 | const size_t BUF_SIZE = 512; 22 | #endif // __arm__ 23 | 24 | const size_t FILE_SIZE_KB = 10240; 25 | const uint16_t BUFS_PER_FILE = (1024L*FILE_SIZE_KB/BUF_SIZE); 26 | 27 | SdFat sd; 28 | 29 | SdFile file; 30 | 31 | uint8_t buf[BUF_SIZE]; 32 | char name[13]; 33 | //------------------------------------------------------------------------------ 34 | void setup() { 35 | Serial.begin(9600); 36 | Serial.print("BUF_SIZE "); 37 | Serial.println(BUF_SIZE); 38 | Serial.println("Type any character to start"); 39 | while (Serial.read() < 0) {} 40 | 41 | if (!sd.begin(SD_CS_PIN))sd.errorHalt("sd.begin"); 42 | 43 | // Fill buf with known value. 44 | for (size_t i = 0; i < BUF_SIZE; i++) buf[i] = i; 45 | 46 | // Wait to begin. 47 | do {delay(10);} while (Serial.read() >= 0); 48 | Serial.println("Type any character to stop after next file"); 49 | } 50 | //------------------------------------------------------------------------------ 51 | void loop() { 52 | // Free KB on SD. 53 | uint32_t freeKB = sd.vol()->freeClusterCount()*sd.vol()->blocksPerCluster()/2; 54 | 55 | Serial.print("Free KB: "); 56 | Serial.println(freeKB); 57 | if (freeKB < 2*FILE_SIZE_KB) { 58 | Serial.println(" Done!"); 59 | while(1); 60 | } 61 | sprintf(name, "%lu.DAT", freeKB); 62 | if (!file.open(name, O_WRITE | O_CREAT | O_TRUNC)) { 63 | sd.errorHalt("Open error!"); 64 | } 65 | for (uint16_t i = 0; i < BUFS_PER_FILE; i++) { 66 | if (file.write(buf, BUF_SIZE) != BUF_SIZE) { 67 | sd.errorHalt("Write error!"); 68 | } 69 | } 70 | file.close(); 71 | if (Serial.available()) { 72 | Serial.println("Stopped!"); 73 | while(1); 74 | } 75 | } -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/cin_cout/cin_cout.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Demo of ArduinoInStream and ArduinoOutStream 3 | */ 4 | #include 5 | 6 | // create serial output stream 7 | ArduinoOutStream cout(Serial); 8 | 9 | // input line buffer 10 | char cinBuf[40]; 11 | 12 | // create serial input stream 13 | ArduinoInStream cin(Serial, cinBuf, sizeof(cinBuf)); 14 | //------------------------------------------------------------------------------ 15 | void setup() { 16 | Serial.begin(9600); 17 | while (!Serial) {} // wait for Leonardo 18 | } 19 | //------------------------------------------------------------------------------ 20 | void loop() { 21 | int32_t n; 22 | 23 | cout << "\nenter an integer\n"; 24 | 25 | cin.readline(); 26 | 27 | if (cin >> n) { 28 | cout << "The number is: " << n; 29 | } else { 30 | // will fail if no digits or not in range [-2147483648, 2147483647] 31 | cout << "Invalid input: " << cinBuf; 32 | } 33 | cout << endl; 34 | } 35 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/fgets/fgets.ino: -------------------------------------------------------------------------------- 1 | // Demo of fgets function to read lines from a file. 2 | #include 3 | 4 | // SD chip select pin 5 | const uint8_t chipSelect = SS; 6 | 7 | SdFat sd; 8 | // print stream 9 | ArduinoOutStream cout(Serial); 10 | //------------------------------------------------------------------------------ 11 | // store error strings in flash memory 12 | #define error(s) sd.errorHalt_P(PSTR(s)) 13 | //------------------------------------------------------------------------------ 14 | void demoFgets() { 15 | char line[25]; 16 | int n; 17 | // open test file 18 | SdFile rdfile("FGETS.TXT", O_READ); 19 | 20 | // check for open error 21 | if (!rdfile.isOpen()) error("demoFgets"); 22 | 23 | cout << endl << pstr( 24 | "Lines with '>' end with a '\\n' character\n" 25 | "Lines with '#' do not end with a '\\n' character\n" 26 | "\n"); 27 | 28 | // read lines from the file 29 | while ((n = rdfile.fgets(line, sizeof(line))) > 0) { 30 | if (line[n - 1] == '\n') { 31 | cout << '>' << line; 32 | } else { 33 | cout << '#' << line << endl; 34 | } 35 | } 36 | } 37 | //------------------------------------------------------------------------------ 38 | void makeTestFile() { 39 | // create or open test file 40 | SdFile wrfile("FGETS.TXT", O_WRITE | O_CREAT | O_TRUNC); 41 | 42 | // check for open error 43 | if (!wrfile.isOpen()) error("MakeTestFile"); 44 | 45 | // write test file 46 | wrfile.write_P(PSTR( 47 | "Line with CRLF\r\n" 48 | "Line with only LF\n" 49 | "Long line that will require an extra read\n" 50 | "\n" // empty line 51 | "Line at EOF without NL" 52 | )); 53 | wrfile.close(); 54 | } 55 | //------------------------------------------------------------------------------ 56 | void setup(void) { 57 | Serial.begin(9600); 58 | while (!Serial) {} // Wait for Leonardo 59 | 60 | cout << pstr("Type any character to start\n"); 61 | while (Serial.read() <= 0) {} 62 | delay(400); // catch Due reset problem 63 | 64 | // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with 65 | // breadboards. use SPI_FULL_SPEED for better performance. 66 | if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); 67 | 68 | makeTestFile(); 69 | 70 | demoFgets(); 71 | 72 | cout << pstr("\nDone\n"); 73 | } 74 | void loop(void) {} 75 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/formatting/formatting.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Print a table with various formatting options 3 | * Format dates 4 | */ 5 | #include 6 | 7 | // create Serial stream 8 | ArduinoOutStream cout(Serial); 9 | //------------------------------------------------------------------------------ 10 | // print a table to demonstrate format manipulators 11 | void example(void) { 12 | const int max = 10; 13 | const int width = 4; 14 | 15 | for (int row = 1; row <= max; row++) { 16 | for (int col = 1; col <= max; col++) { 17 | cout << setw(width) << row * col << (col == max ? '\n' : ' '); 18 | } 19 | } 20 | cout << endl; 21 | } 22 | //------------------------------------------------------------------------------ 23 | // print a date as mm/dd/yyyy with zero fill in mm and dd 24 | // shows how to set and restore the fill character 25 | void showDate(int m, int d, int y) { 26 | // convert two digit year 27 | if (y < 100) y += 2000; 28 | 29 | // set new fill to '0' save old fill character 30 | char old = cout.fill('0'); 31 | 32 | // print date 33 | cout << setw(2) << m << '/' << setw(2) << d << '/' << y << endl; 34 | 35 | // restore old fill character 36 | cout.fill(old); 37 | } 38 | //------------------------------------------------------------------------------ 39 | void setup(void) { 40 | Serial.begin(9600); 41 | 42 | while (!Serial) {} // wait for Leonardo 43 | delay(2000); 44 | 45 | cout << endl << "default formatting" << endl; 46 | example(); 47 | 48 | cout << showpos << "showpos" << endl; 49 | example(); 50 | 51 | cout << hex << left << showbase << "hex left showbase" << endl; 52 | example(); 53 | 54 | cout << internal << setfill('0') << uppercase; 55 | cout << "uppercase hex internal showbase fill('0')" < 10 | 11 | // SD chip select pin 12 | const uint8_t chipSelect = SS; 13 | 14 | // file system object 15 | SdFat sd; 16 | 17 | // create a serial stream 18 | ArduinoOutStream cout(Serial); 19 | //------------------------------------------------------------------------------ 20 | void makeTestFile() { 21 | ofstream sdout("GETLINE.TXT"); 22 | // use flash for text to save RAM 23 | sdout << pstr( 24 | "short line\n" 25 | "\n" 26 | "17 character line\n" 27 | "too long for buffer\n" 28 | "line with no nl"); 29 | 30 | sdout.close(); 31 | } 32 | //------------------------------------------------------------------------------ 33 | void testGetline() { 34 | const int line_buffer_size = 18; 35 | char buffer[line_buffer_size]; 36 | ifstream sdin("GETLINE.TXT"); 37 | int line_number = 0; 38 | 39 | while (sdin.getline(buffer, line_buffer_size, '\n') || sdin.gcount()) { 40 | int count = sdin.gcount(); 41 | if (sdin.fail()) { 42 | cout << "Partial long line"; 43 | sdin.clear(sdin.rdstate() & ~ios_base::failbit); 44 | } else if (sdin.eof()) { 45 | cout << "Partial final line"; // sdin.fail() is false 46 | } else { 47 | count--; // Don’t include newline in count 48 | cout << "Line " << ++line_number; 49 | } 50 | cout << " (" << count << " chars): " << buffer << endl; 51 | } 52 | } 53 | //------------------------------------------------------------------------------ 54 | void setup(void) { 55 | Serial.begin(9600); 56 | while (!Serial) {} // wait for Leonardo 57 | 58 | // pstr stores strings in flash to save RAM 59 | cout << pstr("Type any character to start\n"); 60 | while (Serial.read() <= 0) {} 61 | delay(400); // catch Due reset problem 62 | 63 | // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with 64 | // breadboards. use SPI_FULL_SPEED for better performance. 65 | if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); 66 | 67 | // make the test file 68 | makeTestFile(); 69 | 70 | // run the example 71 | testGetline(); 72 | cout << "\nDone!\n"; 73 | } 74 | //------------------------------------------------------------------------------ 75 | void loop(void) {} 76 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/readCSV/readCSV.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * This example reads a simple CSV, comma-separated values, file. 3 | * Each line of the file has three values, a long and two floats. 4 | */ 5 | #include 6 | 7 | // SD chip select pin 8 | const uint8_t chipSelect = SS; 9 | 10 | // file system object 11 | SdFat sd; 12 | 13 | // create Serial stream 14 | ArduinoOutStream cout(Serial); 15 | 16 | char fileName[] = "TESTFILE.CSV"; 17 | //------------------------------------------------------------------------------ 18 | // store error strings in flash to save RAM 19 | #define error(s) sd.errorHalt_P(PSTR(s)) 20 | //------------------------------------------------------------------------------ 21 | // read and print CSV test file 22 | void readFile() { 23 | long lg; 24 | float f1, f2; 25 | char text[10]; 26 | char c1, c2, c3; // space for commas. 27 | 28 | // open input file 29 | ifstream sdin(fileName); 30 | 31 | // check for open error 32 | if (!sdin.is_open()) error("open"); 33 | 34 | // read until input fails 35 | while (1) { 36 | // Get text field. 37 | sdin.get(text, sizeof(text), ','); 38 | 39 | // Assume EOF if fail. 40 | if (sdin.fail()) break; 41 | 42 | // Get commas and numbers. 43 | sdin >> c1 >> lg >> c2 >> f1 >> c3 >> f2; 44 | 45 | // Skip CR/LF. 46 | sdin.skipWhite(); 47 | 48 | if (sdin.fail()) error("bad input"); 49 | 50 | // error in line if not commas 51 | if (c1 != ',' || c2 != ',' || c3 != ',') error("comma"); 52 | 53 | // print in six character wide columns 54 | cout << text << setw(6) << lg << setw(6) << f1 << setw(6) << f2 << endl; 55 | } 56 | // Error in an input line if file is not at EOF. 57 | if (!sdin.eof()) error("readFile"); 58 | } 59 | //------------------------------------------------------------------------------ 60 | // write test file 61 | void writeFile() { 62 | 63 | // create or open and truncate output file 64 | ofstream sdout(fileName); 65 | 66 | // write file from string stored in flash 67 | sdout << pstr( 68 | "Line 1,1,2.3,4.5\n" 69 | "Line 2,6,7.8,9.0\n" 70 | "Line 3,9,8.7,6.5\n" 71 | "Line 4,-4,-3.2,-1\n") << flush; 72 | 73 | // check for any errors 74 | if (!sdout) error("writeFile"); 75 | 76 | sdout.close(); 77 | } 78 | //------------------------------------------------------------------------------ 79 | void setup() { 80 | Serial.begin(9600); 81 | while (!Serial) {} // wait for Leonardo 82 | cout << pstr("Type any character to start\n"); 83 | while (Serial.read() <= 0) {} 84 | delay(400); // catch Due reset problem 85 | 86 | // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with 87 | // breadboards. use SPI_FULL_SPEED for better performance 88 | if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); 89 | 90 | // create test file 91 | writeFile(); 92 | 93 | cout << endl; 94 | 95 | // read and print test 96 | readFile(); 97 | 98 | cout << "\nDone!" << endl; 99 | } 100 | void loop() {} -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/examples/rename/rename.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * This sketch demonstrates use of SdFile::rename() 3 | * and SdFat::rename(). 4 | */ 5 | #include 6 | 7 | // SD chip select pin 8 | const uint8_t chipSelect = SS; 9 | 10 | // file system 11 | SdFat sd; 12 | 13 | // Serial print stream 14 | ArduinoOutStream cout(Serial); 15 | //------------------------------------------------------------------------------ 16 | // store error strings in flash to save RAM 17 | #define error(s) sd.errorHalt_P(PSTR(s)) 18 | //------------------------------------------------------------------------------ 19 | void setup() { 20 | Serial.begin(9600); 21 | while (!Serial) {} // wait for Leonardo 22 | 23 | cout << pstr("Insert an empty SD. Type any character to start.") << endl; 24 | while (Serial.read() <= 0) {} 25 | delay(400); // catch Due reset problem 26 | 27 | // initialize the SD card at SPI_HALF_SPEED to avoid bus errors with 28 | // breadboards. use SPI_FULL_SPEED for better performance. 29 | if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt(); 30 | 31 | // create a file and write one line to the file 32 | SdFile file("NAME1.TXT", O_WRITE | O_CREAT); 33 | if (!file.isOpen()) error("NAME1"); 34 | file.println("A test line for NAME1.TXT"); 35 | 36 | // rename the file NAME2.TXT and add a line. 37 | // sd.vwd() is the volume working directory, root. 38 | if (!file.rename(sd.vwd(), "NAME2.TXT")) error("NAME2"); 39 | file.println("A test line for NAME2.TXT"); 40 | 41 | // list files 42 | cout << pstr("------") << endl; 43 | sd.ls(LS_R); 44 | 45 | // make a new directory - "DIR1" 46 | if (!sd.mkdir("DIR1")) error("DIR1"); 47 | 48 | // move file into DIR1, rename it NAME3.TXT and add a line 49 | if (!file.rename(sd.vwd(), "DIR1/NAME3.TXT")) error("NAME3"); 50 | file.println("A line for DIR1/NAME3.TXT"); 51 | 52 | // list files 53 | cout << pstr("------") << endl; 54 | sd.ls(LS_R); 55 | 56 | // make directory "DIR2" 57 | if (!sd.mkdir("DIR2")) error("DIR2"); 58 | 59 | // close file before rename(oldPath, newPath) 60 | file.close(); 61 | 62 | // move DIR1 into DIR2 and rename it DIR3 63 | if (!sd.rename("DIR1", "DIR2/DIR3")) error("DIR2/DIR3"); 64 | 65 | // open file for append in new location and add a line 66 | if (!file.open("DIR2/DIR3/NAME3.TXT", O_WRITE | O_APPEND)) { 67 | error("DIR2/DIR3/NAME3.TXT"); 68 | } 69 | file.println("A line for DIR2/DIR3/NAME3.TXT"); 70 | 71 | // list files 72 | cout << pstr("------") << endl; 73 | sd.ls(LS_R); 74 | 75 | cout << pstr("Done") << endl; 76 | } 77 | void loop() {} 78 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/utility/FatApiConstants.h: -------------------------------------------------------------------------------- 1 | /* FatLib Library 2 | * Copyright (C) 2013 by William Greiman 3 | * 4 | * This file is part of the FatLib Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with the FatLib Library. If not, see 18 | * . 19 | */ 20 | #ifndef FatApiConstants_h 21 | #define FatApiConstants_h 22 | //------------------------------------------------------------------------------ 23 | // use the gnu style oflag in open() 24 | /** open() oflag for reading */ 25 | uint8_t const O_READ = 0X01; 26 | /** open() oflag - same as O_IN */ 27 | uint8_t const O_RDONLY = O_READ; 28 | /** open() oflag for write */ 29 | uint8_t const O_WRITE = 0X02; 30 | /** open() oflag - same as O_WRITE */ 31 | uint8_t const O_WRONLY = O_WRITE; 32 | /** open() oflag for reading and writing */ 33 | uint8_t const O_RDWR = (O_READ | O_WRITE); 34 | /** open() oflag mask for access modes */ 35 | uint8_t const O_ACCMODE = (O_READ | O_WRITE); 36 | /** The file offset shall be set to the end of the file prior to each write. */ 37 | uint8_t const O_APPEND = 0X04; 38 | /** synchronous writes - call sync() after each write */ 39 | uint8_t const O_SYNC = 0X08; 40 | /** truncate the file to zero length */ 41 | uint8_t const O_TRUNC = 0X10; 42 | /** set the initial position at the end of the file */ 43 | uint8_t const O_AT_END = 0X20; 44 | /** create the file if nonexistent */ 45 | uint8_t const O_CREAT = 0X40; 46 | /** If O_CREAT and O_EXCL are set, open() shall fail if the file exists */ 47 | uint8_t const O_EXCL = 0X80; 48 | 49 | // SdBaseFile class static and const definitions 50 | // flags for ls() 51 | /** ls() flag to print modify date */ 52 | uint8_t const LS_DATE = 1; 53 | /** ls() flag to print file size */ 54 | uint8_t const LS_SIZE = 2; 55 | /** ls() flag for recursive list of subdirectories */ 56 | uint8_t const LS_R = 4; 57 | 58 | // flags for timestamp 59 | /** set the file's last access date */ 60 | uint8_t const T_ACCESS = 1; 61 | /** set the file's creation date and time */ 62 | uint8_t const T_CREATE = 2; 63 | /** Set the file's write date and time */ 64 | uint8_t const T_WRITE = 4; 65 | #endif // FatApiConstants_h 66 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFat/utility/FmtNumber.h: -------------------------------------------------------------------------------- 1 | /* FatLib Library 2 | * Copyright (C) 2013 by William Greiman 3 | * 4 | * This file is part of the FatLib Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with the FatLib Library. If not, see 18 | * . 19 | */ 20 | #ifndef FmtNumber_h 21 | #define FmtNumber_h 22 | #include 23 | char* fmtDec(uint16_t n, char* p); 24 | char* fmtDec(uint32_t n, char* p); 25 | char* fmtFloat(float value, char* p, uint8_t prec); 26 | char* fmtFloat(float value, char* ptr, uint8_t prec, char expChar); 27 | char* fmtHex(uint32_t n, char* p); 28 | float scale10(float v, int8_t n); 29 | float scanFloat(const char* str, char** ptr); 30 | #endif // FmtNumber_h 31 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFatTestSuite/SdFatTestSuite.cpp: -------------------------------------------------------------------------------- 1 | /* Arduino SdFat Library 2 | * Copyright (C) 2011 by William Greiman 3 | * 4 | * This file is part of the Arduino SdFat Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with the Arduino SdFat Library. If not, see 18 | * . 19 | */ 20 | #include 21 | static uint16_t failCount; 22 | static uint16_t testCount; 23 | static Print* testOut = &Serial; 24 | //------------------------------------------------------------------------------ 25 | static size_t strlenPGM(PGM_P str) { 26 | PGM_P end = str; 27 | while (pgm_read_byte(end++)) {} 28 | return end - str; 29 | } 30 | //------------------------------------------------------------------------------ 31 | void testBegin() { 32 | Serial.begin(9600); 33 | while (!Serial) {} // wait for leonardo 34 | testOut = &Serial; 35 | SerialPrintln_P(PSTR("Type any character to begin.")); 36 | while (Serial.read() <= 0) {} 37 | delay(200); // Catch Due reset problem 38 | 39 | print_P(testOut, PSTR("FreeRam: ")); 40 | testOut->println(FreeRam()); 41 | testOut->println(); 42 | failCount = 0; 43 | testCount = 0; 44 | } 45 | //------------------------------------------------------------------------------ 46 | void testEnd() { 47 | testOut->println(); 48 | println_P(testOut, PSTR("Compiled: " __DATE__ " " __TIME__)); 49 | print_P(testOut, PSTR("FreeRam: ")); 50 | testOut->println(FreeRam()); 51 | print_P(testOut, PSTR("Test count: ")); 52 | testOut->println(testCount); 53 | print_P(testOut, PSTR("Fail count: ")); 54 | testOut->println(failCount); 55 | } 56 | //------------------------------------------------------------------------------ 57 | static void testResult(bool b, uint8_t n) { 58 | while (n++ < 60) testOut->write(' '); 59 | if (b) { 60 | println_P(testOut, PSTR("..ok")); 61 | } else { 62 | println_P(testOut, PSTR("FAIL")); 63 | failCount++; 64 | } 65 | testCount++; 66 | } 67 | //------------------------------------------------------------------------------ 68 | void testVerify_P(char* result, PGM_P expect) { 69 | testOut->write('"'); 70 | testOut->print(result); 71 | testOut->print("\",\""); 72 | print_P(testOut, expect); 73 | testOut->write('"'); 74 | uint8_t n = strlen(result) + strlenPGM(expect) + 5; 75 | testResult(!strcmp_P(result, expect), n); 76 | } 77 | //------------------------------------------------------------------------------ 78 | void testVerify_P(bool b, PGM_P msg) { 79 | print_P(testOut, msg); 80 | uint8_t n = strlenPGM(msg); 81 | testResult(b, n); 82 | } 83 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdFatTestSuite/SdFatTestSuite.h: -------------------------------------------------------------------------------- 1 | /* Arduino SdFat Library 2 | * Copyright (C) 2011 by William Greiman 3 | * 4 | * This file is part of the Arduino SdFat Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with the Arduino SdFat Library. If not, see 18 | * . 19 | */ 20 | #ifndef SdFatTestSuite_h 21 | #define SdFatTestSuite_h 22 | #include 23 | #include 24 | 25 | #if defined(__arm__) && !defined(strcmp_P) 26 | #define strcmp_P(a, b) strcmp((a), (b)) 27 | #endif // strcmp_P 28 | 29 | #if defined(__arm__) && !defined(strncpy_P) 30 | #define strncpy_P(s, t, n) strncpy(s, t, n) 31 | #endif // strncpy_P 32 | 33 | #if defined(__arm__) && !defined(strlen_P) 34 | #define strlen_P(str) strlen(str) 35 | #endif // strlen_P 36 | 37 | #define testVerifyBool(result) testVerify_P(result, PSTR(#result)) 38 | #define testVerifyMsg(result, msg) testVerify_P(result, PSTR(msg)) 39 | #define testVerifyStr(result, expect) testVerify_P(result, PSTR(expect)) 40 | 41 | void testBegin(); 42 | void testEnd(); 43 | void testVerify_P(bool b, PGM_P msg); 44 | void testVerify_P(char* result, PGM_P expect); 45 | #endif // SdFatTestSuite_h 46 | -------------------------------------------------------------------------------- /libs/SdFat-master/SdLevel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/SdLevel.png -------------------------------------------------------------------------------- /libs/SdFat-master/SoftwareSPI.txt: -------------------------------------------------------------------------------- 1 | Software SPI is now supported on AVR, Due, and Teensy 3.x boards. 2 | 3 | Edit these variables in SdFatConfig.h to enable Software SPI. 4 | 5 | //------------------------------------------------------------------------------ 6 | /** 7 | * Define AVR_SOF_SPI nonzero to use software SPI on all AVR Arduinos. 8 | */ 9 | #define AVR_SOFT_SPI 0 10 | //------------------------------------------------------------------------------ 11 | /** 12 | * Define DUE_SOFT_SPI nonzero to use software SPI on Due Arduinos. 13 | */ 14 | #define DUE_SOFT_SPI 0 15 | //------------------------------------------------------------------------------ 16 | 17 | /** 18 | * Define LEONARDO_SOFT_SPI nonzero to use software SPI on Leonardo Arduinos. 19 | * LEONARDO_SOFT_SPI allows an unmodified 328 Shield to be used 20 | * on Leonardo Arduinos. 21 | */ 22 | #define LEONARDO_SOFT_SPI 0 23 | //------------------------------------------------------------------------------ 24 | /** 25 | * Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos. 26 | * MEGA_SOFT_SPI allows an unmodified 328 Shield to be used 27 | * on Mega Arduinos. 28 | */ 29 | #define MEGA_SOFT_SPI 0 30 | //------------------------------------------------------------------------------ 31 | /** 32 | * Set TEENSY3_SOFT_SPI nonzero to use software SPI on Teensy 3.x boards. 33 | */ 34 | #define TEENSY3_SOFT_SPI 0 35 | //------------------------------------------------------------------------------ 36 | /** 37 | * Define software SPI pins. Default allows Uno shields to be used on other 38 | * boards. 39 | */ 40 | // define software SPI pins 41 | /** Default Software SPI chip select pin */ 42 | uint8_t const SOFT_SPI_CS_PIN = 10; 43 | /** Software SPI Master Out Slave In pin */ 44 | uint8_t const SOFT_SPI_MOSI_PIN = 11; 45 | /** Software SPI Master In Slave Out pin */ 46 | uint8_t const SOFT_SPI_MISO_PIN = 12; 47 | /** Software SPI Clock pin */ 48 | uint8_t const SOFT_SPI_SCK_PIN = 13; 49 | 50 | -------------------------------------------------------------------------------- /libs/SdFat-master/WorkingDirectory.txt: -------------------------------------------------------------------------------- 1 | Relative paths in SdFat are resolved in a manner similar to Windows. 2 | 3 | Each instance of SdFat has a current directory. In SdFat this directory 4 | is called the volume working directory, vwd. Initially this directory is 5 | the root directory for the volume. 6 | 7 | The volume working directory is changed by calling SdFat::chdir(path). 8 | 9 | The call sd.chdir("/2011") will change the volume working directory 10 | for sd to "/2011", assuming "/2011" exists. 11 | 12 | Relative paths for SdFat member functions are resolved by starting at 13 | the volume working directory. 14 | 15 | For example, the call sd.mkdir("APRIL") will create the directory 16 | "/2011/APRIL" assuming the volume working directory is "/2011". 17 | 18 | SdFat has a current working directory, cwd, that is used to resolve paths 19 | for file.open() calls. 20 | 21 | For a single SD card the current working directory is always the volume 22 | working directory for that card. 23 | 24 | For multiple SD cards the current working directory is set to the volume 25 | working directory of a card by calling the SdFat::chvol() member function. 26 | The chvol() call is like the Windows : command. 27 | 28 | The call sd2.chvol() will set the current working directory to the volume 29 | working directory for sd2. 30 | 31 | If the volume working directory for sd2 is "/MUSIC" the call 32 | 33 | file.open("BIGBAND.WAV", O_READ); 34 | 35 | will then open "/MUSIC/BIGBAND.WAV" on sd2. 36 | 37 | The following functions are used to change or get current directories. 38 | See the html documentation for more information. 39 | 40 | bool SdFat::chdir(bool set_cwd = false); 41 | bool SdFat::chdir(const char* path, bool set_cwd = false); 42 | void SdFat::chvol(); 43 | SdBaseFile* SdFat::vwd(); 44 | static SdBaseFile* SdBaseFile::cwd(); 45 | -------------------------------------------------------------------------------- /libs/SdFat-master/html/_arduino_stream_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_arduino_stream_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_arduino_stream_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_arduino_stream_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd2_card_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd2_card_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd2_card_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd2_card_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_base_file_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_base_file_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_base_file_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_base_file_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_fat_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_fat_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_fat_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_fat_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_fat_config_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_fat_config_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_fat_config_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_fat_config_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_fat_util_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_fat_util_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_file_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_file_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_file_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_file_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_spi_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_spi_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_spi_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_spi_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_stream_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_stream_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_stream_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_stream_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_volume_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_volume_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_sd_volume_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_sd_volume_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_stdio_stream_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_stdio_stream_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/_stdio_stream_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/_stdio_stream_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/bc_s.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/bdwn.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/bufstream_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/bufstream_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/bufstream_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/bufstream_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_arduino_in_stream__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_arduino_in_stream__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_arduino_in_stream__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_arduino_in_stream__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_arduino_out_stream__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_arduino_out_stream__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_arduino_out_stream__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_arduino_out_stream__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_file__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_file__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_file__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_file__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_minimum_serial__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_minimum_serial__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_minimum_serial__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_minimum_serial__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_sd_base_file__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_sd_base_file__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_sd_file__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_sd_file__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_sd_file__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_sd_file__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_sd_stream_base__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_sd_stream_base__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_sd_stream_base__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_sd_stream_base__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_stdio_stream__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_stdio_stream__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/class_stdio_stream__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/class_stdio_stream__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classfstream__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classfstream__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classfstream__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classfstream__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classibufstream__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classibufstream__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classibufstream__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classibufstream__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classifstream__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classifstream__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classifstream__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classifstream__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classios__base__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classios__base__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classios__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classios__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classios__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classios__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classiostream__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classiostream__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classiostream__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classiostream__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classistream__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classistream__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classistream__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classistream__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classobufstream__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classobufstream__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classobufstream__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classobufstream__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classofstream__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classofstream__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classofstream__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classofstream__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classostream__coll__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classostream__coll__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/classostream__inherit__graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/classostream__inherit__graph.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/closed.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/dir_1281b15c327061056ab3b326e90c50cf_dep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/dir_1281b15c327061056ab3b326e90c50cf_dep.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/dir_481cc946b8a81b8d9363a4aad6201160_dep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/dir_481cc946b8a81b8d9363a4aad6201160_dep.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/dir_a991eec27578c865874ede3d8ec657c2_dep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/dir_a991eec27578c865874ede3d8ec657c2_dep.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/doxygen.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2blank.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2doc.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2folderclosed.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2folderopen.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2lastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2lastnode.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2link.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2mlastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2mlastnode.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2mnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2mnode.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2node.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2plastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2plastnode.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2pnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2pnode.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2splitbar.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ftv2vertline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ftv2vertline.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/functions_enum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | SdFat: Class Members - Enumerations 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 | 19 | 23 | 24 | 25 |
20 |
SdFat 21 |
22 |
26 |
27 | 28 | 29 | 36 | 43 | 53 |
54 |
55 |  
    56 |
  • seekdir 57 | : ios_base 58 |
  • 59 |
60 |
61 | 62 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /libs/SdFat-master/html/graph_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/graph_legend.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/inherit_graph_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/inherit_graph_0.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/inherit_graph_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/inherit_graph_1.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/inherit_graph_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/inherit_graph_10.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/inherit_graph_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/inherit_graph_2.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/inherit_graph_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/inherit_graph_3.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/inherit_graph_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/inherit_graph_4.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/inherit_graph_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/inherit_graph_5.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/inherit_graph_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/inherit_graph_6.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/inherit_graph_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/inherit_graph_7.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/inherit_graph_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/inherit_graph_8.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/inherit_graph_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/inherit_graph_9.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ios_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ios_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ios_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ios_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/iostream_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/iostream_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/iostream_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/iostream_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/istream_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/istream_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/istream_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/istream_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/nav_f.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/nav_g.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/nav_h.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/open.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ostream_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ostream_8h__dep__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/ostream_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/ostream_8h__incl.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/structsetfill-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | SdFat: Member List 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 | 19 | 23 | 24 | 25 |
20 |
SdFat 21 |
22 |
26 |
27 | 28 | 29 | 36 | 43 |
44 |
45 |
46 |
setfill Member List
47 |
48 |
49 | 50 |

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

51 | 52 | 53 | 54 |
csetfill
setfill(char arg)setfillinlineexplicit
55 | 56 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /libs/SdFat-master/html/structsetprecision-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | SdFat: Member List 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 | 19 | 23 | 24 | 25 |
20 |
SdFat 21 |
22 |
26 |
27 | 28 | 29 | 36 | 43 |
44 |
45 |
46 |
setprecision Member List
47 |
48 |
49 | 50 |

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

51 | 52 | 53 | 54 |
psetprecision
setprecision(unsigned int arg)setprecisioninlineexplicit
55 | 56 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /libs/SdFat-master/html/structsetw-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | SdFat: Member List 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 | 19 | 23 | 24 | 25 |
20 |
SdFat 21 |
22 |
26 |
27 | 28 | 29 | 36 | 43 |
44 |
45 |
46 |
setw Member List
47 |
48 |
49 | 50 |

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

51 | 52 | 53 | 54 |
setw(unsigned arg)setwinlineexplicit
wsetw
55 | 56 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /libs/SdFat-master/html/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/sync_off.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/sync_on.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/tab_a.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/tab_b.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/tab_h.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SdFat-master/html/tab_s.png -------------------------------------------------------------------------------- /libs/SdFat-master/html/tabs.css: -------------------------------------------------------------------------------- 1 | .tabs, .tabs2, .tabs3 { 2 | background-image: url('tab_b.png'); 3 | width: 100%; 4 | z-index: 101; 5 | font-size: 13px; 6 | font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; 7 | } 8 | 9 | .tabs2 { 10 | font-size: 10px; 11 | } 12 | .tabs3 { 13 | font-size: 9px; 14 | } 15 | 16 | .tablist { 17 | margin: 0; 18 | padding: 0; 19 | display: table; 20 | } 21 | 22 | .tablist li { 23 | float: left; 24 | display: table-cell; 25 | background-image: url('tab_b.png'); 26 | line-height: 36px; 27 | list-style: none; 28 | } 29 | 30 | .tablist a { 31 | display: block; 32 | padding: 0 20px; 33 | font-weight: bold; 34 | background-image:url('tab_s.png'); 35 | background-repeat:no-repeat; 36 | background-position:right; 37 | color: #283A5D; 38 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); 39 | text-decoration: none; 40 | outline: none; 41 | } 42 | 43 | .tabs3 .tablist a { 44 | padding: 0 10px; 45 | } 46 | 47 | .tablist a:hover { 48 | background-image: url('tab_h.png'); 49 | background-repeat:repeat-x; 50 | color: #fff; 51 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 52 | text-decoration: none; 53 | } 54 | 55 | .tablist li.current a { 56 | background-image: url('tab_a.png'); 57 | background-repeat:repeat-x; 58 | color: #fff; 59 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 60 | } 61 | -------------------------------------------------------------------------------- /libs/SdFat-master/troubleshooting.txt: -------------------------------------------------------------------------------- 1 | The best source of recent information is the Arduino forum 2 | 3 | http://arduino.cc/forum/ 4 | 5 | Also search the Adafruit forum 6 | 7 | http://forums.adafruit.com/ 8 | 9 | If you are using a Teensy try 10 | 11 | http://forum.pjrc.com/forum.php 12 | 13 | Try running the SdInfo sketch in the SdFat/examples folder to get 14 | more information. 15 | 16 | 17 | The most common problems are: 18 | 19 | -------------------------------------------------------------------------------- 20 | Wiring errors with card.init() failure and errorCode == 1. This means the 21 | first command, CMD0 - SPI init, failed. SdFat is not seeing the card. 22 | This is a basic hardware problem. Do not reformat your SD. 23 | -------------------------------------------------------------------------------- 24 | card.init() failures caused by resistor SPI level shifters. Some, mostly older, 25 | SD cards work with resistor level shifters but may be flaky with random errors. 26 | 27 | Many newer SD cards have edge detectors and fail with errorCode() = 1. These 28 | cards will not work with resistor level shifters since SdFat does not see the 29 | card at low SPI clock rate. 30 | 31 | Other cards fail with an errorCode() > 1. These cards see SD commands at low 32 | SPI clock rate but fail at higher SPI clock rate. It may be possible to use 33 | these cards by replacing card.init() with card.init(SPI_HALF_SPEED). 34 | This will slow the the SPI clock by 50%. 35 | -------------------------------------------------------------------------------- /libs/SerialPort-master/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | A web page that points a browser to a different page 4 | 5 | 6 | 7 | 8 | Your browser didn't automatically redirect. Open html/index.html manually. 9 | 10 | 11 | -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/ArduinoSize/ArduinoSize.ino: -------------------------------------------------------------------------------- 1 | // Print free RAM for Arduino HardwareSerial 2 | // 3 | #include "FreeRam.h" 4 | 5 | void setup() { 6 | Serial.begin(9600); 7 | Serial.println(FreeRam()); 8 | } 9 | void loop() { 10 | } 11 | -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/ArduinoSize/FreeRam.h: -------------------------------------------------------------------------------- 1 | #include 2 | static inline int FreeRam() { 3 | extern char *__brkval; 4 | char top; 5 | #if defined(CORE_TEENSY) 6 | return &top - __brkval; 7 | #else // malloc type 8 | return __brkval ? &top - __brkval : &top - __malloc_heap_start; 9 | #endif // malloc type 10 | } 11 | -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/ArduinoTest/ArduinoTest.ino: -------------------------------------------------------------------------------- 1 | 2 | void setup() { 3 | Serial.begin(9600); 4 | uint32_t t = micros(); 5 | Serial.write("This string is used to measure the time to buffer data.\r\n"); 6 | t = micros() - t; 7 | Serial.write("Time: "); 8 | Serial.print(t); 9 | Serial.write(" us\r\n"); 10 | } 11 | void loop() { 12 | Serial.write("\r\nenter a string\r\n"); 13 | while (!Serial.available()) {} 14 | do { 15 | Serial.write(Serial.read()); 16 | uint32_t m = millis(); 17 | while (!Serial.available() && (millis() - m) < 3) {} 18 | } while(Serial.available()); 19 | Serial.write("\r\n"); 20 | } -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/BufferedSize/BufferedSize.ino: -------------------------------------------------------------------------------- 1 | // Print free RAM for Arduino 1.0 style buffering. 2 | // 3 | #include 4 | #include "FreeRam.h" 5 | 6 | SerialPort<0, 63, 63> NewSerial; 7 | 8 | // for Arduino 0022 style buffering use this 9 | //SerialPort<0, 127, 0> NewSerial; 10 | 11 | void setup() { 12 | NewSerial.begin(9600); 13 | NewSerial.println(FreeRam()); 14 | } 15 | void loop() {} -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/BufferedSize/FreeRam.h: -------------------------------------------------------------------------------- 1 | #include 2 | static inline int FreeRam() { 3 | extern char *__brkval; 4 | char top; 5 | #if defined(CORE_TEENSY) 6 | return &top - __brkval; 7 | #else // malloc type 8 | return __brkval ? &top - __brkval : &top - __malloc_heap_start; 9 | #endif // malloc type 10 | } 11 | -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/BufferedTest/BufferedTest.ino: -------------------------------------------------------------------------------- 1 | // Check time to buffer data and function of available(). 2 | #include 3 | 4 | // port zero, 63 character RX and TX buffers 5 | SerialPort<0, 63, 63> NewSerial; 6 | 7 | void setup() { 8 | NewSerial.begin(9600); 9 | uint32_t t = micros(); 10 | NewSerial.write("This string is used to measure the time to buffer data.\r\n"); 11 | t = micros() - t; 12 | NewSerial.write("Time: "); 13 | NewSerial.print(t); 14 | NewSerial.write(" us\r\n"); 15 | } 16 | void loop() { 17 | NewSerial.write("\r\nenter a string\r\n"); 18 | while (!NewSerial.available()) {} 19 | do { 20 | NewSerial.write(NewSerial.read()); 21 | uint32_t m = millis(); 22 | while (!NewSerial.available() && (millis() - m) < 3) {} 23 | } while(NewSerial.available()); 24 | NewSerial.write("\r\n"); 25 | } -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/HelloWorld/HelloWorld.ino: -------------------------------------------------------------------------------- 1 | // Simple usage with buffering like Arduino 1.0. 2 | #include 3 | 4 | // use NewSerial for port 0 5 | USE_NEW_SERIAL; 6 | 7 | void setup() { 8 | NewSerial.begin(9600); 9 | NewSerial.println("Hello World!"); 10 | } 11 | void loop() {} -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/MegaTest/MegaTest.ino: -------------------------------------------------------------------------------- 1 | // Test all ports on the Mega. 2 | // 3 | // A string read on port zero will be sent to port one, 4 | // it will then be read from port one and sent to port 5 | // two, next it will be read from port two and sent to 6 | // port three, and finally it will be read from port 7 | // three and sent to port zero. 8 | // 9 | // Place a loopback jumper connecting 10 | // RX1 to TX1, RX2 to TX2, RX3 to TX3 on ports 1, 2, and 3. 11 | // Do not place a jumper on port zero. 12 | // 13 | #include 14 | // port 0 unbuffered 15 | SerialPort<0, 0, 0> port0; 16 | 17 | // port 1 buffered RX 18 | SerialPort<1, 32, 0> port1; 19 | 20 | // port 2 buffered RX and TX 21 | SerialPort<2, 32, 32> port2; 22 | 23 | // port 3 buffered RX and TX 24 | SerialPort<3, 32, 32> port3; 25 | 26 | void transfer(Stream* in, Stream* out) { 27 | while(!in->available()) {} 28 | do { 29 | out->write(in->read()); 30 | uint32_t m = millis(); 31 | while (!in->available() && (millis() -m) < 3) {} 32 | } while (in->available()); 33 | } 34 | 35 | void setup() { 36 | port0.begin(9600); 37 | port1.begin(9600); 38 | port2.begin(9600); 39 | port3.begin(9600); 40 | } 41 | void loop() { 42 | port0.write("type a string\r\n"); 43 | transfer(&port0, &port1); 44 | transfer(&port1, &port2); 45 | transfer(&port2, &port3); 46 | transfer(&port3, &port0); 47 | port0.write("\r\n\r\n"); 48 | } 49 | -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/MegaTestArduino/MegaTestArduino.ino: -------------------------------------------------------------------------------- 1 | // Test all ports on the Mega. 2 | // 3 | // 4 | // A string read on port zero will be sent to port one, 5 | // it will then be read from port one and sent to port 6 | // two, next it will be read from port two and sent to 7 | // port three, and finally it will be read from port 8 | // three and sent to port zero. 9 | // 10 | // Place a loopback jumper connecting 11 | // RX1 to TX1, RX2 to TX2, RX3 to TX3 on ports 1, 2, and 3. 12 | // Do not place a jumper on port zero. 13 | // 14 | void transfer(Stream* in, Stream* out) { 15 | while(!in->available()) {} 16 | do { 17 | out->write(in->read()); 18 | uint32_t m = millis(); 19 | while (!in->available() && (millis() - m) < 3) {} 20 | } while (in->available()); 21 | } 22 | void setup() { 23 | Serial.begin(9600); 24 | Serial1.begin(9600); 25 | Serial2.begin(9600); 26 | Serial3.begin(9600); 27 | } 28 | void loop() { 29 | Serial.write("type a string\r\n"); 30 | transfer(&Serial, &Serial1); 31 | transfer(&Serial1, &Serial2); 32 | transfer(&Serial2, &Serial3); 33 | transfer(&Serial3, &Serial); 34 | Serial.write("\r\n\r\n"); 35 | } 36 | -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/ReadWriteTest/ReadWriteTest.ino: -------------------------------------------------------------------------------- 1 | // Test that ring buffer overrun can be detected. 2 | #include 3 | // port 0, 16 byte RX and TX buffers 4 | SerialPort<0, 16, 16> port0; 5 | 6 | void setup() { 7 | port0.begin(9600); 8 | port0.write("SerialPort version: "); 9 | port0.println(SERIAL_PORT_VERSION); 10 | } 11 | void loop() { 12 | uint8_t buffer[10]; 13 | port0.writeln("Enter a string. Overrun error for more than 16 bytes."); 14 | while (!port0.available()) {} 15 | // delay so an ring buffer overrun will occur for long strings 16 | delay(50); 17 | uint32_t m = millis(); 18 | do { 19 | size_t n = port0.read(buffer, sizeof (buffer)); 20 | if (n) { 21 | m = millis(); 22 | port0.write(buffer, n); 23 | } 24 | } while ((millis() - m) < 4); 25 | port0.writeln(); 26 | uint8_t e = port0.getRxError(); 27 | if (e) { 28 | port0.write("Error: "); 29 | port0.println(e, HEX); 30 | port0.clearRxError(); 31 | } 32 | } -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/UnbufferedSize/FreeRam.h: -------------------------------------------------------------------------------- 1 | #include 2 | static inline int FreeRam() { 3 | extern char *__brkval; 4 | char top; 5 | #if defined(CORE_TEENSY) 6 | return &top - __brkval; 7 | #else // malloc type 8 | return __brkval ? &top - __brkval : &top - __malloc_heap_start; 9 | #endif // malloc type 10 | } 11 | -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/UnbufferedSize/UnbufferedSize.ino: -------------------------------------------------------------------------------- 1 | // Print free RAM for unbuffered mode. 2 | // 3 | // You can reduce flash and RAM use more by setting 4 | // BUFFERED_TX and BUFFERED_RX zero in SerialPort.h 5 | // to always disable buffering. 6 | // 7 | #include 8 | #include "FreeRam.h" 9 | 10 | // no buffers 11 | SerialPort<0, 0, 0> NewSerial; 12 | 13 | void setup() { 14 | NewSerial.begin(9600); 15 | NewSerial.println(FreeRam()); 16 | } 17 | void loop() {} -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/UnbufferedTest/UnbufferedTest.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // serial port zero with no RX or TX buffering 4 | SerialPort<0, 0, 0> NewSerial; 5 | 6 | void setup() { 7 | NewSerial.begin(9600); 8 | uint32_t t = micros(); 9 | NewSerial.write("This string is used to measure the time to buffer data.\r\n"); 10 | t = micros() - t; 11 | NewSerial.write("Time: "); 12 | NewSerial.print(t); 13 | NewSerial.write(" us\r\n"); 14 | } 15 | void loop() { 16 | NewSerial.write("\r\nenter a string\r\n"); 17 | while (!NewSerial.available()) {} 18 | do { 19 | NewSerial.write(NewSerial.read()); 20 | uint32_t m = millis(); 21 | while (!NewSerial.available() && (millis() - m) < 3) {} 22 | } while(NewSerial.available()); 23 | NewSerial.write("\r\n"); 24 | } -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPort/examples/WriteFlash/WriteFlash.ino: -------------------------------------------------------------------------------- 1 | // Test write() time for a flash string. 2 | #include 3 | 4 | SerialPort<0, 0, 32> port; 5 | 6 | void setup(void) { 7 | port.begin(9600); 8 | 9 | for (int route = 0; route < 11; route++) { 10 | uint32_t start = micros(); 11 | port.writeln(F("Selecting passenger route x")); 12 | uint32_t stop = micros(); 13 | port.write(F("Message time: ")); 14 | port.print(stop - start, DEC); 15 | port.writeln(F(" us")); 16 | delay(400); 17 | } 18 | port.println(F("Done!")); 19 | } 20 | void loop(void) {} 21 | -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPortLogger/SerialDataSource.ino: -------------------------------------------------------------------------------- 1 | // This program sends 280000 bytes over serial port zero. 2 | // Maximum baud rate for a 328 Arduino is 57600. 3 | // Maximum baud rate for a Mega Arduino is 115200 4 | const uint32_t BAUD_RATE = 57600; 5 | 6 | #include 7 | 8 | // Define NewSerial as serial port zero. 9 | USE_NEW_SERIAL; 10 | 11 | void setup() { 12 | NewSerial.begin(BAUD_RATE); 13 | pinMode(13, OUTPUT); 14 | // light pin 13 LED on Arduino Board 15 | digitalWrite(13, HIGH); 16 | 17 | // write start time 18 | NewSerial.println(millis()); 19 | 20 | for (uint16_t i = 0; i < 10000; i++) { 21 | NewSerial.write("ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n"); 22 | } 23 | // write end time 24 | NewSerial.println(millis()); 25 | 26 | // turn off pin 13 LED 27 | digitalWrite(13, LOW); 28 | } 29 | void loop() {} 30 | -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPortLogger/SerialPortLogger.ino: -------------------------------------------------------------------------------- 1 | // Serial data logger example. 2 | // Maximum baud rate for a 328 Arduino is 57600. 3 | // Maximum baud rate for a Mega Arduino is 115200. 4 | const uint32_t BAUD_RATE = 57600; 5 | 6 | // Maximum time between sync() calls in milliseconds. If Serial is always 7 | // active, you must provide a way to stop the program and close the file. 8 | const uint32_t MAX_SYNC_TIME_MSEC = 1000; 9 | 10 | // Pin number for error blink LED. 11 | // Set ERROR_LED_PIN to -1 for no error LED. 12 | const int8_t ERROR_LED_PIN = 3; 13 | 14 | #include 15 | #include 16 | 17 | #if defined(__AVR_ATmega1280__)\ 18 | || defined(__AVR_ATmega2560__) 19 | // Mega, use 4096 byte RX buffer 20 | SerialPort<0, 4096, 0> NewSerial; 21 | #else // Mega 22 | // not a Mega, use 1024 RX byte buffer 23 | SerialPort<0, 1024, 0> NewSerial; 24 | #endif 25 | 26 | SdFat sd; 27 | SdFile file; 28 | 29 | //------------------------------------------------------------------------------ 30 | // Error codes repeat as errno short blinks with a delay between codes. 31 | const uint8_t ERROR_INIT = 1; // SD init error 32 | const uint8_t ERROR_OPEN = 2; // file open error 33 | const uint8_t ERROR_SERIAL = 3; // serial error 34 | const uint8_t ERROR_WRITE = 4; // SD write or sync error 35 | void errorBlink(uint8_t errno) { 36 | uint8_t i; 37 | while (ERROR_LED_PIN < 0); 38 | while (1) { 39 | for (i = 0; i < errno; i++) { 40 | digitalWrite(ERROR_LED_PIN, HIGH); 41 | delay(200); 42 | digitalWrite(ERROR_LED_PIN, LOW); 43 | delay(200); 44 | } 45 | delay(1600); 46 | } 47 | } 48 | //------------------------------------------------------------------------------ 49 | void setup() { 50 | pinMode(ERROR_LED_PIN, OUTPUT); 51 | NewSerial.begin(BAUD_RATE); 52 | 53 | if (!sd.begin()) { 54 | errorBlink(ERROR_INIT); 55 | } 56 | if (!file.open("SERIAL.BIN", O_WRITE | O_CREAT | O_AT_END)) { 57 | errorBlink(ERROR_OPEN); 58 | } 59 | if (file.fileSize() == 0) { 60 | // Make sure first cluster is allocated. 61 | file.write((uint8_t)0); 62 | file.rewind(); 63 | file.sync(); 64 | } 65 | } 66 | //------------------------------------------------------------------------------ 67 | // Time of last sync call. 68 | uint32_t syncTime = 0; 69 | 70 | uint8_t buf[32]; 71 | void loop() { 72 | if (NewSerial.getRxError()) { 73 | errorBlink(ERROR_SERIAL); 74 | } 75 | uint8_t n = NewSerial.read(buf, sizeof(buf)); 76 | if (n > 0) { 77 | if (file.write(buf, n) != n) { 78 | errorBlink(ERROR_WRITE); 79 | } 80 | // Don't sync if active. 81 | return; 82 | } 83 | if ((millis() - syncTime) < MAX_SYNC_TIME_MSEC) return; 84 | 85 | if (!file.sync()) { 86 | errorBlink(ERROR_WRITE); 87 | } 88 | syncTime = millis(); 89 | } 90 | -------------------------------------------------------------------------------- /libs/SerialPort-master/SerialPortLogger/readme.txt: -------------------------------------------------------------------------------- 1 | This is a demo of a data logging sketch that is capable of logging serial 2 | data to an SD card at up to 115200 baud. 3 | 4 | You must install the SdFat library to use the SerialPortLogger. SdFat 5 | can be downloaded from: 6 | 7 | http://code.google.com/p/sdfatlib/downloads/list 8 | 9 | Normally the maximum rate for a 328 Arduino is 57600 baud. 10 | 11 | It is possible to log data at 115200 baud with a 328 Arduino if you use a high 12 | quality SD card. 13 | 14 | Lower quality cards can have an occasional write latency of over 100 15 | milliseconds. This will cause a receive data overrun at 115200 baud since 16 | the RX buffer on a 328 Arduino is 1024 bytes. You need to reduce the baud 17 | rate to 57600 if your SD card causes receive overruns. 18 | 19 | Most SD cards will work with a Mega Arduino at 115200 baud since the RX 20 | buffer is set to 4096 bytes. 21 | 22 | It is possible to use software SPI on a Mega by setting MEGA_SOFT_SPI nonzero 23 | in SdFatConfig.h. This will allow a shield like the Adafruit Data Logging 24 | shield to be used on a Mega without jumper wires. 25 | 26 | The two programs, SerialPortLogger.ino and SerialDataSource.ino, demonstrate 27 | high speed logging of serial data. 28 | 29 | To run this demo, you need two Arduino boards and an SD shield or SD module. 30 | 31 | The board with the SD shield should have an LED and series resistor connected 32 | from pin 3 to ground. This LED will blink an error code if an error occurs. 33 | 34 | Make sure BAUD_RATE has the same value in SerialPortLogger.ino and 35 | SerialDataSource.ino. 36 | 37 | Load SerialPortLogger.ino into the board with an SD shield or module and 38 | SerialDataSource.ino into the second board. 39 | 40 | Connect a wire between GND pins on the two boards. 41 | 42 | Connect a wire between the serial RX pin (Pin 0) on the SD board and the 43 | serial TX pin (pin 1) on the data source board. 44 | 45 | It is best to power the two boards with an external 9V supply. 46 | 47 | After the boards are powered up, wait until the pin 13 LED on the data source 48 | board goes out. This will take up to 50 seconds. 49 | 50 | Insert an SD into the logger board. press reset on the logger board. The 51 | error LED connected to pin 3 should not light. 52 | 53 | Press reset on the data source board. The pin 13 LED on the data source 54 | board should light for about 50 seconds at 57600 baud or 25 seconds at 55 | 115200 baud while 280,000 bytes are transferred. 56 | 57 | If an error occurs, the error LED on the SD board will flash an error code. 58 | See the SerialPortLogger.ino source for definitions of error codes. 59 | 60 | Remove the SD and check the file SERIAL.BIN. In this case it is a text file. -------------------------------------------------------------------------------- /libs/SerialPort-master/changes.txt: -------------------------------------------------------------------------------- 1 | 16 Feb 2014 2 | 3 | Fix 300 baud problem. 4 | 5 | Fix FreeMem() 6 | 7 | 22 Feb 2013 8 | 9 | Fixed problems with newer versions of avr-gcc. 10 | 11 | Fixed compatibility problems with Arduino 1.5.2 beta. 12 | 13 | Added documentation. 14 | 15 | Code cleanup. 16 | 17 | 6 Jan 2012 18 | 19 | Made buffer indice type an option (uint8_t or uint16_t) with 20 | #define ALLOW_LARGE_BUFFERS 21 | 22 | Added defines to hide templates: 23 | /** Define NewSerial with buffering like Arduino 1.0. */ 24 | #define USE_NEW_SERIAL SerialPort<0, 63, 63> NewSerial 25 | /** Define NewSerial1 with buffering like Arduino 1.0. */ 26 | #define USE_NEW_SERIAL1 SerialPort<1, 63, 63> NewSerial1 27 | /** Define NewSerial2 with buffering like Arduino 1.0. */ 28 | #define USE_NEW_SERIAL2 SerialPort<2, 63, 63> NewSerial2 29 | /** Define NewSerial3 with buffering like Arduino 1.0. */ 30 | #define USE_NEW_SERIAL3 SerialPort<3, 63, 63> NewSerial3 31 | 32 | Added HelloWorld example. 33 | 34 | Modified several examples. 35 | 36 | Internal changes based on running Google's style program cpplint.py. 37 | 38 | 4 Jan 2012 39 | 40 | Added examples: 41 | 42 | ReadWriteTest 43 | WriteFlash 44 | 45 | Added functions: 46 | 47 | size_t write_P(PGM_P b, size_t n); 48 | size_t write(const __FlashStringHelper* s); 49 | size_t writeln(const __FlashStringHelper* s); 50 | 51 | fixed bug in size_t read(uint8_t* b, size_t n) 52 | 53 | 54 | 3 Jan 2012 55 | 56 | Almost total rewrite so expect bugs! Be sure to tell me about bugs. 57 | 58 | See html for more details about the following functions. 59 | 60 | Changed begin() to have a optional second argument to set parity, 61 | character size, and number of stop bits. 62 | 63 | void begin (long baud, uint8_t options = SP_8_BIT_CHAR) 64 | 65 | The following can be ORed together for options: 66 | 67 | Choose one stop bit option. 68 | static const uint8_t SP_1_STOP_BIT = 0 (default) 69 | static const uint8_t SP_2_STOP_BIT = M_USBS 70 | 71 | Choose one character size. 72 | static const uint8_t SP_5_BIT_CHAR = 0 73 | static const uint8_t SP_6_BIT_CHAR = M_UCSZ0 74 | static const uint8_t SP_7_BIT_CHAR = M_UCSZ1 75 | static const uint8_t SP_8_BIT_CHAR = M_UCSZ0 | M_UCSZ1 76 | 77 | Choose one parity option. 78 | static const uint8_t SP_EVEN_PARITY = M_UPM1 79 | static const uint8_t SP_NO_PARITY = 0 80 | static const uint8_t SP_ODD_PARITY = M_UPM0 | M_UPM1 81 | 82 | Added RX error checking. 83 | 84 | The following error bits are returned: 85 | static const uint8_t SP_FRAMING_ERROR = M_FE 86 | static const uint8_t SP_PARITY_ERROR = M_UPE 87 | static const uint8_t SP_RX_BUF_OVERRUN = 1 88 | static const uint8_t SP_RX_DATA_OVERRUN = M_DOR 89 | 90 | Added the following functions: 91 | 92 | void clearRxError() 93 | uint8_t getRxError() 94 | size_t read (uint8_t *b, size_t n) 95 | size_t write (const char *s) - overrides version in Stream 96 | size_t write (uint8_t *b, size_t n) - overrides version in Stream 97 | size_t writeln (const char *s) 98 | size_t writeln () 99 | -------------------------------------------------------------------------------- /libs/SerialPort-master/del_htm.bat: -------------------------------------------------------------------------------- 1 | rm -R html/* 2 | pause -------------------------------------------------------------------------------- /libs/SerialPort-master/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/bc_s.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/closed.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/doxygen.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/installdox: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | %subst = ( ); 4 | $quiet = 0; 5 | 6 | while ( @ARGV ) { 7 | $_ = shift @ARGV; 8 | if ( s/^-// ) { 9 | if ( /^l(.*)/ ) { 10 | $v = ($1 eq "") ? shift @ARGV : $1; 11 | ($v =~ /\/$/) || ($v .= "/"); 12 | $_ = $v; 13 | if ( /(.+)\@(.+)/ ) { 14 | if ( exists $subst{$1} ) { 15 | $subst{$1} = $2; 16 | } else { 17 | print STDERR "Unknown tag file $1 given with option -l\n"; 18 | &usage(); 19 | } 20 | } else { 21 | print STDERR "Argument $_ is invalid for option -l\n"; 22 | &usage(); 23 | } 24 | } 25 | elsif ( /^q/ ) { 26 | $quiet = 1; 27 | } 28 | elsif ( /^\?|^h/ ) { 29 | &usage(); 30 | } 31 | else { 32 | print STDERR "Illegal option -$_\n"; 33 | &usage(); 34 | } 35 | } 36 | else { 37 | push (@files, $_ ); 38 | } 39 | } 40 | 41 | foreach $sub (keys %subst) 42 | { 43 | if ( $subst{$sub} eq "" ) 44 | { 45 | print STDERR "No substitute given for tag file `$sub'\n"; 46 | &usage(); 47 | } 48 | elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" ) 49 | { 50 | print "Substituting $subst{$sub} for each occurrence of tag file $sub\n"; 51 | } 52 | } 53 | 54 | if ( ! @files ) { 55 | if (opendir(D,".")) { 56 | foreach $file ( readdir(D) ) { 57 | $match = ".html"; 58 | next if ( $file =~ /^\.\.?$/ ); 59 | ($file =~ /$match/) && (push @files, $file); 60 | ($file =~ /\.svg/) && (push @files, $file); 61 | ($file =~ "navtree.js") && (push @files, $file); 62 | } 63 | closedir(D); 64 | } 65 | } 66 | 67 | if ( ! @files ) { 68 | print STDERR "Warning: No input files given and none found!\n"; 69 | } 70 | 71 | foreach $f (@files) 72 | { 73 | if ( ! $quiet ) { 74 | print "Editing: $f...\n"; 75 | } 76 | $oldf = $f; 77 | $f .= ".bak"; 78 | unless (rename $oldf,$f) { 79 | print STDERR "Error: cannot rename file $oldf\n"; 80 | exit 1; 81 | } 82 | if (open(F,"<$f")) { 83 | unless (open(G,">$oldf")) { 84 | print STDERR "Error: opening file $oldf for writing\n"; 85 | exit 1; 86 | } 87 | if ($oldf ne "tree.js") { 88 | while () { 89 | s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (xlink:href|href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g; 90 | print G "$_"; 91 | } 92 | } 93 | else { 94 | while () { 95 | s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g; 96 | print G "$_"; 97 | } 98 | } 99 | } 100 | else { 101 | print STDERR "Warning file $f does not exist\n"; 102 | } 103 | unlink $f; 104 | } 105 | 106 | sub usage { 107 | print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n"; 108 | print STDERR "Options:\n"; 109 | print STDERR " -l tagfile\@linkName tag file + URL or directory \n"; 110 | print STDERR " -q Quiet mode\n\n"; 111 | exit 1; 112 | } 113 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/nav_f.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/nav_h.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/open.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/all_61.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | ALLOW_LARGE_BUFFERS 13 | SerialPort.h 14 |
15 |
16 |
17 | 24 |
25 |
Searching...
26 |
No Matches
27 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/all_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | clearRxError 13 | SerialPort 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/all_65.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | empty 13 | SerialRingBuffer 14 |
15 |
16 |
17 |
18 | ENABLE_RX_ERROR_CHECKING 19 | SerialPort.h 20 |
21 |
22 |
23 |
24 | end 25 | SerialPort 26 |
27 |
28 |
Searching...
29 |
No Matches
30 | 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/all_66.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | flush 13 | 17 |
18 |
19 |
20 |
21 | flushRx 22 | SerialPort 23 |
24 |
25 |
26 |
27 | flushTx 28 | SerialPort 29 |
30 |
31 |
Searching...
32 |
No Matches
33 | 39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/all_67.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 | 19 |
20 |
21 | getRxError 22 | SerialPort 23 |
24 |
25 |
Searching...
26 |
No Matches
27 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/all_69.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | init 13 | SerialRingBuffer 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/all_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 | 18 |
19 |
20 |
21 | rxErrorBits 22 | SerialPort.h 23 |
24 |
25 |
26 |
27 | rxRingBuf 28 | SerialPort.h 29 |
30 |
31 |
Searching...
32 |
No Matches
33 | 39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/all_74.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | txRingBuf 13 | SerialPort.h 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/classes_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | SerialPort 13 |
14 |
15 |
16 |
17 | SerialRingBuffer 18 |
19 |
20 |
Searching...
21 |
No Matches
22 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/classes_75.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | UsartRegister 13 |
14 |
15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/search/close.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/defines_61.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | ALLOW_LARGE_BUFFERS 13 | SerialPort.h 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/defines_62.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | BUFFERED_RX 13 | SerialPort.h 14 |
15 |
16 |
17 |
18 | BUFFERED_TX 19 | SerialPort.h 20 |
21 |
22 |
Searching...
23 |
No Matches
24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/defines_65.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | ENABLE_RX_ERROR_CHECKING 13 | SerialPort.h 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/defines_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | SERIAL_PORT_VERSION 13 | SerialPort.h 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/defines_75.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | USE_NEW_SERIAL 13 | SerialPort.h 14 |
15 |
16 |
17 |
18 | USE_NEW_SERIAL1 19 | SerialPort.h 20 |
21 |
22 |
23 |
24 | USE_NEW_SERIAL2 25 | SerialPort.h 26 |
27 |
28 |
29 |
30 | USE_NEW_SERIAL3 31 | SerialPort.h 32 |
33 |
34 |
35 |
36 | USE_WRITE_OVERRIDES 37 | SerialPort.h 38 |
39 |
40 |
Searching...
41 |
No Matches
42 | 48 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/files_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | SerialPort.cpp 13 |
14 |
15 |
16 |
17 | SerialPort.h 18 |
19 |
20 |
Searching...
21 |
No Matches
22 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/functions_61.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 | 18 |
19 |
Searching...
20 |
No Matches
21 | 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/functions_62.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | badPortNumber 13 | SerialPort.h 14 |
15 |
16 |
17 |
18 | badRxBufSize 19 | SerialPort.h 20 |
21 |
22 |
23 |
24 | badTxBufSize 25 | SerialPort.h 26 |
27 |
28 |
29 |
30 | begin 31 | SerialPort 32 |
33 |
34 |
Searching...
35 |
No Matches
36 | 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/functions_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | clearRxError 13 | SerialPort 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/functions_65.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | empty 13 | SerialRingBuffer 14 |
15 |
16 |
17 |
18 | end 19 | SerialPort 20 |
21 |
22 |
Searching...
23 |
No Matches
24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/functions_66.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | flush 13 | 17 |
18 |
19 |
20 |
21 | flushRx 22 | SerialPort 23 |
24 |
25 |
26 |
27 | flushTx 28 | SerialPort 29 |
30 |
31 |
Searching...
32 |
No Matches
33 | 39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/functions_67.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 | 19 |
20 |
21 | getRxError 22 | SerialPort 23 |
24 |
25 |
Searching...
26 |
No Matches
27 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/functions_69.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | init 13 | SerialRingBuffer 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/functions_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 | 18 |
19 |
Searching...
20 |
No Matches
21 | 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/functions_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | SerialPort 13 | SerialPort 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/search/mag_sel.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
No Matches
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/search/search_l.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/search/search_m.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/search/search_r.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/typedefs_62.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | buf_size_t 13 | SerialRingBuffer 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/variables_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | rxErrorBits 13 | SerialPort.h 14 |
15 |
16 |
17 |
18 | rxRingBuf 19 | SerialPort.h 20 |
21 |
22 |
Searching...
23 |
No Matches
24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/search/variables_74.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | txRingBuf 13 | SerialPort.h 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/SerialPort-master/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/tab_a.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/tab_b.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/tab_h.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanflight/blackbox-firmware/7a1845f9b0e0f4b8ba59f2f3a0353e1bfc668ec1/libs/SerialPort-master/html/tab_s.png -------------------------------------------------------------------------------- /libs/SerialPort-master/html/tabs.css: -------------------------------------------------------------------------------- 1 | .tabs, .tabs2, .tabs3 { 2 | background-image: url('tab_b.png'); 3 | width: 100%; 4 | z-index: 101; 5 | font-size: 13px; 6 | } 7 | 8 | .tabs2 { 9 | font-size: 10px; 10 | } 11 | .tabs3 { 12 | font-size: 9px; 13 | } 14 | 15 | .tablist { 16 | margin: 0; 17 | padding: 0; 18 | display: table; 19 | } 20 | 21 | .tablist li { 22 | float: left; 23 | display: table-cell; 24 | background-image: url('tab_b.png'); 25 | line-height: 36px; 26 | list-style: none; 27 | } 28 | 29 | .tablist a { 30 | display: block; 31 | padding: 0 20px; 32 | font-weight: bold; 33 | background-image:url('tab_s.png'); 34 | background-repeat:no-repeat; 35 | background-position:right; 36 | color: #283A5D; 37 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); 38 | text-decoration: none; 39 | outline: none; 40 | } 41 | 42 | .tabs3 .tablist a { 43 | padding: 0 10px; 44 | } 45 | 46 | .tablist a:hover { 47 | background-image: url('tab_h.png'); 48 | background-repeat:repeat-x; 49 | color: #fff; 50 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 51 | text-decoration: none; 52 | } 53 | 54 | .tablist li.current a { 55 | background-image: url('tab_a.png'); 56 | background-repeat:repeat-x; 57 | color: #fff; 58 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 59 | } 60 | -------------------------------------------------------------------------------- /libs/SerialPort-master/readme.txt: -------------------------------------------------------------------------------- 1 | The SerialPort library provide more options for buffering, character size, 2 | parity and error checking than the standard Arduino HardwareSerial 3 | class for AVR Arduino boards. 4 | 5 | An example high speed serial data-logger is included. 6 | 7 | To install the this library, copy the SerialPort folder to the 8 | your libraries directory. 9 | 10 | Try the HelloWorld example first. 11 | 12 | The API was designed to be backward compatible with Arduino Serial. 13 | A number of functions have been added to the API. 14 | 15 | Read the html files for more information. 16 | -------------------------------------------------------------------------------- /utils/.gitignore: -------------------------------------------------------------------------------- 1 | /obj/ 2 | -------------------------------------------------------------------------------- /utils/Makefile: -------------------------------------------------------------------------------- 1 | all : blackbox_bench 2 | 3 | OPTIMIZE = -O3 4 | CFLAGS = -g3 $(OPTIMIZE) 5 | LDFLAGS = -flto $(OPTIMIZE) 6 | 7 | blackbox_bench: obj/blackbox_bench 8 | 9 | obj/blackbox_bench : obj/blackbox_bench.o obj/serial.o 10 | $(CC) -o $@ $^ $(LDFLAGS) 11 | 12 | obj/%.o : src/%.c 13 | @mkdir -p $(dir $@) 14 | $(CC) -c -o $@ $(CFLAGS) $< 15 | 16 | clean : 17 | rm -f obj/* -------------------------------------------------------------------------------- /utils/src/serial.h: -------------------------------------------------------------------------------- 1 | #ifndef SERIAL_H_ 2 | #define SERIAL_H_ 3 | 4 | int serial_open(const char *device, int rate, int stopbits); 5 | 6 | #endif 7 | --------------------------------------------------------------------------------