Microchip® Advanced Software Framework

gpio_simulator_example.c File Reference

GPIO example application for AVR UC3 GPIO driver.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include "gpio.h"
#include <board.h>
#include <sysclk.h>
#include "intc.h"
#include "conf_clock.h"
#include "conf_example.h"


static void gpio_pin_change_interrupt_handler (void)
 GPIO interrupt handler. More...
int main (void)
 Application main loop. More...

static void gpio_pin_change_interrupt_handler ( void  )

GPIO interrupt handler.

References gpio_clear_pin_interrupt_flag(), and gpio_tgl_gpio_pin().

Referenced by main().

int main ( void  )

Application main loop.

the call to sysclk_init() will disable all non-vital peripheral clocks, except for the peripheral clocks explicitly enabled in conf_clock.h.

Enable the clock to the selected example GPIO peripheral module.

References cpu_irq_disable, cpu_irq_enable, cpu_relax, gpio_clr_gpio_pin(), gpio_enable_pin_interrupt(), gpio_enable_pin_pull_up(), gpio_get_pin_value(), GPIO_PIN_CHANGE, gpio_pin_change_interrupt_handler(), gpio_set_gpio_pin(), gpio_tgl_gpio_pin(), INTC_init_interrupts(), INTC_register_interrupt(), sysclk_enable_pba_module(), SYSCLK_GPIO, and sysclk_init().