RTEMS  5.0.0
lpc-gpio.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright (c) 2014 Taller Technologies.
11  *
12  * @author Boretto Martin (martin.boretto@tallertechnologies.com)
13  * @author Diaz Marcos (marcos.diaz@tallertechnologies.com)
14  * @author Lenarduzzi Federico (federico.lenarduzzi@tallertechnologies.com)
15  * @author Daniel Chicco (daniel.chicco@tallertechnologies.com)
16  *
17  * The license and distribution terms for this file may be
18  * found in the file LICENSE in this distribution or at
19  * http://www.rtems.org/license/LICENSE.
20  */
21 
22 #ifndef LIBBSP_ARM_LPC176X_GPIO_H
23 #define LIBBSP_ARM_LPC176X_GPIO_H
24 
25 #include <bsp/lpc176x.h>
26 #include <bsp/gpio-defs.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31 
41 );
42 
57 );
58 
65 
72 
81  bool value
82 );
83 
93  bool *pin_value
94 );
95 
96 #ifdef __cplusplus
97 }
98 #endif /* __cplusplus */
99 
100 #endif /* LIBBSP_ARM_LPC176X_GPIO_H */
rtems_status_code lpc176x_gpio_set_pin(lpc176x_pin_number pin)
Sets the output pin to 1.
Definition: lpc-gpio.c:324
rtems_status_code lpc176x_gpio_write_pin(lpc176x_pin_number pin, bool value)
Sets the output pin to 0 or 1 according to value.
Definition: lpc-gpio.c:362
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 cal...
Definition: lpc-gpio.c:303
lpc176x_gpio_interrupt
The interrupt sources edge for a GPIO.
Definition: gpio-defs.h:115
rtems_status_code
Classic API Status.
Definition: status.h:43
rtems_status_code lpc176x_gpio_config(lpc176x_pin_number pin, lpc176x_gpio_direction dir)
Configures the pin as input or output GPIO.
Definition: lpc-gpio.c:33
Specific register definitions according to lpc176x family boards.
lpc176x_gpio_direction
The direction of the GPIO port (input or output).
Definition: gpio-defs.h:103
API definitions of the GPIO driver for the lpc176x bsp in RTEMS.
uint32_t lpc176x_pin_number
A pin of the board.
Definition: common-types.h:32
void(* lpc176x_gpio_interrupt_function)(const lpc176x_pin_number pin, const lpc176x_gpio_interrupt edge)
A function that attends an interrupt for GPIO.
Definition: gpio-defs.h:195
rtems_status_code lpc176x_gpio_clear_pin(lpc176x_pin_number pin)
Sets the output pin to 0.
Definition: lpc-gpio.c:343
rtems_status_code lpc176x_gpio_get_pin_value(lpc176x_pin_number pin, bool *pin_value)
Returns the value at the given input pin.
Definition: lpc-gpio.c:378