APM:Libraries
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
Linux::GPIO_Sysfs Class Reference

#include <GPIO_Sysfs.h>

Inheritance diagram for Linux::GPIO_Sysfs:
[legend]
Collaboration diagram for Linux::GPIO_Sysfs:
[legend]

Public Member Functions

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

Static Public Member Functions

static GPIO_Sysfsfrom (AP_HAL::GPIO *gpio)
 

Static Public Attributes

static const unsigned pin_table []
 
static const uint8_t n_pins = _AERO_GPIO_MAX
 

Protected Member Functions

void _pinMode (unsigned int pin, uint8_t output)
 
int _open_pin_value (unsigned int pin, int flags)
 

Static Protected Member Functions

static bool _export_pin (uint8_t vpin)
 

Friends

class DigitalSource_Sysfs
 

Detailed Description

Generic implementation of AP_HAL::GPIO for Linux based boards.

Definition at line 28 of file GPIO_Sysfs.h.

Member Function Documentation

◆ _export_pin()

bool GPIO_Sysfs::_export_pin ( uint8_t  vpin)
staticprotected

Definition at line 207 of file GPIO_Sysfs.cpp.

Here is the call graph for this function:

◆ _open_pin_value()

int GPIO_Sysfs::_open_pin_value ( unsigned int  pin,
int  flags 
)
protected

Definition at line 106 of file GPIO_Sysfs.cpp.

Here is the call graph for this function:

◆ _pinMode()

void GPIO_Sysfs::_pinMode ( unsigned int  pin,
uint8_t  output 
)
protected

Definition at line 93 of file GPIO_Sysfs.cpp.

Here is the call graph for this function:

◆ analogPinToDigitalPin()

int8_t GPIO_Sysfs::analogPinToDigitalPin ( uint8_t  vpin)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 174 of file GPIO_Sysfs.cpp.

◆ attach_interrupt()

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

Implements AP_HAL::GPIO.

Definition at line 196 of file GPIO_Sysfs.cpp.

◆ channel()

AP_HAL::DigitalSource * GPIO_Sysfs::channel ( uint16_t  vpin)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 179 of file GPIO_Sysfs.cpp.

Here is the call graph for this function:

◆ from()

static GPIO_Sysfs* Linux::GPIO_Sysfs::from ( AP_HAL::GPIO gpio)
inlinestatic

Definition at line 35 of file GPIO_Sysfs.h.

Referenced by Linux::DigitalSource_Sysfs::mode().

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

◆ init()

void GPIO_Sysfs::init ( void  )
virtual

Implements AP_HAL::GPIO.

Definition at line 81 of file GPIO_Sysfs.cpp.

◆ pinMode()

void GPIO_Sysfs::pinMode ( uint8_t  vpin,
uint8_t  output 
)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 85 of file GPIO_Sysfs.cpp.

◆ read()

uint8_t GPIO_Sysfs::read ( uint8_t  vpin)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 122 of file GPIO_Sysfs.cpp.

Here is the call graph for this function:

◆ toggle()

void GPIO_Sysfs::toggle ( uint8_t  vpin)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 169 of file GPIO_Sysfs.cpp.

Here is the call graph for this function:

◆ usb_connected()

bool GPIO_Sysfs::usb_connected ( void  )
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 202 of file GPIO_Sysfs.cpp.

◆ write()

void GPIO_Sysfs::write ( uint8_t  vpin,
uint8_t  value 
)
overridevirtual

Implements AP_HAL::GPIO.

Definition at line 147 of file GPIO_Sysfs.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ DigitalSource_Sysfs

friend class DigitalSource_Sysfs
friend

Definition at line 29 of file GPIO_Sysfs.h.

Member Data Documentation

◆ n_pins

const uint8_t Linux::GPIO_Sysfs::n_pins = _AERO_GPIO_MAX
static

Definition at line 33 of file GPIO_Sysfs.h.

◆ pin_table

const unsigned Linux::GPIO_Sysfs::pin_table
static
Initial value:
= {
}

Definition at line 32 of file GPIO_Sysfs.h.


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