hcl_linux.c
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // hcl_linux.c - Seiko Epson Hardware Control Library
4 //
5 // This layer of indirection is added to allow the sample code to call generic
6 // functions to work on linux-based hardware platforms.
7 //
8 //
9 // THE SOFTWARE IS RELEASED INTO THE PUBLIC DOMAIN.
10 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
11 // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT,
12 // SECURITY, SATISFACTORY QUALITY, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
13 // SHALL EPSON BE LIABLE FOR ANY LOSS, DAMAGE OR CLAIM, ARISING FROM OR IN CONNECTION
14 // WITH THE SOFTWARE OR THE USE OF THE SOFTWARE.
15 //
16 //==============================================================================
17 #include <stdint.h>
18 #include <stdio.h>
19 #include "hcl.h"
20 
21 
22 /*****************************************************************************
23 ** Function name: seInit
24 ** Description: Initialize the Seiko Epson HCL libraries.
25 ** Parameters: None
26 ** Return value: 1=success
27 *****************************************************************************/
28 int seInit(void)
29 {
30  printf("...done.");
31 
32  return SUCCESS;
33 }
34 
35 
36 /*****************************************************************************
37 ** Function name: seRelease
38 ** Description: Release any resources held by this module.
39 ** Parameters: None
40 ** Return value: 1=success
41 *****************************************************************************/
42 int seRelease(void)
43 {
44  return SUCCESS;
45 }
46 
47 
48 /*****************************************************************************
49 ** Function name: seDelayMS
50 ** Description: Call this function to generate delay in milliseconds.
51 ** Parameters: Time in milliseconds
52 ** Return value: None
53 *****************************************************************************/
54 void seDelayMS(uint32_t millis)
55 {
56  millis *= 1000;
57  usleep(millis);
58 }
59 
60 
61 /*****************************************************************************
62 ** Function name: seDelayMicroSecs
63 ** Description: Call this function to generate delay in microseconds.
64 ** Parameters: Time in milliseconds
65 ** Return value: None
66 *****************************************************************************/
67 void seDelayMicroSecs(uint32_t micros)
68 {
69  usleep(micros);
70 }
71 
int seInit(void)
Definition: hcl_linux.c:28
#define SUCCESS
Definition: hcl.h:28
int seRelease(void)
Definition: hcl_linux.c:42
void seDelayMS(uint32_t millis)
Definition: hcl_linux.c:54
void seDelayMicroSecs(uint32_t micros)
Definition: hcl_linux.c:67


epson_g364_imu_driver
Author(s):
autogenerated on Mon Jun 10 2019 13:12:32