libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
gpio.c
Go to the documentation of this file.
1/** @defgroup gpio_file GPIO
2
3@ingroup LPC17xx
4
5@brief <b>libopencm3 LPC17xx General Purpose I/O</b>
6
7@version 1.0.0
8
9@author @htmlonly &copy; @endhtmlonly 2009 Uwe Hermann <uwe@hermann-uwe.de>
10
11LGPL License Terms @ref lgpl_license
12*/
13
14/*
15 * This file is part of the libopencm3 project.
16 *
17 * Copyright (C) 2010 Uwe Hermann <uwe@hermann-uwe.de>
18 *
19 * This library is free software: you can redistribute it and/or modify
20 * it under the terms of the GNU Lesser General Public License as published by
21 * the Free Software Foundation, either version 3 of the License, or
22 * (at your option) any later version.
23 *
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU Lesser General Public License for more details.
28 *
29 * You should have received a copy of the GNU Lesser General Public License
30 * along with this library. If not, see <http://www.gnu.org/licenses/>.
31 */
32
33/**@{*/
34
36
37void gpio_set(uint32_t gpioport, uint32_t gpios)
38{
39 GPIO_SET(gpioport) = gpios;
40}
41
42void gpio_clear(uint32_t gpioport, uint32_t gpios)
43{
44 GPIO_CLR(gpioport) = gpios;
45}
46
47/**@}*/
48
#define GPIO_CLR(port)
Definition: gpio.h:120
#define GPIO_SET(port)
Definition: gpio.h:112
void gpio_set(uint32_t gpioport, uint32_t gpios)
Definition: gpio.c:37
void gpio_clear(uint32_t gpioport, uint32_t gpios)
Definition: gpio.c:42