MAV'RIC
Public Member Functions
Gpio Class Reference
Inheritance diagram for Gpio:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool init (void)=0
 Hardware initialization.
virtual bool configure (gpio_dir_t dir, gpio_pull_updown_t pull)=0
 Configures the GPIO.
virtual bool set_high (void)=0
 Write 1 to the gpio.
virtual bool set_low (void)=0
 Write 0 to the gpio.
virtual bool toggle (void)=0
 Toggle the gpio value.
virtual bool write (bool level)=0
 Write to the gpio pin.
virtual bool read (void)=0
 Read the current gpio level.

Member Function Documentation

virtual bool Gpio::configure ( gpio_dir_t  dir,
gpio_pull_updown_t  pull 
) [pure virtual]

Configures the GPIO.

Parameters:
dirPin direction (one of enum gpio_dir_t)
pullPin pull up/down (one of enum gpio_pull_updown_t)
Returns:
success

Implemented in Gpio_stm32, Gpio_avr32, Gpio_dummy, and Gpio_chibios.

Here is the caller graph for this function:

virtual bool Gpio::init ( void  ) [pure virtual]

Hardware initialization.

Returns:
true Success
false Error

Implemented in Gpio_stm32, Gpio_avr32, Gpio_dummy, and Gpio_chibios.

Here is the caller graph for this function:

virtual bool Gpio::read ( void  ) [pure virtual]

Read the current gpio level.

Returns:
Level

Implemented in Gpio_stm32, Gpio_avr32, Gpio_dummy, and Gpio_chibios.

Here is the caller graph for this function:

virtual bool Gpio::set_high ( void  ) [pure virtual]

Write 1 to the gpio.

Returns:
true Success
false Failed

Implemented in Gpio_stm32, Gpio_avr32, Gpio_dummy, and Gpio_chibios.

Here is the caller graph for this function:

virtual bool Gpio::set_low ( void  ) [pure virtual]

Write 0 to the gpio.

Returns:
true Success
false Failed

Implemented in Gpio_stm32, Gpio_avr32, Gpio_dummy, and Gpio_chibios.

Here is the caller graph for this function:

virtual bool Gpio::toggle ( void  ) [pure virtual]

Toggle the gpio value.

Writes 0 if currently high, writes 1 if currently low

Returns:
true Success
false Failed

Implemented in Gpio_stm32, Gpio_avr32, Gpio_dummy, and Gpio_chibios.

Here is the caller graph for this function:

virtual bool Gpio::write ( bool  level) [pure virtual]

Write to the gpio pin.

Parameters:
levelValue to write
Returns:
true Success
false Failed

Implemented in Gpio_stm32, Gpio_avr32, Gpio_dummy, and Gpio_chibios.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines