RasPi Direct Hardware Access
Integrated peripheral access without operating system drivers.
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Enumerations | Functions
General-Purpose I/O (GPIO)

Helper functions for configuring and accessing GPIO pins. More...

Enumerations

enum  raspi_GPIO_function {
  Input = 0, Output = 1, Alt0 = 4, Alt1 = 5,
  Alt2 = 6, Alt3 = 7, Alt4 = 3, Alt5 = 2
}
 Select between GPIO input, GPIO output, or one of the alternate (peripheral) functions.
 

Functions

static void gpio_configure (int gpio, raspi_GPIO_function function)
 Configure GPIO gpio for function function.
 
static void gpio_set (int gpio)
 Set (to logical high) GPIO output gpio.
 
static void gpio_clear (int gpio)
 Clear (set to logical low) GPIO output gpio.
 
static uint32_t gpio_read (int gpio)
 Return true (but not neccessarily 1) if GPIO input gpio is driven high.
 

Detailed Description

Helper functions for configuring and accessing GPIO pins.

Declared in raspi/hw.h.