csp_time.h
Go to the documentation of this file.
1 /*
2 Cubesat Space Protocol - A small network-layer protocol designed for Cubesats
3 Copyright (C) 2012 Gomspace ApS (http://www.gomspace.com)
4 Copyright (C) 2012 AAUSAT3 Project (http://aausat3.space.aau.dk)
5 
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10 
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15 
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
26 #ifndef _CSP_TIME_H_
27 #define _CSP_TIME_H_
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include <stdint.h>
34 #include <csp/csp.h>
35 
36 /* Blackfin/x86 on Linux */
37 #if defined(CSP_POSIX)
38 
39 #include <time.h>
40 #include <sys/time.h>
41 #include <limits.h>
42 
43 #endif // CSP_POSIX
44 
45 /* AVR/ARM on FreeRTOS */
46 #if defined(CSP_FREERTOS)
47 
48 #include <FreeRTOS.h>
49 #include <task.h>
50 
51 #endif // CSP_FREERTOS
52 
53 uint32_t csp_get_ms(void);
54 uint32_t csp_get_ms_isr(void);
55 uint32_t csp_get_s(void);
56 uint32_t csp_get_s_isr(void);
57 
58 #ifdef __cplusplus
59 } /* extern "C" */
60 #endif
61 
62 #endif // _CSP_TIME_H_
63 
64 /* @} */
uint32_t csp_get_ms(void)
uint32_t csp_get_ms_isr(void)
uint32_t csp_get_s(void)
uint32_t csp_get_s_isr(void)