dRonin
adbada4
dRonin firmware
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
pios_posix.h
Go to the documentation of this file.
1
11
/*
12
* This program is free software; you can redistribute it and/or modify
13
* it under the terms of the GNU General Public License as published by
14
* the Free Software Foundation; either version 2 of the License, or
15
* (at your option) any later version.
16
*
17
* This program is distributed in the hope that it will be useful, but
18
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20
* for more details.
21
*
22
* You should have received a copy of the GNU General Public License along
23
* with this program; if not, see <http://www.gnu.org/licenses/>
24
*/
25
26
#ifndef PIOS_POSIX_H
27
#define PIOS_POSIX_H
28
29
#include <stdint.h>
30
31
#include <stdbool.h>
32
33
#include <time.h>
34
35
#ifdef PIOS_INCLUDE_SIMSENSORS
36
#ifndef TARGET_MAY_HAVE_BARO
37
#define TARGET_MAY_HAVE_BARO
38
#endif
39
#endif
40
41
#define FILEINFO FILE*
42
43
#define PIOS_SERVO_NUM_OUTPUTS 8
44
#define PIOS_SERVO_NUM_TIMERS PIOS_SERVO_NUM_OUTPUTS
45
46
#if (defined(_WIN32) || defined(WIN32) || defined(__MINGW32__))
47
#include <winsock2.h>
48
#include <ws2tcpip.h>
49
#include <
dronin-strsep.h
>
50
#endif
51
52
#ifdef __MACH__
53
#include <mach/mach_time.h>
54
#endif
/* __MACH__ */
55
56
/* OSX < 10.12 doesn't include clock_gettime and friends */
57
58
#ifndef CLOCK_MONOTONIC
59
60
#define CLOCK_MONOTONIC 2
61
62
#ifndef CLOCK_REALTIME
63
#define CLOCK_REALTIME 1
64
#endif
65
66
typedef
int
clockid_t
;
67
68
#define DRONIN_GETTIME
69
70
struct
timespec;
71
72
int
clock_gettime
(
clockid_t
clk_id,
struct
timespec *t);
73
#endif
74
75
#endif
76
clock_gettime
int clock_gettime(clockid_t clk_id, struct timespec *t)
clockid_t
int clockid_t
Definition:
pios_posix.h:66
dronin-strsep.h
flight
PiOS
posix
inc
pios_posix.h
Generated by
1.8.6