GPIO interrupt example.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
#include "asf.h"
#include "conf_example.h"
Functions | |
static void | configure_console (void) |
Configure serial console. More... | |
static void | init_pdca (void) |
Initialize the PDCA transfer for the example. More... | |
static void | init_pevc (void) |
Initialize the PEVC for the example. More... | |
int | main (void) |
[example_pb0_callback] More... | |
static void | pb0_callback (void) |
Push button 0 interrupt callback. More... | |
static void | pdca_tranfer_done (enum pdca_channel_status status) |
PDCA transfer interrupt callback. More... | |
Variables | |
uint8_t | event_string [] = "gpio event triggered!" |
|
static |
Configure serial console.
References uart_rs232_options::baudrate, and stdio_serial_init().
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().
|
static |
Initialize the PEVC for the example.
References events_ch_conf::channel_id, EVENT_IGF_EDGE_FALLING, events_ch_configure(), events_ch_enable(), events_ch_get_config_defaults(), events_get_config_defaults(), events_init(), events_ch_conf::generator_id, events_ch_conf::igf_edge, and events_ch_conf::shaper_enable.
Referenced by main().
int main | ( | void | ) |
[example_pb0_callback]
Main entry point for GPIO example.
[config_button_0_trig_fall]
[config_button_0_trig_fall_1]
[config_button_0_trig_fall_1] [config_button_0_trig_fall_2]
[config_button_0_trig_fall_2] [enable_pin_interrupt]
[enable_pin_interrupt] [config_button_0_trig_fall]
References board_init(), BOARD_NAME, configure_console(), gpio_enable_pin_interrupt(), gpio_enable_pin_periph_event(), gpio_set_pin_callback(), init_pdca(), init_pevc(), IOPORT_DIR_INPUT, ioport_disable_pin(), IOPORT_MODE_GLITCH_FILTER, IOPORT_MODE_MUX_C, IOPORT_MODE_PULLUP, IOPORT_SENSE_FALLING, ioport_set_pin_dir(), ioport_set_pin_mode(), ioport_set_pin_sense_mode(), pb0_callback(), and sysclk_init().
|
static |
|
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!" |