FatFS example.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | BOARD_NAME "Undefined" |
#define | DATA_SIZE 2048 |
Size of the file to write/read. More... | |
#define | MENU_HEADER |
#define | STRING_EOL "\r" |
Example header. More... | |
#define | STRING_HEADER |
#define | TEST_SIZE (4 * 1024) |
Test settings: Number of bytes to test. More... | |
Functions | |
int | main (void) |
Application entry point for FatFS example. More... | |
static uint8_t | run_fatfs_test (uint32_t disk_dev_num) |
Do file system tests. More... | |
static FRESULT | scan_files (char *path) |
Scan files under a certain path. More... | |
Variables | |
static uint8_t | data_buffer [DATA_SIZE] |
#define BOARD_NAME "Undefined" |
Referenced by main().
#define DATA_SIZE 2048 |
Size of the file to write/read.
Referenced by run_fatfs_test().
#define MENU_HEADER |
#define STRING_EOL "\r" |
Example header.
#define STRING_HEADER |
Referenced by main().
#define TEST_SIZE (4 * 1024) |
Test settings: Number of bytes to test.
Referenced by run_fatfs_test().
int main | ( | void | ) |
Application entry point for FatFS example.
References uart_rs232_options::baudrate, board_init(), get_nb_lun(), memories_initialization(), run_fatfs_test(), stdio_serial_init(), STRING_HEADER, sysclk_enable_peripheral_clock(), sysclk_init(), and usart_serial_options.
|
static |
Do file system tests.
disk_dev_num | disk number |
References data_buffer, DATA_SIZE, f_close(), f_mkfs(), f_mount(), f_open(), f_opendir(), f_read(), f_write(), FA_CREATE_ALWAYS, FA_OPEN_EXISTING, FA_READ, FA_WRITE, file_name, FR_NO_FILESYSTEM, FR_OK, FIL::fsize, scan_files(), and TEST_SIZE.
Referenced by main().
|
static |
Scan files under a certain path.
path | Folder path. |
References _MAX_LFN, AM_DIR, f_opendir(), f_readdir(), FILINFO::fattrib, FILINFO::fname, and FR_OK.
Referenced by run_fatfs_test().
|
static |
Referenced by run_fatfs_test().