csp_clock.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 
27 #ifndef _CSP_CLOCK_H_
28 #define _CSP_CLOCK_H_
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #include <stdint.h>
35 
36 typedef struct {
37  uint32_t tv_sec;
38  uint32_t tv_nsec;
40 
41 /* User functions required */
42 __attribute__((weak))
43 extern void clock_get_time(csp_timestamp_t * time);
44 
45 __attribute__((weak))
46 extern void clock_set_time(csp_timestamp_t * time);
47 
48 #ifdef __cplusplus
49 } /* extern "C" */
50 #endif
51 
52 #endif // _CSP_CLOCK_H_
53 
54 /* @} */
uint32_t tv_sec
Definition: csp_clock.h:37
uint32_t tv_nsec
Definition: csp_clock.h:38
Definition: csp_clock.h:36
void clock_set_time(csp_timestamp_t *time)
void clock_get_time(csp_timestamp_t *time)