RTEMS 7.0-rc1
Loading...
Searching...
No Matches
lpc-gpio.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
2
11/*
12 * Copyright (c) 2014 Taller Technologies.
13 *
14 * @author Boretto Martin (martin.boretto@tallertechnologies.com)
15 * @author Diaz Marcos (marcos.diaz@tallertechnologies.com)
16 * @author Lenarduzzi Federico (federico.lenarduzzi@tallertechnologies.com)
17 * @author Daniel Chicco (daniel.chicco@tallertechnologies.com)
18 *
19 * The license and distribution terms for this file may be
20 * found in the file LICENSE in this distribution or at
21 * http://www.rtems.org/license/LICENSE.
22 */
23
24#ifndef LIBBSP_ARM_LPC176X_GPIO_H
25#define LIBBSP_ARM_LPC176X_GPIO_H
26
27#include <bsp/lpc176x.h>
28#include <bsp/gpio-defs.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif /* __cplusplus */
33
43);
44
59);
60
67
74
83 bool value
84);
85
95 bool *pin_value
96);
97
98#ifdef __cplusplus
99}
100#endif /* __cplusplus */
101
102#endif /* LIBBSP_ARM_LPC176X_GPIO_H */
uint32_t lpc176x_pin_number
A pin of the board.
Definition: common-types.h:34
API definitions of the GPIO driver for the lpc176x bsp in RTEMS.
lpc176x_gpio_direction
The direction of the GPIO port (input or output).
Definition: gpio-defs.h:105
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:197
lpc176x_gpio_interrupt
The interrupt sources edge for a GPIO.
Definition: gpio-defs.h:117
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
rtems_status_code lpc176x_gpio_set_pin(lpc176x_pin_number pin)
Sets the output pin to 1.
Definition: lpc-gpio.c:328
rtems_status_code lpc176x_gpio_clear_pin(lpc176x_pin_number pin)
Sets the output pin to 0.
Definition: lpc-gpio.c:347
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:382
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:307
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:35
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:366
Specific register definitions according to lpc176x family boards.