Component: File (ESP32 SDMode) (File): Difference between revisions
Appearance
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| Line 69: | Line 69: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''AppendByteArrayToFile''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 93: | Line 93: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''AppendByteToFile''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 112: | Line 112: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''AppendFloatArrayToFile''' | ||
|- | |- | ||
| colspan="2" | Adds a binary float array to the end of the file. Returns 0 for success. | | colspan="2" | Adds a binary float array to the end of the file. Returns 0 for success. | ||
| Line 136: | Line 136: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''AppendINTArrayToFile''' | ||
|- | |- | ||
| colspan="2" | Adds a binary INT array to the end of the file. Returns 0 for success. | | colspan="2" | Adds a binary INT array to the end of the file. Returns 0 for success. | ||
| Line 165: | Line 165: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''AppendLongArrayToFile''' | ||
|- | |- | ||
| colspan="2" | Adds a binary Long array to the end of the file. Returns 0 for success. | | colspan="2" | Adds a binary Long array to the end of the file. Returns 0 for success. | ||
| Line 194: | Line 194: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''AppendStringToFile''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 213: | Line 213: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''CloseFile''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 227: | Line 227: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''CreateFile''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 246: | Line 246: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DeleteFile''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 265: | Line 265: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Starts up the SD card interface and checks to see if a card is compatible. Returns: 0=OK, 255=No Card, 254=File System Fail | | colspan="2" | Starts up the SD card interface and checks to see if a card is compatible. Returns: 0=OK, 255=No Card, 254=File System Fail | ||
| Line 279: | Line 279: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''MoveToNextFileSector''' | ||
|- | |- | ||
| colspan="2" | Not implemented on the ESP32 | | colspan="2" | Not implemented on the ESP32 | ||
| Line 298: | Line 298: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''OpenFile''' | ||
|- | |- | ||
| colspan="2" | Searches for and opens a file for reading or writing from within the current directory on the disk. Returns 0 for success. | | colspan="2" | Searches for and opens a file for reading or writing from within the current directory on the disk. Returns 0 for success. | ||
| Line 317: | Line 317: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''OpenFolder''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 336: | Line 336: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadByteArrayFromFile''' | ||
|- | |- | ||
| colspan="2" | Reads a binary byte array from the currently open file. Auto increments the position in the file. Returns the number of values read. | | colspan="2" | Reads a binary byte array from the currently open file. Auto increments the position in the file. Returns the number of values read. | ||
| Line 360: | Line 360: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadByteFromFile''' | ||
|- | |- | ||
| colspan="2" | Reads a byte from the currently open file. Auto increments the position in the file. A return value of 0 may signify the end of the file has been reached (depending on the contents of the file). | | colspan="2" | Reads a byte from the currently open file. Auto increments the position in the file. A return value of 0 may signify the end of the file has been reached (depending on the contents of the file). | ||
| Line 374: | Line 374: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadByteFromIndex''' | ||
|- | |- | ||
| colspan="2" | Reads a byte of data from the local sector buffer. Return = Data byte read from the local sector buffer. | | colspan="2" | Reads a byte of data from the local sector buffer. Return = Data byte read from the local sector buffer. | ||
| Line 393: | Line 393: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadFileLength''' | ||
|- | |- | ||
| colspan="2" | Not implemented on the ESP32 | | colspan="2" | Not implemented on the ESP32 | ||
| Line 407: | Line 407: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadFileSize''' | ||
|- | |- | ||
| colspan="2" | Reads the entire size of the current file in bytes. | | colspan="2" | Reads the entire size of the current file in bytes. | ||
| Line 421: | Line 421: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadFloatArrayFromFile''' | ||
|- | |- | ||
| colspan="2" | Reads a binary Float array from the currently open file. Auto increments the position in the file. Returns the number of values read. | | colspan="2" | Reads a binary Float array from the currently open file. Auto increments the position in the file. Returns the number of values read. | ||
| Line 450: | Line 450: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadINTArrayFromFile''' | ||
|- | |- | ||
| colspan="2" | Reads a binary INT array from the currently open file. Auto increments the position in the file. Returns the number of values read. | | colspan="2" | Reads a binary INT array from the currently open file. Auto increments the position in the file. Returns the number of values read. | ||
| Line 479: | Line 479: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadLongArrayFromFile''' | ||
|- | |- | ||
| colspan="2" | Reads a binary Long array from the currently open file. Auto increments the position in the file. Returns the number of values read. | | colspan="2" | Reads a binary Long array from the currently open file. Auto increments the position in the file. Returns the number of values read. | ||
| Line 508: | Line 508: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadStringFromFile''' | ||
|- | |- | ||
| colspan="2" | Reads a string from the currently open file. Auto increments the position in the file. An empty string signifies the end of the file has been reached. | | colspan="2" | Reads a string from the currently open file. Auto increments the position in the file. An empty string signifies the end of the file has been reached. | ||
| Line 532: | Line 532: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetFileIndex''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 551: | Line 551: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Uninitialise''' | ||
|- | |- | ||
| colspan="2" | Terminates connection to the SD card, unmounts the SD card and disabled the SD peripheral. | | colspan="2" | Terminates connection to the SD card, unmounts the SD card and disabled the SD peripheral. | ||
| Line 565: | Line 565: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteByteToBuffer''' | ||
|- | |- | ||
| colspan="2" | Not implemented on the ESP32 | | colspan="2" | Not implemented on the ESP32 | ||
| Line 589: | Line 589: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteFileSector''' | ||
|- | |- | ||
| colspan="2" | Not implemented on the ESP32 | | colspan="2" | Not implemented on the ESP32 | ||
| Line 604: | Line 604: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Revision as of 14:23, 13 July 2026
| Author | Matrix Ltd. |
| Version | 9.9 |
| Category | File |
File (ESP32 SDMode) component
File component allowing access to read and write files on an SD card using the ESP32 SD Mode IO allowing for high speed data transfer using 1-bit or 4-bit SD access.
Version information
Library Version, Component Version, Date, Author, Info 9, 9.0, 04-03-25, MW, Changed tooltips from Not implemented on the RPI to Not implemented on the ESP32
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
AppendByteArrayToFile
| AppendByteArrayToFile | |
| Data | |
| Length | |
| Return | |
AppendByteToFile
| AppendByteToFile | |
| Data | |
| Return | |
AppendFloatArrayToFile
AppendINTArrayToFile
AppendLongArrayToFile
AppendStringToFile
| AppendStringToFile | |
| Data_String | |
| Return | |
CloseFile
| CloseFile | |
| Return | |
CreateFile
| CreateFile | |
| Filename | |
| Return | |
DeleteFile
| DeleteFile | |
| Filename | |
| Return | |
Initialise
| Initialise | |
| Starts up the SD card interface and checks to see if a card is compatible. Returns: 0=OK, 255=No Card, 254=File System Fail | |
| Return | |
MoveToNextFileSector
| MoveToNextFileSector | |
| Not implemented on the ESP32 | |
| ForceNextSector | |
| Return | |
OpenFile
OpenFolder
| OpenFolder | |
| Folder_Name | |
| Return | |
ReadByteArrayFromFile
| ReadByteArrayFromFile | |
| Reads a binary byte array from the currently open file. Auto increments the position in the file. Returns the number of values read. | |
| Data | |
| Length | |
| Return | |
ReadByteFromFile
ReadByteFromIndex
| ReadByteFromIndex | |
| Reads a byte of data from the local sector buffer. Return = Data byte read from the local sector buffer. | |
| Address | |
| Return | |
ReadFileLength
| ReadFileLength | |
| Not implemented on the ESP32 | |
| Return | |
ReadFileSize
| ReadFileSize | |
| Reads the entire size of the current file in bytes. | |
| Return | |
ReadFloatArrayFromFile
ReadINTArrayFromFile
ReadLongArrayFromFile
ReadStringFromFile
SetFileIndex
| SetFileIndex | |
| File_Index | |
| Range: 0 to 4 | |
| Return | |
Uninitialise
| Uninitialise | |
| Terminates connection to the SD card, unmounts the SD card and disabled the SD peripheral. | |
| Return | |
WriteByteToBuffer
| WriteByteToBuffer | |
| Not implemented on the ESP32 | |
| Address | |
| Data | |
| Return | |
WriteFileSector
| WriteFileSector | |
| Not implemented on the ESP32 | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_File_ESP32_SDMode.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_File_ESP32_SDMode.fcfx