SAM Peripheral Event Controller (PEVC) example 2.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
static void | configure_console (void) |
Configure serial console. More... | |
static void | init_events (void) |
Initialize the PEVC for the example. More... | |
static void | init_pdca (void) |
Initialize the PDCA transfer for the example. More... | |
int | main (void) |
Main entry point for event example. More... | |
static void | pdca_tranfer_done (enum pdca_channel_status status) |
PDCA transfer interrupt callback. More... | |
Variables | |
uint8_t | event_string [] = "GPIO event triggered PDCA!" |
|
static |
Configure serial console.
References uart_rs232_options::baudrate, and stdio_serial_init().
Referenced by main().
|
static |
Initialize the PEVC for the example.
References events_ch_conf::channel_id, EVENT_IGF_DIVIDER_1024, EVENT_IGF_EDGE_FALLING, events_ch_configure(), events_ch_enable(), events_ch_get_config_defaults(), events_enable(), events_get_config_defaults(), events_init(), events_ch_conf::generator_id, events_conf::igf_divider, events_ch_conf::igf_edge, and events_ch_conf::shaper_enable.
Referenced by main().
|
static |
Initialize the PDCA transfer for the example.
References pdca_channel_config_t::addr, event_string, pdca_channel_enable(), pdca_channel_set_callback(), pdca_channel_set_config(), pdca_enable(), pdca_tranfer_done(), and pdca_tx_configs.
Referenced by main().
int main | ( | void | ) |
Main entry point for event example.
References board_init(), BOARD_NAME, configure_console(), delay_ms, gpio_enable_pin_periph_event(), init_events(), init_pdca(), ioport_disable_pin(), IOPORT_MODE_MUX_C, IOPORT_MODE_PULLUP, IOPORT_SENSE_FALLING, ioport_set_pin_mode(), ioport_set_pin_sense_mode(), and sysclk_init().
|
static |
PDCA transfer interrupt callback.
References event_string, PDCA_CH_TRANSFER_COMPLETED, and pdca_channel_write_reload().
Referenced by init_pdca().
uint8_t event_string[] = "GPIO event triggered PDCA!" |