Unit tests for PICOUART driver.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
int | main (void) |
Run PICOUART driver unit tests. More... | |
void | PM_Handler (void) |
static void | run_getversion_test (const struct test_case *test) |
Test board monitor functions. More... | |
static void | run_picouart_test (const struct test_case *test) |
Test wakeup functions. More... | |
int main | ( | void | ) |
Run PICOUART driver unit tests.
References AST_COUNTER_MODE, ast_disable(), ast_disable_wakeup(), ast_enable(), AST_OSC_32KHZ, AST_PSEL_32KHZ_1HZ, ast_set_config(), AST_WAKEUP_ALARM, AST_WAKEUP_OVF, AST_WAKEUP_PER, uart_rs232_options::baudrate, bm_init(), board_init(), CONF_TEST_BAUDRATE, CONF_TEST_CHARLENGTH, CONF_TEST_PARITY, CONF_TEST_STOPBITS, CONF_TEST_USART, ast_config::counter, DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, ast_config::mode, osc_enable(), OSC_ID_OSC32, osc_is_ready(), ast_config::osc_type, osc_wait_ready(), ast_config::psel, run_getversion_test(), run_picouart_test(), stdio_serial_init(), sysclk_init(), and test_suite_run().
void PM_Handler | ( | void | ) |
|
static |
Test board monitor functions.
test | Current test case. |
References bm_get_firmware_version(), and test_assert_true.
Referenced by main().
|
static |
Test wakeup functions.
test | Current test case. |
References picouart_config::action, bm_send_picouart_frame(), bpm_enable_wakeup_source(), bpm_sleep(), BPM_SM_RET, BPM_SM_SLEEP_1, BPM_SM_SLEEP_3, BPM_SM_WAIT, delay_ms, picouart_config::match, PICOUART_ACTION_WAKEUP_ON_FULLFRAME, PICOUART_ACTION_WAKEUP_ON_MATCH, PICOUART_ACTION_WAKEUP_ON_STARTBIT, picouart_enable(), picouart_get_config_defaults(), picouart_init(), picouart_is_data_ready(), picouart_read(), picouart_set_config(), and test_assert_true.
Referenced by main().