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_INT_GROUP_MASK 0xFFu |
GPIO interrupt generators are grouped into groups of eight.
Referenced by GPIO_0_Handler(), GPIO_10_Handler(), GPIO_11_Handler(), GPIO_1_Handler(), GPIO_2_Handler(), GPIO_3_Handler(), GPIO_4_Handler(), GPIO_5_Handler(), GPIO_6_Handler(), GPIO_7_Handler(), GPIO_8_Handler(), GPIO_9_Handler(), and gpio_set_pin_callback().
#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.
|
static |
Common GPIO handler.
References Assert, gpio_interrupt_source::callback, callback, gpio_int_sources, gpio_nb_sources, ioport_pin_to_mask(), ioport_pin_to_port_id(), NULL, and gpio_interrupt_source::pin.
Referenced by GPIO_0_Handler(), GPIO_10_Handler(), GPIO_11_Handler(), GPIO_1_Handler(), GPIO_2_Handler(), GPIO_3_Handler(), GPIO_4_Handler(), GPIO_5_Handler(), GPIO_6_Handler(), GPIO_7_Handler(), GPIO_8_Handler(), and GPIO_9_Handler().
|
static |
Referenced by gpio_common_handler(), and gpio_set_pin_callback().
|
static |
Referenced by gpio_common_handler(), and gpio_set_pin_callback().