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" |
#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 usart_config::baudrate, board_init(), CONF_STDIO_BAUDRATE, CONF_STDIO_MUX_SETTING, CONF_STDIO_PINMUX_PAD0, CONF_STDIO_PINMUX_PAD1, CONF_STDIO_PINMUX_PAD2, CONF_STDIO_PINMUX_PAD3, CONF_STDIO_USART, get_nb_lun(), memories_initialization(), usart_config::mux_setting, usart_config::pinmux_pad0, usart_config::pinmux_pad1, usart_config::pinmux_pad2, usart_config::pinmux_pad3, run_fatfs_test(), STRING_HEADER, system_init(), usart_enable(), and usart_get_config_defaults().
|
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, 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, FR_OK, FILINFO::lfname, and FILINFO::lfsize.
Referenced by run_fatfs_test().
|
static |
Referenced by run_fatfs_test().