RTEMS 6.1-rc7
Loading...
Searching...
No Matches
Enumerations | Functions
rpi-gpio.h File Reference

Raspberry Pi 4B specific GPIO definitions. More...

#include <bspopts.h>
#include <rtems/rtems/status.h>

Go to the source code of this file.

Enumerations

enum  raspberrypi_gpio_function {
  GPIO_INPUT , GPIO_OUTPUT , GPIO_AF5 , GPIO_AF4 ,
  GPIO_AF0 , GPIO_AF1 , GPIO_AF2 , GPIO_AF3
}
 Raspberry Pi GPIO functions.
 
enum  raspberrypi_gpio_pull { GPIO_PULL_NONE , GPIO_PULL_UP , GPIO_PULL_DOWN }
 

Functions

rtems_status_code raspberrypi_gpio_set_function (const unsigned int pin, const raspberrypi_gpio_function value)
 Set the operation of the general-purpose I/O pins. Each of the 58 GPIO pins has at least two alternative functions as defined.
 
rtems_status_code raspberrypi_gpio_set_pin (const unsigned int pin)
 Set a GPIO pin.
 
rtems_status_code raspberrypi_gpio_clear_pin (const unsigned int pin)
 Clear a GPIO pin.
 
rtems_status_code raspberrypi_gpio_set_pull (const unsigned int pin, const raspberrypi_gpio_pull value)
 Control the actuation of the internal pull-up/down resistors.
 

Detailed Description

Raspberry Pi 4B specific GPIO definitions.

Function Documentation

◆ raspberrypi_gpio_clear_pin()

rtems_status_code raspberrypi_gpio_clear_pin ( const unsigned int  pin)

Clear a GPIO pin.

Parameters
pinThe GPIO pin.
Return values
RTEMS_SUCCESSFULGPIO pin clear successfully.
RTEMS_INVALID_NUMBERThis status code indicates that a specified number was invalid.

◆ raspberrypi_gpio_set_function()

rtems_status_code raspberrypi_gpio_set_function ( const unsigned int  pin,
const raspberrypi_gpio_function  value 
)

Set the operation of the general-purpose I/O pins. Each of the 58 GPIO pins has at least two alternative functions as defined.

Parameters
pinThe GPIO pin.
valueThe optional functions are GPIO_INPUT, GPIO_OUTPUT, GPIO_AF5, GPIO_AF4, GPIO_AF0, GPIO_AF1, GPIO_AF2, GPIO_AF3.
Return values
RTEMS_SUCCESSFULGPIO function successfully configured.
RTEMS_INVALID_NUMBERThis status code indicates that a specified number was invalid.

◆ raspberrypi_gpio_set_pin()

rtems_status_code raspberrypi_gpio_set_pin ( const unsigned int  pin)

Set a GPIO pin.

Parameters
pinThe GPIO pin.
Return values
RTEMS_SUCCESSFULGPIO pin set successfully.
RTEMS_INVALID_NUMBERThis status code indicates that a specified number was invalid.

◆ raspberrypi_gpio_set_pull()

rtems_status_code raspberrypi_gpio_set_pull ( const unsigned int  pin,
const raspberrypi_gpio_pull  value 
)

Control the actuation of the internal pull-up/down resistors.

Parameters
pinThe GPIO pin.
valueThe optional value are GPIO_PULL_NONE, GPIO_PULL_UP, GPIO_PULL_DOWN.
Return values
RTEMS_SUCCESSFULGPIO pull set successfully.
RTEMS_INVALID_NUMBERThis status code indicates that a specified number was invalid.