RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Functions
lpc-gpio.h File Reference

API of the GPIO driver for the lpc176x bsp in RTEMS. More...

#include <bsp/lpc176x.h>
#include <bsp/gpio-defs.h>

Go to the source code of this file.

Functions

rtems_status_code lpc176x_gpio_config (lpc176x_pin_number pin, lpc176x_gpio_direction dir)
 Configures the pin as input or output GPIO.
 
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.
 
rtems_status_code lpc176x_gpio_set_pin (lpc176x_pin_number pin)
 Sets the output pin to 1.
 
rtems_status_code lpc176x_gpio_clear_pin (lpc176x_pin_number pin)
 Sets the output pin to 0.
 
rtems_status_code lpc176x_gpio_write_pin (lpc176x_pin_number pin, bool value)
 Sets the output pin to 0 or 1 according to value.
 
rtems_status_code lpc176x_gpio_get_pin_value (lpc176x_pin_number pin, bool *pin_value)
 Returns the value at the given input pin.
 

Detailed Description

API of the GPIO driver for the lpc176x bsp in RTEMS.

Function Documentation

◆ lpc176x_gpio_clear_pin()

rtems_status_code lpc176x_gpio_clear_pin ( lpc176x_pin_number  pin)

Sets the output pin to 0.

Parameters
pinThe pin to set

◆ lpc176x_gpio_config()

rtems_status_code lpc176x_gpio_config ( lpc176x_pin_number  pin,
lpc176x_gpio_direction  dir 
)

Configures the pin as input or output GPIO.

Parameters
pinThe pin to configure
dirInput or output.

◆ lpc176x_gpio_config_input_with_interrupt()

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.

Parameters
pinThe pin to configure.
edgeWhich edge or edges will activate the interrupt.
isrfunctThe function that is called when the interrupt occurs.
Returns
RTEMS_SUCCESSFULL if the configurations was success.

◆ lpc176x_gpio_get_pin_value()

rtems_status_code lpc176x_gpio_get_pin_value ( lpc176x_pin_number  pin,
bool *  pin_value 
)
inline

Returns the value at the given input pin.

Parameters
pinThe pin where to read the value.
pin_valueTRUE if the pin value was getted successfuly.
Returns
RTEMS_SUCCESSFUL if the pin value was getted successfuly.

◆ lpc176x_gpio_set_pin()

rtems_status_code lpc176x_gpio_set_pin ( lpc176x_pin_number  pin)

Sets the output pin to 1.

Parameters
pinThe pin to set

◆ lpc176x_gpio_write_pin()

rtems_status_code lpc176x_gpio_write_pin ( lpc176x_pin_number  pin,
bool  value 
)

Sets the output pin to 0 or 1 according to value.

Parameters
pinThe pin to set
valuethe value to set.