Unit tests for PICOUART driver.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <conf_test.h>
#include "board_monitor.h"
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, board_init(), ast_config::counter, DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, ast_config::mode, NULL, 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(), test_suite_run(), and usart_serial_options.
void PM_Handler | ( | void | ) |
|
static |
Test board monitor functions.
test | Current test case. |
References test_assert_true.
Referenced by main().
|
static |
Test wakeup functions.
test | Current test case. |
References picouart_config::action, 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().