Microchip® Advanced Software Framework

gpio_example.c File Reference

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 void configure_console ( void  )
static

Configure serial console.

References uart_rs232_options::baudrate, and stdio_serial_init().

Referenced by main().

static void init_pdca ( void  )
static
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 void pb0_callback ( void  )
static

Push button 0 interrupt callback.

[example_pb0_callback]

Referenced by main().

static void pdca_tranfer_done ( enum pdca_channel_status  status)
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!"