Unit tests for FatFS service.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | DATA_SIZE 2048 |
Size of the file to write/read. More... | |
#define | DISK_DEV_NUM LUN_ID_0 |
Logical disk device number. More... | |
#define | STR_ROOT_DIRECTORY "" |
#define | TEST_SIZE (4 * 1024) |
Test settings: Number of bytes to test. More... | |
Functions | |
int | main (void) |
Run FatFS driver unit tests. More... | |
static void | run_fatfs_test (const struct test_case *test) |
Do FatFS tests. More... | |
Variables | |
static uint8_t | data_buffer [DATA_SIZE] |
const char * | file_name = STR_ROOT_DIRECTORY "Basic.bin" |
#define DATA_SIZE 2048 |
Size of the file to write/read.
Referenced by run_fatfs_test().
#define DISK_DEV_NUM LUN_ID_0 |
Logical disk device number.
Referenced by run_fatfs_test().
#define STR_ROOT_DIRECTORY "" |
Referenced by run_fatfs_test().
#define TEST_SIZE (4 * 1024) |
Test settings: Number of bytes to test.
Referenced by run_fatfs_test().
int main | ( | void | ) |
Run FatFS driver unit tests.
References uart_rs232_options::baudrate, board_init(), DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, memories_initialization(), NULL, run_fatfs_test(), stdio_serial_init(), sysclk_enable_peripheral_clock(), sysclk_init(), test_suite_run(), and usart_serial_options.
|
static |
Do FatFS tests.
References data_buffer, DATA_SIZE, DISK_DEV_NUM, 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, STR_ROOT_DIRECTORY, test_assert_true, and TEST_SIZE.
Referenced by main().
|
static |
Referenced by run_fatfs_test().
const char* file_name = STR_ROOT_DIRECTORY "Basic.bin" |
Referenced by run_fatfs_test().