osal.h
Go to the documentation of this file.
1 /*
2  * Licensed under the GNU General Public License version 2 with exceptions. See
3  * LICENSE file in the project root for full license information
4  */
5 
6 #ifndef _osal_
7 #define _osal_
8 
9 #ifdef __cplusplus
10 extern "C"
11 {
12 #endif
13 
14 #include "osal_defs.h"
15 #include <stdint.h>
16 
17 /* General types */
18 #ifndef TRUE
19 #define TRUE 1
20 #endif
21 #ifndef FALSE
22 #define FALSE 0
23 #endif
24 typedef uint8_t boolean;
25 typedef int8_t int8;
26 typedef int16_t int16;
27 typedef int32_t int32;
28 typedef uint8_t uint8;
29 typedef uint16_t uint16;
30 typedef uint32_t uint32;
31 typedef int64_t int64;
32 typedef uint64_t uint64;
33 typedef float float32;
34 typedef double float64;
35 
36 typedef struct
37 {
38  uint32 sec; /*< Seconds elapsed since the Epoch (Jan 1, 1970) */
39  uint32 usec; /*< Microseconds elapsed since last second boundary */
40 } ec_timet;
41 
42 typedef struct osal_timer
43 {
45 } osal_timert;
46 
47 void osal_timer_start(osal_timert * self, uint32 timeout_us);
48 boolean osal_timer_is_expired(osal_timert * self);
49 int osal_usleep(uint32 usec);
51 void osal_time_diff(ec_timet *start, ec_timet *end, ec_timet *diff);
52 int osal_thread_create(void *thandle, int stacksize, void *func, void *param);
53 int osal_thread_create_rt(void *thandle, int stacksize, void *func, void *param);
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 
59 #endif
uint8_t
unsigned char uint8_t
Definition: stdint.h:78
int8_t
signed char int8_t
Definition: stdint.h:75
uint16_t
unsigned short uint16_t
Definition: stdint.h:79
uint32
uint32_t uint32
Definition: osal.h:30
boolean
uint8_t boolean
Definition: osal.h:24
int16
int16_t int16
Definition: osal.h:26
int64
int64_t int64
Definition: osal.h:31
int32
int32_t int32
Definition: osal.h:27
uint8
uint8_t uint8
Definition: osal.h:28
uint64
uint64_t uint64
Definition: osal.h:32
int16_t
signed short int16_t
Definition: stdint.h:76
uint32_t
unsigned int uint32_t
Definition: stdint.h:80
osal_timert
struct osal_timer osal_timert
osal_timer
Definition: osal.h:42
uint64_t
unsigned __int64 uint64_t
Definition: stdint.h:90
uint16
uint16_t uint16
Definition: osal.h:29
osal_current_time
ec_timet osal_current_time(void)
Definition: erika/osal.c:37
stdint.h
osal_thread_create_rt
int osal_thread_create_rt(void *thandle, int stacksize, void *func, void *param)
Definition: linux/osal.c:119
float32
float float32
Definition: osal.h:33
float64
double float64
Definition: osal.h:34
int64_t
signed __int64 int64_t
Definition: stdint.h:89
osal_usleep
int osal_usleep(uint32 usec)
Definition: erika/osal.c:22
osal_time_diff
void osal_time_diff(ec_timet *start, ec_timet *end, ec_timet *diff)
Definition: erika/osal.c:48
int32_t
signed int int32_t
Definition: stdint.h:77
osal_timer_start
void osal_timer_start(osal_timert *self, uint32 timeout_us)
Definition: erika/osal.c:59
ec_timet::usec
uint32 usec
Definition: osal.h:39
osal_thread_create
int osal_thread_create(void *thandle, int stacksize, void *func, void *param)
Definition: linux/osal.c:102
ec_timet
Definition: osal.h:36
int8
int8_t int8
Definition: osal.h:25
osal_timer::stop_time
ec_timet stop_time
Definition: osal.h:44
osal_timer_is_expired
boolean osal_timer_is_expired(osal_timert *self)
Definition: erika/osal.c:74
ec_timet::sec
uint32 sec
Definition: osal.h:38


soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49