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 {
62 } osal_timert;
63 
64 void osal_timer_start (osal_timert * self, uint32 timeout_us);
65 boolean osal_timer_is_expired (osal_timert * self);
66 int osal_usleep (uint32 usec);
68 
69 #endif
float float32
Definition: osal.h:38
uint8_t uint8
Definition: osal.h:33
uint32 usec
Definition: osal.h:56
unsigned short uint16_t
Definition: stdint.h:79
double float64
Definition: osal.h:39
uint16_t uint16
Definition: osal.h:34
unsigned char uint8_t
Definition: stdint.h:78
boolean osal_timer_is_expired(osal_timert *self)
Definition: linux/osal.c:78
uint8_t boolean
Definition: osal.h:27
ec_timet osal_current_time(void)
Definition: linux/osal.c:52
Definition: osal.h:53
unsigned int uint32_t
Definition: stdint.h:80
signed short int16_t
Definition: stdint.h:76
int64_t int64
Definition: osal.h:36
int osal_usleep(uint32 usec)
Definition: linux/osal.c:28
unsigned __int64 uint64_t
Definition: stdint.h:90
int32_t int32
Definition: osal.h:32
int8_t int8
Definition: osal.h:30
signed char int8_t
Definition: stdint.h:75
uint64_t uint64
Definition: osal.h:37
ec_timet stop_time
Definition: osal.h:61
void osal_timer_start(osal_timert *self, uint32 timeout_us)
Definition: linux/osal.c:63
signed __int64 int64_t
Definition: stdint.h:89
uint32 sec
Definition: osal.h:55
uint32_t uint32
Definition: osal.h:35
int16_t int16
Definition: osal.h:31
signed int int32_t
Definition: stdint.h:77
struct osal_timer osal_timert


youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Jun 10 2019 15:46:24