hcl_gpio.c
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // hcl_gpio.c - Seiko Epson Hardware Control Library
4 //
5 // This layer of indirection is added to allow the sample code to call
6 // generic functions to work on multiple hardware platforms. This is generic
7 // implementation for GPIO function which may be needed for optionally
8 // connecting pins RESET#, SPI Chipselect, DataReady, EXT of the IMU
9 //
10 //
11 // THE SOFTWARE IS RELEASED INTO THE PUBLIC DOMAIN.
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // NONINFRINGEMENT, SECURITY, SATISFACTORY QUALITY, AND FITNESS FOR A
15 // PARTICULAR PURPOSE. IN NO EVENT SHALL EPSON BE LIABLE FOR ANY LOSS, DAMAGE
16 // OR CLAIM, ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF THE
17 // SOFTWARE.
18 //
19 //==============================================================================
20 
21 #include <stdint.h>
22 
23 #include "hcl.h"
24 #include "hcl_gpio.h"
25 
26 /*****************************************************************************
27 ** Function name: gpioInit
28 ** Description: Initialize generic GPIO library (if any)
29 ** Parameters: None
30 ** Return value: OK or NG
31 *****************************************************************************/
32 int gpioInit(void) { return OK; }
33 
34 /*****************************************************************************
35 ** Function name: gpioInit
36 ** Description: Release generic GPIO interface (if any)
37 ** Parameters: None
38 ** Return value: OK
39 *****************************************************************************/
40 int gpioRelease(void) { return OK; }
41 
42 /*****************************************************************************
43 ** Function name: gpioSet
44 ** Description: Generic GPIO pin set to HIGH
45 ** Parameters: Pin number
46 ** Return value: None
47 *****************************************************************************/
48 void gpioSet(__attribute__((unused)) uint8_t pin) { return; }
49 
50 /*****************************************************************************
51 ** Function name: gpioClr
52 ** Description: Generic GPIO pin set to LOW
53 ** Parameters: Pin number
54 ** Return value: None
55 *****************************************************************************/
56 void gpioClr(__attribute__((unused)) uint8_t pin) { return; }
57 
58 /*****************************************************************************
59 ** Function name: gpioGetPinLevel
60 ** Description: Generic read GPIO pin status
61 ** Parameters: Pin number
62 ** Return value: 1 = GPIO pin HIGH, 0 = GPIO pin LOW
63 *****************************************************************************/
64 uint8_t gpioGetPinLevel(__attribute__((unused)) uint8_t pin) { return 0; }
hcl_gpio.h
gpioInit
int gpioInit(void)
Definition: hcl_gpio.c:32
hcl.h
gpioGetPinLevel
uint8_t gpioGetPinLevel(__attribute__((unused)) uint8_t pin)
Definition: hcl_gpio.c:64
gpioSet
void gpioSet(__attribute__((unused)) uint8_t pin)
Definition: hcl_gpio.c:48
gpioRelease
int gpioRelease(void)
Definition: hcl_gpio.c:40
gpioClr
void gpioClr(__attribute__((unused)) uint8_t pin)
Definition: hcl_gpio.c:56
OK
#define OK
Definition: hcl.h:26


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