Raspberry Pi GPIO Library  0.3
Library allowing for control of the Raspberry Pi's GPIO pins.
gpio.h
Go to the documentation of this file.
1 
28 #ifndef _GPIO_H_
29 #define _GPIO_H_
30 
31 #include "rpiGpio.h"
32 #include <stdarg.h>
33 #include <stdlib.h>
34 #include <string.h>
35 #include <fcntl.h>
36 #include <sys/mman.h>
37 #include <unistd.h>
38 #include <errno.h>
39 #include <stdio.h>
40 #include <time.h>
41 
44 #define GPIO_MAP_SIZE (GPPUDCLK1_OFFSET)
45 
47 #define NUMBER_GPIO 17
48 
51 #define RESISTOR_SLEEP_US 1
52 
54 #define GPIO_GPSET0 *(gGpioMap + GPSET0_OFFSET / sizeof(uint32_t))
55 
56 #define GPIO_GPCLR0 *(gGpioMap + GPCLR0_OFFSET / sizeof(uint32_t))
57 
58 #define GPIO_GPLEV0 *(gGpioMap + GPLEV0_OFFSET / sizeof(uint32_t))
59 
60 #define GPIO_GPPUD *(gGpioMap + GPPUD_OFFSET / sizeof(uint32_t))
61 
62 #define GPIO_GPPUDCLK0 *(gGpioMap + GPPUDCLK0_OFFSET / sizeof(uint32_t))
63 
64 #endif /*_GPIO_H_*/
65 
66 
The main header file of the GPIO library.