APM:Libraries
Public Member Functions | Private Attributes | List of all members
PX4::PX4GPIO Class Reference

#include <GPIO.h>

Inheritance diagram for PX4::PX4GPIO:
[legend]
Collaboration diagram for PX4::PX4GPIO:
[legend]

Public Member Functions

 PX4GPIO ()
 
void init () override
 
void pinMode (uint8_t pin, uint8_t output) override
 
int8_t analogPinToDigitalPin (uint8_t pin) override
 
uint8_t read (uint8_t pin) override
 
void write (uint8_t pin, uint8_t value) override
 
void toggle (uint8_t pin) override
 
AP_HAL::DigitalSourcechannel (uint16_t n) override
 
bool attach_interrupt (uint8_t interrupt_num, AP_HAL::Proc p, uint8_t mode) override
 
bool usb_connected (void) override
 
void set_usb_connected (void)
 
- Public Member Functions inherited from AP_HAL::GPIO
 GPIO ()
 
virtual void pinMode (uint8_t pin, uint8_t output, uint8_t alt)
 

Private Attributes

int _led_fd = -1
 
int _tone_alarm_fd = -1
 
int _gpio_fmu_fd = -1
 
int _gpio_io_fd = -1
 
bool _usb_connected = false
 

Detailed Description

Definition at line 35 of file GPIO.h.

Constructor & Destructor Documentation

◆ PX4GPIO()

PX4GPIO::PX4GPIO ( )

Definition at line 27 of file GPIO.cpp.

Member Function Documentation

◆ analogPinToDigitalPin()

int8_t PX4GPIO::analogPinToDigitalPin ( uint8_t  pin)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 94 of file GPIO.cpp.

◆ attach_interrupt()

bool PX4GPIO::attach_interrupt ( uint8_t  interrupt_num,
AP_HAL::Proc  p,
uint8_t  mode 
)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 277 of file GPIO.cpp.

◆ channel()

AP_HAL::DigitalSource * PX4GPIO::channel ( uint16_t  n)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 272 of file GPIO.cpp.

◆ init()

void PX4GPIO::init ( void  )
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 30 of file GPIO.cpp.

Here is the call graph for this function:

◆ pinMode()

void PX4GPIO::pinMode ( uint8_t  pin,
uint8_t  output 
)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 75 of file GPIO.cpp.

Here is the call graph for this function:

◆ read()

uint8_t PX4GPIO::read ( uint8_t  pin)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 105 of file GPIO.cpp.

Referenced by pinMode(), and toggle().

Here is the caller graph for this function:

◆ set_usb_connected()

void PX4::PX4GPIO::set_usb_connected ( void  )
inline

Definition at line 55 of file GPIO.h.

◆ toggle()

void PX4GPIO::toggle ( uint8_t  pin)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 266 of file GPIO.cpp.

Here is the call graph for this function:

◆ usb_connected()

bool PX4GPIO::usb_connected ( void  )
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 285 of file GPIO.cpp.

◆ write()

void PX4GPIO::write ( uint8_t  pin,
uint8_t  value 
)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 177 of file GPIO.cpp.

Referenced by toggle().

Here is the caller graph for this function:

Member Data Documentation

◆ _gpio_fmu_fd

int PX4::PX4GPIO::_gpio_fmu_fd = -1
private

Definition at line 60 of file GPIO.h.

Referenced by init(), pinMode(), read(), and write().

◆ _gpio_io_fd

int PX4::PX4GPIO::_gpio_io_fd = -1
private

Definition at line 61 of file GPIO.h.

Referenced by init(), read(), and write().

◆ _led_fd

int PX4::PX4GPIO::_led_fd = -1
private

Definition at line 58 of file GPIO.h.

Referenced by init(), and write().

◆ _tone_alarm_fd

int PX4::PX4GPIO::_tone_alarm_fd = -1
private

Definition at line 59 of file GPIO.h.

Referenced by init(), and write().

◆ _usb_connected

bool PX4::PX4GPIO::_usb_connected = false
private

Definition at line 62 of file GPIO.h.

Referenced by set_usb_connected(), and usb_connected().


The documentation for this class was generated from the following files: