From 1b2f6456bf032d10be4420f35384a528eb766581 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Thu, 16 Jul 2009 03:20:12 +0200 Subject: Add some initial gpio.h #defines. --- include/libopenstm32/gpio.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 include/libopenstm32/gpio.h (limited to 'include') diff --git a/include/libopenstm32/gpio.h b/include/libopenstm32/gpio.h new file mode 100644 index 0000000..850a698 --- /dev/null +++ b/include/libopenstm32/gpio.h @@ -0,0 +1,38 @@ +/* + * This file is part of the libopenstm32 project. + * + * Copyright (C) 2009 Uwe Hermann + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef LIBOPENSTM32_GPIO_H +#define LIBOPENSTM32_GPIO_H + +#define GPIO_CTRL_LO 0x00 +#define GPIO_CTRL_HI 0x04 +#define GPIO_INPUT_DATA 0x08 +#define GPIO_OUTPUT_DATA 0x0c +#define GPIO_BIT_SET_RESET 0x10 +#define GPIO_BIT_RESET 0x14 +#define GPIO_LOCK 0x18 + +/* TODO */ + +void gpio_set(int gpio); +void gpio_clear(int gpio); +void gpio_toggle(int gpio); + +#endif -- cgit v1.2.3