From ce0841ecfaca463c93dd5551bc5f45cd9365a938 Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Mon, 31 Oct 2016 14:53:40 +0200 Subject: gpio: add initial implementation. --- src/gpio/gpio_private.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/gpio/gpio_private.h (limited to 'src/gpio/gpio_private.h') diff --git a/src/gpio/gpio_private.h b/src/gpio/gpio_private.h new file mode 100644 index 0000000..4a22570 --- /dev/null +++ b/src/gpio/gpio_private.h @@ -0,0 +1,44 @@ +/* + * The Rin Library – gpio module + * + * Copyright (C) 2016 Gediminas Jakutis + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; version 2.1 + * of the License. + * + * 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef GPIO_PRIVATE_H_INCLUDED +#define GPIO_PRIVATE_H_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include + +/* TODO: make this platform-dependent */ +#define gpio_count 32 + +static struct gpio { + unsigned int num; + enum rin_gpiotype type; + int fd; +} gpio[gpio_count]; + +static void init(void); + +#endif /* GPIO_PRIVATE_H_INCLUDED */ -- cgit v1.2.3