include
sr_hand_detector
soem
osal.h
Go to the documentation of this file.
1
/******************************************************************************
2
* * *** ***
3
* *** *** ***
4
* *** **** ********** *** ***** *** **** *****
5
* ********* ********** *** ********* ************ *********
6
* **** *** *** *** *** **** ***
7
* *** *** ****** *** *********** *** **** *****
8
* *** *** ****** *** ************* *** **** *****
9
* *** **** **** *** *** *** **** ***
10
* *** ******* ***** ************** ************* *********
11
* *** ***** *** ******* ** ** ****** *****
12
* t h e r e a l t i m e t a r g e t e x p e r t s
13
*
14
* http://www.rt-labs.com
15
* Copyright (C) 2009. rt-labs AB, Sweden. All rights reserved.
16
*------------------------------------------------------------------------------
17
* $Id: osal.h 452 2013-02-26 21:02:58Z smf.arthur $
18
*------------------------------------------------------------------------------
19
*/
20
21
#ifndef _osal_
22
#define _osal_
23
24
#include <stdint.h>
25
26
/* General types */
27
typedef
uint8_t
boolean
;
28
#define TRUE 1
29
#define FALSE 0
30
typedef
int8_t
int8
;
31
typedef
int16_t
int16
;
32
typedef
int32_t
int32
;
33
typedef
uint8_t
uint8
;
34
typedef
uint16_t
uint16
;
35
typedef
uint32_t
uint32
;
36
typedef
int64_t
int64
;
37
typedef
uint64_t
uint64
;
38
typedef
float
float32
;
39
typedef
double
float64
;
40
41
#ifndef PACKED
42
#ifdef _MSC_VER
43
#define PACKED_BEGIN __pragma(pack(push, 1))
44
#define PACKED
45
#define PACKED_END __pragma(pack(pop))
46
#elif defined(__GNUC__)
47
#define PACKED_BEGIN
48
#define PACKED __attribute__((__packed__))
49
#define PACKED_END
50
#endif
51
#endif
52
53
typedef
struct
54
{
55
uint32
sec
;
/*< Seconds elapsed since the Epoch (Jan 1, 1970) */
56
uint32
usec
;
/*< Microseconds elapsed since last second boundary */
57
}
ec_timet
;
58
59
typedef
struct
osal_timer
60
{
61
ec_timet
stop_time
;
62
}
osal_timert
;
63
64
void
osal_timer_start
(
osal_timert
*
self
,
uint32
timeout_us);
65
boolean
osal_timer_is_expired
(
const
osal_timert
*
self
);
66
int
osal_usleep
(
uint32
usec);
67
ec_timet
osal_current_time
(
void
);
68
69
#endif
uint32
uint32_t uint32
Definition:
osal.h:35
boolean
uint8_t boolean
Definition:
osal.h:27
int16
int16_t int16
Definition:
osal.h:31
int64
int64_t int64
Definition:
osal.h:36
int32
int32_t int32
Definition:
osal.h:32
uint8
uint8_t uint8
Definition:
osal.h:33
uint64
uint64_t uint64
Definition:
osal.h:37
osal_timert
struct osal_timer osal_timert
osal_timer
Definition:
osal.h:59
osal_timer_is_expired
boolean osal_timer_is_expired(const osal_timert *self)
Definition:
osal.c:78
uint16
uint16_t uint16
Definition:
osal.h:34
osal_current_time
ec_timet osal_current_time(void)
Definition:
osal.c:52
float32
float float32
Definition:
osal.h:38
float64
double float64
Definition:
osal.h:39
osal_usleep
int osal_usleep(uint32 usec)
Definition:
osal.c:28
osal_timer_start
void osal_timer_start(osal_timert *self, uint32 timeout_us)
Definition:
osal.c:63
ec_timet::usec
uint32 usec
Definition:
osal.h:56
ec_timet
Definition:
osal.h:53
int8
int8_t int8
Definition:
osal.h:30
osal_timer::stop_time
ec_timet stop_time
Definition:
osal.h:61
ec_timet::sec
uint32 sec
Definition:
osal.h:55
sr_hand_detector
Author(s):
autogenerated on Sat Sep 24 2022 02:26:10