UoS³ Flight Computer Firmware
 All Data Structures Files Functions Groups Pages
Files | Functions

GPIO Peripheral Driver. More...

Files

file  gpio.c
 GPIO Driver - gnulinux platform.
 
file  gpio.c
 GPIO Driver - uos3-proto board.
 

Functions

void GPIO_set (uint8_t gpio_number)
 
void GPIO_reset (uint8_t gpio_number)
 
void GPIO_write (uint8_t gpio_number, bool state)
 
bool GPIO_read (uint8_t gpio_number)
 

Detailed Description

GPIO Peripheral Driver.

Hardware GPIO Peripheral Driver.

GPIO pins for each board are defined in ${board}/board.h

Function Documentation

void GPIO_set ( uint8_t  gpio_number)

Sets the state (High) on the specified GPIO pin

Parameters
gpio_numberID of the GPIO pin

Definition at line 13 of file gpio.c.

void GPIO_reset ( uint8_t  gpio_number)

Resets the state (Low) on the specified GPIO pin

Parameters
gpio_numberID of the GPIO pin

Definition at line 18 of file gpio.c.

void GPIO_write ( uint8_t  gpio_number,
bool  state 
)

Writes a given state on the specified GPIO pin

Parameters
gpio_numberID of the GPIO pin
statestate to be written (true = High, false = Low)

Definition at line 23 of file gpio.c.

bool GPIO_read ( uint8_t  gpio_number)

Reads the input value on the specified GPIO pin

Parameters
gpio_numberID of the GPIO pin
Returns
input value of the specified GPIO pin (true = High, false = Low)

Definition at line 29 of file gpio.c.