RTEMS
5.1
|
GPIO library for the lpc176x bsp. More...
#include <assert.h>
#include <bsp/irq.h>
#include <bsp/io.h>
#include <bsp/lpc-gpio.h>
#include <rtems/status-checks.h>
Functions | |
rtems_status_code | lpc176x_gpio_config (const lpc176x_pin_number pin, const lpc176x_gpio_direction dir) |
Configures the pin as input or output GPIO. More... | |
rtems_status_code | lpc176x_gpio_config_input_with_interrupt (const lpc176x_pin_number pin, const lpc176x_gpio_interrupt edge, const lpc176x_gpio_interrupt_function isr_funct) |
Configures the pin as input, enables interrupt for an edge/s and sets isrfunct as the function to call when that interrupt occurs. More... | |
rtems_status_code | lpc176x_gpio_set_pin (const lpc176x_pin_number pin) |
Sets the output pin to 1. More... | |
rtems_status_code | lpc176x_gpio_clear_pin (const lpc176x_pin_number pin) |
Sets the output pin to 0. More... | |
rtems_status_code | lpc176x_gpio_write_pin (const lpc176x_pin_number pin, const bool value) |
Sets the output pin to 0 or 1 according to value. More... | |
rtems_status_code | lpc176x_gpio_get_pin_value (const lpc176x_pin_number pin, bool *pin_value) |
Returns the value at the given input pin. More... | |
GPIO library for the lpc176x bsp.
rtems_status_code lpc176x_gpio_clear_pin | ( | lpc176x_pin_number | pin | ) |
Sets the output pin to 0.
pin | The pin to set |
rtems_status_code lpc176x_gpio_config | ( | lpc176x_pin_number | pin, |
lpc176x_gpio_direction | dir | ||
) |
Configures the pin as input or output GPIO.
pin | The pin to configure |
dir | Input or output. |
rtems_status_code lpc176x_gpio_config_input_with_interrupt | ( | lpc176x_pin_number | pin, |
lpc176x_gpio_interrupt | edge, | ||
lpc176x_gpio_interrupt_function | isrfunct | ||
) |
Configures the pin as input, enables interrupt for an edge/s and sets isrfunct as the function to call when that interrupt occurs.
pin | The pin to configure. |
edge | Which edge or edges will activate the interrupt. |
isrfunct | The function that is called when the interrupt occurs. |
|
inline |
Returns the value at the given input pin.
pin | The pin where to read the value. |
pin_value | TRUE if the pin value was getted successfuly. |
rtems_status_code lpc176x_gpio_set_pin | ( | lpc176x_pin_number | pin | ) |
Sets the output pin to 1.
pin | The pin to set |
rtems_status_code lpc176x_gpio_write_pin | ( | lpc176x_pin_number | pin, |
bool | value | ||
) |
Sets the output pin to 0 or 1 according to value.
pin | The pin to set |
value | the value to set. |