Library Functions.
More...
Library Functions.
| uint8_t TM_FATFS_CheckCardDetectPin |
( |
void |
| ) |
|
Checks card detect pin (if activated) if card is inserted.
- Note
- Pin must be set low in order to get card inserted, otherwise card is not inserted
-
Card detect pin must be activated in order to get this functionality to work
- Parameters
-
- Return values
-
| Card | detected status:
- 0: Card is not inserted
- > 0: Card is inserted
|
| FRESULT TM_FATFS_DriveSize |
( |
uint32_t * |
total, |
|
|
uint32_t * |
free |
|
) |
| |
Gets SDCARD drive size and free space.
- Note
- Function is deprecated and will be removed, use TM_FATFS_GetDriveSize instead!
- Parameters
-
| *total | Pointer to variable to store total size of SDCARD |
| *free | Pointer to variable to store free space on SDCARD |
- Return values
-
| FRESULT | structure members. If data are valid, FR_OK is returned |
| FRESULT TM_FATFS_TruncateBeginning |
( |
FIL * |
fil, |
|
|
uint32_t |
index |
|
) |
| |
Truncates beginning of file.
Example:
- You have a file, its content is: "abcdefghijklmnoprstuvwxyz",
- You want to truncate first 5 bytes,
- Call TM_FATFS_TruncateBeginning(&opened_file, 5);
- You will get new file data: "fghijklmnoprstuvwxyz"
- Parameters
-
| *fil | Pointer to already opened file |
| index | Number of characters that will be truncated from beginning |
- Note
- If index is more than file size, everything will be truncated, but file will not be deleted
- Return values
-
| FRESULT | struct members. If everything ok, FR_OK is returned |
| FRESULT TM_FATFS_USBDriveSize |
( |
uint32_t * |
total, |
|
|
uint32_t * |
free |
|
) |
| |
Gets USB drive size and free space.
- Note
- Function is deprecated and will be removed, use TM_FATFS_GetDriveSize instead!
- Parameters
-
| *total | Pointer to variable to store total size of USB disk |
| *free | Pointer to variable to store free space on USB disk |
- Return values
-
| FRESULT | structure members. If data are valid, FR_OK is returned |