hcl_gpio.h
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // hcl_gpio.h - Seiko Epson Hardware Control Library
4 //
5 //
6 // THE SOFTWARE IS RELEASED INTO THE PUBLIC DOMAIN.
7 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
8 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
9 // NONINFRINGEMENT, SECURITY, SATISFACTORY QUALITY, AND FITNESS FOR A
10 // PARTICULAR PURPOSE. IN NO EVENT SHALL EPSON BE LIABLE FOR ANY LOSS, DAMAGE
11 // OR CLAIM, ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF THE
12 // SOFTWARE.
13 //
14 //==============================================================================
15 
16 #pragma once
17 
18 #include <stdint.h>
19 
20 #if RPI
21 // Refer to https://github.com/WiringPi/pins for pin number and mapping
22 #define RPI_GPIO_P1_15 22
23 #define RPI_GPIO_P1_16 23
24 #define RPI_GPIO_P1_18 24
25 
26 #define EPSON_RESET RPI_GPIO_P1_15
27 #define EPSON_CS RPI_GPIO_P1_16
28 #define EPSON_DRDY RPI_GPIO_P1_18
29 
30 #else // PC
31 // Dummy assignments if below signal are not connected to anything
32 #define EPSON_RESET 0
33 #define EPSON_DRDY 0
34 #define EPSON_CS 0
35 #endif // RPI
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 // Prototypes for generic GPIO functions
42 int gpioInit(void);
43 int gpioRelease(void);
44 
45 void gpioSet(uint8_t pin);
46 void gpioClr(uint8_t pin);
47 uint8_t gpioGetPinLevel(uint8_t pin);
48 
49 #ifdef __cplusplus
50 }
51 #endif
gpioGetPinLevel
uint8_t gpioGetPinLevel(uint8_t pin)
Definition: hcl_gpio_rpi.c:79
gpioRelease
int gpioRelease(void)
Definition: hcl_gpio.c:40
gpioClr
void gpioClr(uint8_t pin)
Definition: hcl_gpio_rpi.c:71
gpioInit
int gpioInit(void)
Definition: hcl_gpio.c:32
gpioSet
void gpioSet(uint8_t pin)
Definition: hcl_gpio_rpi.c:63


ess_imu_driver
Author(s):
autogenerated on Wed Dec 11 2024 03:06:30