Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
gpio_arch.h File Reference

GPIO helper functions for linux/omap. More...

#include "std.h"
+ Include dependency graph for gpio_arch.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef uint32_t gpio_port_t
 

Functions

void gpio_setup_output (uint32_t port, uint16_t gpios)
 Setup one or more pins of the given GPIO port as outputs. More...
 
void gpio_setup_input (uint32_t port, uint16_t gpios)
 Setup one or more pins of the given GPIO port as inputs. More...
 
void gpio_set (uint32_t port, uint16_t pin)
 Set a gpio output to high level. More...
 
void gpio_clear (uint32_t port, uint16_t pin)
 Clear a gpio output to low level. More...
 
uint16_t gpio_get (uint32_t gpioport, uint16_t gpios)
 Read a gpio value. More...
 

Detailed Description

GPIO helper functions for linux/omap.

Todo:
implement gpio_set|clear

Definition in file gpio_arch.h.

Typedef Documentation

◆ gpio_port_t

Definition at line 34 of file gpio_arch.h.

Function Documentation

◆ gpio_clear()

void gpio_clear ( uint32_t  port,
uint16_t  pin 
)

Clear a gpio output to low level.

Definition at line 37 of file gpio_arch.c.

References GPIO_WRITE, gpiofp, gpio_data::pin, and gpio_data::value.

◆ gpio_get()

uint16_t gpio_get ( uint32_t  gpioport,
uint16_t  gpios 
)

Read a gpio value.

Definition at line 39 of file gpio_arch.c.

References GPIO_READ, gpiofp, gpio_data::pin, and gpio_data::value.

◆ gpio_set()

void gpio_set ( uint32_t  port,
uint16_t  pin 
)

Set a gpio output to high level.

Definition at line 35 of file gpio_arch.c.

References GPIO_WRITE, gpiofp, gpio_data::pin, and gpio_data::value.

◆ gpio_setup_input()

void gpio_setup_input ( uint32_t  port,
uint16_t  gpios 
)

Setup one or more pins of the given GPIO port as inputs.

Parameters
[in]port
[in]gpiosIf multiple pins are to be changed, use logical OR '|' to separate them.

Definition at line 33 of file gpio_arch.c.

◆ gpio_setup_output()

void gpio_setup_output ( uint32_t  port,
uint16_t  gpios 
)

Setup one or more pins of the given GPIO port as outputs.

Parameters
[in]port
[in]gpiosIf multiple pins are to be changed, use logical OR '|' to separate them.

Definition at line 31 of file gpio_arch.c.