-
Notifications
You must be signed in to change notification settings - Fork 0
/
hcl_gpio.c
64 lines (57 loc) · 2.89 KB
/
hcl_gpio.c
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//==============================================================================
//
// hcl_gpio.c - Seiko Epson Hardware Control Library
//
// This layer of indirection is added to allow the sample code to call
// generic functions to work on multiple hardware platforms. This is generic
// implementation for GPIO function which may be needed for optionally
// connecting pins RESET#, SPI Chipselect, DataReady, EXT of the IMU
//
//
// THE SOFTWARE IS RELEASED INTO THE PUBLIC DOMAIN.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// NONINFRINGEMENT, SECURITY, SATISFACTORY QUALITY, AND FITNESS FOR A
// PARTICULAR PURPOSE. IN NO EVENT SHALL EPSON BE LIABLE FOR ANY LOSS, DAMAGE
// OR CLAIM, ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF THE
// SOFTWARE.
//
//==============================================================================
#include <stdint.h>
#include "hcl.h"
#include "hcl_gpio.h"
/*****************************************************************************
** Function name: gpioInit
** Description: Initialize generic GPIO library (if any)
** Parameters: None
** Return value: OK or NG
*****************************************************************************/
int gpioInit(void) { return OK; }
/*****************************************************************************
** Function name: gpioInit
** Description: Release generic GPIO interface (if any)
** Parameters: None
** Return value: OK
*****************************************************************************/
int gpioRelease(void) { return OK; }
/*****************************************************************************
** Function name: gpioSet
** Description: Generic GPIO pin set to HIGH
** Parameters: Pin number
** Return value: None
*****************************************************************************/
void gpioSet(__attribute__((unused)) uint8_t pin) { return; }
/*****************************************************************************
** Function name: gpioClr
** Description: Generic GPIO pin set to LOW
** Parameters: Pin number
** Return value: None
*****************************************************************************/
void gpioClr(__attribute__((unused)) uint8_t pin) { return; }
/*****************************************************************************
** Function name: gpioGetPinLevel
** Description: Generic read GPIO pin status
** Parameters: Pin number
** Return value: 1 = GPIO pin HIGH, 0 = GPIO pin LOW
*****************************************************************************/
uint8_t gpioGetPinLevel(__attribute__((unused)) uint8_t pin) { return 0; }