-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgpio.h
33 lines (25 loc) · 826 Bytes
/
gpio.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef RPI_GPIO_H
#define RPI_GPIO_H
/**
* Copyright by Andrea Cervesato <[email protected]>
*
* 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.
**/
#define GPIO_STATUS_HIGH 1
#define GPIO_STATUS_LOW 0
#define GPIO_NO_ERROR 0
#define GPIO_SETUP_FAILED -1
#define GPIO_CLEANUP_FAILED = -2
int rpi_gpio_setup(void);
int rpi_gpio_cleanup(void);
void rpi_gpio_set_input(int port);
void rpi_gpio_set_output(int port);
void rpi_gpio_write_status(int port, int status);
int rpi_gpio_read_status(int port);
void rpi_gpio_fast_up(int port);
void rpi_gpio_fast_down(int port);
int rpi_gpio_fast_read(int port);
#endif