TM STM32F4xx Libraries  v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle
tm_stm32f4_fatfs.h
1 
31 #ifndef TM_FATFS_H
32 #define TM_FATFS_H 170
33 
433 #include "stm32f4xx.h"
434 #include "stm32f4xx_rcc.h"
435 #include "stm32f4xx_gpio.h"
436 #include "defines.h"
437 #include "tm_stm32f4_gpio.h"
438 #include "ff.h"
439 #include "diskio.h"
440 
453 #ifndef FATFS_TRUNCATE_BUFFER_SIZE
454 #define FATFS_TRUNCATE_BUFFER_SIZE 256
455 #endif
456 
470 typedef struct {
471  uint32_t TotalSize;
472  uint32_t FreeSize;
474 
493 FRESULT TM_FATFS_GetDriveSize(char* str, TM_FATFS_Size_t* SizeStruct);
494 
502 FRESULT TM_FATFS_DriveSize(uint32_t* total, uint32_t* free);
503 
511 FRESULT TM_FATFS_USBDriveSize(uint32_t* total, uint32_t* free);
512 
527 FRESULT TM_FATFS_TruncateBeginning(FIL* fil, uint32_t index);
528 
538 uint8_t TM_FATFS_CheckCardDetectPin(void);
539 
552 #endif
553 
FRESULT TM_FATFS_TruncateBeginning(FIL *fil, uint32_t index)
Truncates beginning of file.
uint32_t FreeSize
Definition: tm_stm32f4_fatfs.h:472
FRESULT TM_FATFS_DriveSize(uint32_t *total, uint32_t *free)
Gets SDCARD drive size and free space.
FATFS size structure.
Definition: tm_stm32f4_fatfs.h:470
FRESULT TM_FATFS_USBDriveSize(uint32_t *total, uint32_t *free)
Gets USB drive size and free space.
uint8_t TM_FATFS_CheckCardDetectPin(void)
Checks card detect pin (if activated) if card is inserted.
uint32_t TotalSize
Definition: tm_stm32f4_fatfs.h:471