PICOUART example 1 for SAM.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
static void | config_buttons (void) |
static void | config_wakeup (void) |
static void | configure_console (void) |
Configure serial console. More... | |
static void | display_menu (void) |
Display the user menu on the terminal. More... | |
static void | eic_5_callback (void) |
EIC interrupt handler for push button interrupt. More... | |
int | main (void) |
main function : do init and loop (poll if configured so) More... | |
void | PM_Handler (void) |
Variables | |
static volatile bool | bm_flag = true |
|
static |
|
static |
References bpm_enable_backup_pin(), bpm_enable_wakeup_source(), and GPIO_PUSH_BUTTON_EIC_LINE.
Referenced by main().
|
static |
Configure serial console.
References uart_rs232_options::baudrate, CONF_UART, CONF_UART_BAUDRATE, CONF_UART_CHAR_LENGTH, CONF_UART_PARITY, CONF_UART_STOP_BITS, and stdio_serial_init().
Referenced by main().
|
static |
Display the user menu on the terminal.
Referenced by main().
|
static |
EIC interrupt handler for push button interrupt.
References eic_line_clear_interrupt(), eic_line_interrupt_is_pending(), and GPIO_PUSH_BUTTON_EIC_LINE.
Referenced by config_buttons().
int main | ( | void | ) |
main function : do init and loop (poll if configured so)
References picouart_config::action, 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, bm_flag, bm_init(), bm_send_picouart_frame(), BM_USART_USART, board_init(), BOARD_NAME, bpm_sleep(), BPM_SM_BACKUP, BPM_SM_RET, BPM_SM_SLEEP_2, config_buttons(), config_wakeup(), configure_console(), ast_config::counter, delay_ms, display_menu(), picouart_config::match, ast_config::mode, osc_enable(), OSC_ID_OSC32, osc_is_ready(), ast_config::osc_type, osc_wait_ready(), PICOUART_ACTION_WAKEUP_ON_FULLFRAME, PICOUART_ACTION_WAKEUP_ON_MATCH, PICOUART_ACTION_WAKEUP_ON_STARTBIT, picouart_enable(), picouart_get_config_defaults(), picouart_init(), picouart_set_config(), ast_config::psel, sysclk_enable_hsb_module(), sysclk_enable_peripheral_clock(), sysclk_init(), and SYSCLK_PBA_BRIDGE.
void PM_Handler | ( | void | ) |