RTEMS 6.1-rc5
|
GPIO Driver. More...
#include <rtems/rtems/status.h>
#include <stdint.h>
#include <bsp/rpi-gpio.h>
#include <bsp/raspberrypi.h>
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_clear_pin (const unsigned int pin) |
Clear a GPIO pin. | |
rtems_status_code | raspberrypi_gpio_set_pin (const unsigned int pin) |
Set 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. | |
GPIO Driver.
rtems_status_code raspberrypi_gpio_clear_pin | ( | const unsigned int | pin | ) |
Clear a GPIO pin.
pin | The GPIO pin. |
RTEMS_SUCCESSFUL | GPIO pin clear successfully. |
RTEMS_INVALID_NUMBER | This status code indicates that a specified number was invalid. |
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.
pin | The GPIO pin. |
value | The optional functions are GPIO_INPUT, GPIO_OUTPUT, GPIO_AF5, GPIO_AF4, GPIO_AF0, GPIO_AF1, GPIO_AF2, GPIO_AF3. |
RTEMS_SUCCESSFUL | GPIO function successfully configured. |
RTEMS_INVALID_NUMBER | This status code indicates that a specified number was invalid. |
rtems_status_code raspberrypi_gpio_set_pin | ( | const unsigned int | pin | ) |
Set a GPIO pin.
pin | The GPIO pin. |
RTEMS_SUCCESSFUL | GPIO pin set successfully. |
RTEMS_INVALID_NUMBER | This status code indicates that a specified number was invalid. |
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.
pin | The GPIO pin. |
value | The optional value are GPIO_PULL_NONE, GPIO_PULL_UP, GPIO_PULL_DOWN. |
RTEMS_SUCCESSFUL | GPIO pull set successfully. |
RTEMS_INVALID_NUMBER | This status code indicates that a specified number was invalid. |