APM:Libraries
Classes | Macros | Functions | Variables
GPIO.cpp File Reference
#include "GPIO.h"
#include <AP_BoardConfig/AP_BoardConfig.h>
Include dependency graph for GPIO.cpp:

Go to the source code of this file.

Classes

struct  gpio_entry
 

Macros

#define NUM_PINS   ARRAY_SIZE_SIMPLE(_gpio_tab)
 
#define PIN_ENABLED(pin)   ((pin)<NUM_PINS && _gpio_tab[pin].enabled)
 

Functions

static struct gpio_entrygpio_by_pin_num (uint8_t pin_num, bool check_enabled=true)
 
static void ext_interrupt_cb (EXTDriver *extp, expchannel_t channel)
 

Variables

static struct gpio_entry _gpio_tab [] = HAL_GPIO_PINS
 
static EXTConfig extcfg
 
static AP_HAL::Proc ext_irq [EXT_MAX_CHANNELS]
 
const AP_HAL::HALhal
 

Macro Definition Documentation

◆ NUM_PINS

#define NUM_PINS   ARRAY_SIZE_SIMPLE(_gpio_tab)

Definition at line 34 of file GPIO.cpp.

◆ PIN_ENABLED

#define PIN_ENABLED (   pin)    ((pin)<NUM_PINS && _gpio_tab[pin].enabled)

Definition at line 35 of file GPIO.cpp.

Function Documentation

◆ ext_interrupt_cb()

void ext_interrupt_cb ( EXTDriver *  extp,
expchannel_t  channel 
)
static

Definition at line 247 of file GPIO.cpp.

Referenced by ChibiOS::GPIO::_attach_interrupt(), and gpio_by_pin_num().

Here is the caller graph for this function:

◆ gpio_by_pin_num()

static struct gpio_entry* gpio_by_pin_num ( uint8_t  pin_num,
bool  check_enabled = true 
)
static

Definition at line 40 of file GPIO.cpp.

Referenced by ChibiOS::GPIO::attach_interrupt(), ChibiOS::GPIO::channel(), ChibiOS::GPIO::pinMode(), ChibiOS::GPIO::read(), ChibiOS::GPIO::toggle(), and ChibiOS::GPIO::write().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ _gpio_tab

struct gpio_entry _gpio_tab[] = HAL_GPIO_PINS
static

◆ ext_irq

AP_HAL::Proc ext_irq[EXT_MAX_CHANNELS]
static

Definition at line 56 of file GPIO.cpp.

Referenced by ChibiOS::GPIO::_attach_interrupt(), and ext_interrupt_cb().

◆ extcfg

EXTConfig extcfg
static

Definition at line 55 of file GPIO.cpp.

Referenced by ChibiOS::GPIO::_attach_interrupt().

◆ hal

const AP_HAL::HAL& hal

Definition at line 14 of file AC_PID_test.cpp.

Referenced by ChibiOS::GPIO::channel().