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

List of all members.

Public Member Functions

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

Constructor & Destructor Documentation

Gpio_stm32::Gpio_stm32 ( gpio_stm32_conf_t  config = gpio_stm32_default_config())

Initialises the peripheral.

Parameters:
configDevice configuration

Member Function Documentation

bool Gpio_stm32::configure ( gpio_dir_t  dir,
gpio_pull_updown_t  pull 
) [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

Implements Gpio.

Here is the caller graph for this function:

bool Gpio_stm32::init ( void  ) [virtual]

Hardware initialization.

Returns:
true Success
false Error

Implements Gpio.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Gpio_stm32::read ( void  ) [virtual]

Read the current gpio level.

Returns:
Level

Implements Gpio.

bool Gpio_stm32::set_high ( void  ) [virtual]

Write 1 to the gpio.

Returns:
true Success
false Failed

Implements Gpio.

Here is the caller graph for this function:

bool Gpio_stm32::set_low ( void  ) [virtual]

Write 0 to the gpio.

Returns:
true Success
false Failed

Implements Gpio.

Here is the caller graph for this function:

bool Gpio_stm32::toggle ( void  ) [virtual]

Toggle the gpio value.

Writes 0 if currently high, writes 1 if currently low

Returns:
true Success
false Failed

Implements Gpio.

bool Gpio_stm32::write ( bool  level) [virtual]

Write to the gpio pin.

Parameters:
levelValue to write
Returns:
true Success
false Failed

Implements Gpio.

Here is the call graph for this function:


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