Microchip® Advanced Software Framework

gpio.c File Reference

GPIO driver.

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

#include "gpio.h"

Data Structures

struct  gpio_interrupt_source
 Structure for a GPIO pin interrupt source. More...
 

Macros

#define GPIO_INT_GROUP_MASK   0xFFu
 GPIO interrupt generators are grouped into groups of eight. More...
 
#define GPIO_MAX_INTERRUPT_SOURCES   6
 Maximum number of interrupt sources that can be defined. More...
 

Functions

void GPIO_0_Handler (void)
 GPIO handler 0 (PA 0..7) More...
 
void GPIO_10_Handler (void)
 GPIO handler 10 (PC 16..23) More...
 
void GPIO_11_Handler (void)
 GPIO handler 11 (PC 24..31) More...
 
void GPIO_1_Handler (void)
 GPIO handler 1 (PA 8..15) More...
 
void GPIO_2_Handler (void)
 GPIO handler 2 (PA 16..23) More...
 
void GPIO_3_Handler (void)
 GPIO handler 3 (PA 24..31) More...
 
void GPIO_4_Handler (void)
 GPIO handler 4 (PB 0..7) More...
 
void GPIO_5_Handler (void)
 GPIO handler 5 (PB 8..15) More...
 
void GPIO_6_Handler (void)
 GPIO handler 6 (PB 16..23) More...
 
void GPIO_7_Handler (void)
 GPIO handler 7 (PB 24..31) More...
 
void GPIO_8_Handler (void)
 GPIO handler 8 (PC 0..7) More...
 
void GPIO_9_Handler (void)
 GPIO handler 9 (PC 8..15) More...
 
static void gpio_common_handler (uint32_t port_id, uint32_t port_mask)
 Common GPIO handler. More...
 
bool gpio_set_pin_callback (ioport_pin_t pin, gpio_pin_callback_t callback, uint8_t irq_level)
 Set callback for given GPIO pin. More...
 

Variables

static struct gpio_interrupt_source gpio_int_sources [GPIO_MAX_INTERRUPT_SOURCES]
 
static uint32_t gpio_nb_sources = 0
 

#define GPIO_MAX_INTERRUPT_SOURCES   6

Maximum number of interrupt sources that can be defined.

This constant can be increased, but the current value is the smallest possible one that will be compatible with all existing projects.

Referenced by gpio_set_pin_callback().

void GPIO_0_Handler ( void  )

GPIO handler 0 (PA 0..7)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOA.

void GPIO_10_Handler ( void  )

GPIO handler 10 (PC 16..23)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOC.

void GPIO_11_Handler ( void  )

GPIO handler 11 (PC 24..31)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOC.

void GPIO_1_Handler ( void  )

GPIO handler 1 (PA 8..15)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOA.

void GPIO_2_Handler ( void  )

GPIO handler 2 (PA 16..23)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOA.

void GPIO_3_Handler ( void  )

GPIO handler 3 (PA 24..31)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOA.

void GPIO_4_Handler ( void  )

GPIO handler 4 (PB 0..7)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOB.

void GPIO_5_Handler ( void  )

GPIO handler 5 (PB 8..15)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOB.

void GPIO_6_Handler ( void  )

GPIO handler 6 (PB 16..23)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOB.

void GPIO_7_Handler ( void  )

GPIO handler 7 (PB 24..31)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOB.

void GPIO_8_Handler ( void  )

GPIO handler 8 (PC 0..7)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOC.

void GPIO_9_Handler ( void  )

GPIO handler 9 (PC 8..15)

References gpio_common_handler(), GPIO_INT_GROUP_MASK, and IOPORT_GPIOC.

uint32_t gpio_nb_sources = 0
static