csp_system.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_SYSTEM_H_
28 #define _CSP_SYSTEM_H_
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #include <stdint.h>
35 
40 #define COLOR_MASK_COLOR 0x0F
41 
46 #define COLOR_MASK_MODIFIER 0xF0
47 
52 typedef enum {
53  /* Colors */
54  COLOR_RESET = 0xF0,
55  COLOR_BLACK = 0x01,
56  COLOR_RED = 0x02,
57  COLOR_GREEN = 0x03,
58  COLOR_YELLOW = 0x04,
59  COLOR_BLUE = 0x05,
60  COLOR_MAGENTA = 0x06,
61  COLOR_CYAN = 0x07,
62  COLOR_WHITE = 0x08,
63  /* Modifiers */
64  COLOR_NORMAL = 0x0F,
65  COLOR_BOLD = 0x10,
67  COLOR_BLINK = 0x30,
68  COLOR_HIDE = 0x40,
69 } csp_color_t;
70 
79 int csp_sys_tasklist(char * out);
80 
86 int csp_sys_tasklist_size(void);
87 
92 uint32_t csp_sys_memfree(void);
93 
98 int csp_sys_reboot(void);
99 
104 int csp_sys_shutdown(void);
105 
110 void csp_sys_set_color(csp_color_t color);
111 
112 #ifdef __cplusplus
113 } /* extern "C" */
114 #endif
115 
116 #endif // _CSP_SYSTEM_H_
117 
118 /* @} */
Definition: csp_system.h:64
int csp_sys_tasklist(char *out)
Writes out a task list into a pre-allocate buffer, use csp_sys_tasklist_size to get sizeof buffer to ...
Definition: csp_system.h:67
Definition: csp_system.h:61
Definition: csp_system.h:55
csp_color_t
Definition: csp_system.h:52
Definition: csp_system.h:66
int csp_sys_shutdown(void)
int csp_sys_tasklist_size(void)
Definition: csp_system.h:56
Definition: csp_system.h:60
Definition: csp_system.h:54
Definition: csp_system.h:59
Definition: csp_system.h:62
Definition: csp_system.h:68
Definition: csp_system.h:58
int csp_sys_reboot(void)
Definition: csp_system.h:65
void csp_sys_set_color(csp_color_t color)
Definition: csp_system.h:57
uint32_t csp_sys_memfree(void)