PICOUART example 1 for SAM.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include "board_monitor.h"
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 |
References eic_5_callback(), EIC_ASYNCH_MODE, EIC_EDGE_FALLING_EDGE, eic_enable(), EIC_FILTER_DISABLED, EIC_LEVEL_LOW_LEVEL, eic_line_enable(), eic_line_set_callback(), eic_line_set_config(), and EIC_MODE_EDGE_TRIGGERED.
Referenced by main().
|
static |
References bpm_enable_backup_pin(), and bpm_enable_wakeup_source().
Referenced by main().
|
static |
Configure serial console.
References uart_rs232_options::baudrate, 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(), and eic_line_interrupt_is_pending().
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, 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 | ) |