| 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.
Library Version, Component Version, Date, Author, Info
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
AppendByteArrayToFile
|
AppendByteArrayToFile
|
|
|
- BYTE
|
Data
|
|
|
- UINT
|
Length
|
|
|
- BYTE
|
Return
|
AppendByteToFile
|
AppendByteToFile
|
|
|
- BYTE
|
Data
|
|
|
- BYTE
|
Return
|
AppendFloatArrayToFile
|
AppendFloatArrayToFile
|
| Adds a binary float array to the end of the file. Returns 0 for success.
|
- FLOAT
|
Data
|
| Binary data array to append to the file
|
- UINT
|
Length
|
| Number of values to append
|
- BYTE
|
Return
|
AppendINTArrayToFile
|
AppendINTArrayToFile
|
| Adds a binary INT array to the end of the file. Returns 0 for success.
|
- UINT
|
Data
|
| Binary data array to append to the file
|
- UINT
|
Length
|
| Number of values to append
|
- BOOL
|
MSBFirst
|
| 0=LSB then MSB, 1=MSB then LSB
|
- BYTE
|
Return
|
AppendLongArrayToFile
|
AppendLongArrayToFile
|
| Adds a binary Long array to the end of the file. Returns 0 for success.
|
- ULONG
|
Data
|
| Binary data array to append to the file
|
- UINT
|
Length
|
| Number of values to append
|
- BOOL
|
MSBFirst
|
| 0=LSB then MSB, 1=MSB then LSB
|
- BYTE
|
Return
|
AppendStringToFile
|
AppendStringToFile
|
|
|
- STRING
|
Data_String
|
|
|
- BYTE
|
Return
|
CloseFile
|
CloseFile
|
|
|
- VOID
|
Return
|
CreateFile
|
CreateFile
|
|
|
- STRING
|
Filename
|
|
|
- BYTE
|
Return
|
DeleteFile
|
DeleteFile
|
|
|
- STRING
|
Filename
|
|
|
- BYTE
|
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
|
- BYTE
|
Return
|
MoveToNextFileSector
|
MoveToNextFileSector
|
| Not implemented on the ESP32
|
- BYTE
|
ForceNextSector
|
|
|
- BYTE
|
Return
|
OpenFile
|
OpenFile
|
| Searches for and opens a file for reading or writing from within the current directory on the disk. Returns 0 for success.
|
- STRING
|
Filename
|
| 8.3 filename of the file we are trying to open e.g. "file.txt"
|
- BYTE
|
Return
|
OpenFolder
|
OpenFolder
|
|
|
- STRING
|
Folder_Name
|
|
|
- BYTE
|
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.
|
- BYTE
|
Data
|
|
|
- UINT
|
Length
|
|
|
- UINT
|
Return
|
ReadByteFromFile
|
ReadByteFromFile
|
| 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).
|
- BYTE
|
Return
|
ReadByteFromIndex
|
ReadByteFromIndex
|
| Reads a byte of data from the local sector buffer. Return = Data byte read from the local sector buffer.
|
- ULONG
|
Address
|
|
|
- BYTE
|
Return
|
ReadFileLength
|
ReadFileLength
|
| Not implemented on the ESP32
|
- INT
|
Return
|
ReadFileSize
|
ReadFileSize
|
| Reads the entire size of the current file in bytes.
|
- ULONG
|
Return
|
ReadFloatArrayFromFile
|
ReadFloatArrayFromFile
|
| Reads a binary Float array from the currently open file. Auto increments the position in the file. Returns the number of values read.
|
- FLOAT
|
Data
|
| Data variable to populate with data
|
- UINT
|
Length
|
| Number of values to read
|
- BOOL
|
MSBFirst
|
| 0=LSB then MSB, 1=MSB then LSB
|
- UINT
|
Return
|
ReadINTArrayFromFile
|
ReadINTArrayFromFile
|
| Reads a binary INT array from the currently open file. Auto increments the position in the file. Returns the number of values read.
|
- UINT
|
Data
|
| Data variable to populate with data
|
- UINT
|
Length
|
| Number of values to read
|
- BOOL
|
MSBFirst
|
| 0=LSB then MSB, 1=MSB then LSB
|
- UINT
|
Return
|
ReadLongArrayFromFile
|
ReadLongArrayFromFile
|
| Reads a binary Long array from the currently open file. Auto increments the position in the file. Returns the number of values read.
|
- ULONG
|
Data
|
| Data variable to populate with data
|
- UINT
|
Length
|
| Number of values to read
|
- BOOL
|
MSBFirst
|
| 0=LSB then MSB, 1=MSB then LSB
|
- UINT
|
Return
|
ReadStringFromFile
|
ReadStringFromFile
|
| 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.
|
- UINT
|
NumBytes
|
| Maximum number of bytes to attempt to read
|
- BYTE
|
EndChar
|
| Ends the string if the value specified is found, default is 0
|
- STRING
|
Return
|
SetFileIndex
|
SetFileIndex
|
|
|
- BYTE
|
File_Index
|
| Range: 0 to 4
|
- VOID
|
Return
|
Uninitialise
|
Uninitialise
|
| Terminates connection to the SD card, unmounts the SD card and disabled the SD peripheral.
|
- VOID
|
Return
|
WriteByteToBuffer
|
WriteByteToBuffer
|
| Not implemented on the ESP32
|
- UINT
|
Address
|
|
|
- BYTE
|
Data
|
|
|
- VOID
|
Return
|
WriteFileSector
|
WriteFileSector
|
| Not implemented on the ESP32
|
- BYTE
|
Return
|
Property reference
|
Properties
|
|
Frequency
|
|
|
|
File Count
|
| Number of simultaneous files we want to access.
|
|
SD Mode
|
|
|
|
Buffer Size
|
| Number of bytes to use as a read buffer to speed up file access.
|
|
Directory Size
|
| Number of bytes to use as a directory buffer to track the current directory.
|
|
Pins
|
|
CLK
|
|
|
|
CMD
|
|
|
|
D0
|
|
|
|
D1
|
|
|
|
D2
|
|
|
|
D3
|
|
|
|
Simulation
|
|
Sim Root Folder
|
|
|
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