Revision f3ac1c96 core/src/aos_system.c

View differences:

core/src/aos_system.c
37 37
#include <rt_test_root.h>
38 38
#endif
39 39

  
40
/******************************************************************************/
41
/* LOCAL DEFINITIONS                                                          */
42
/******************************************************************************/
43

  
40 44
/**
41 45
 * @brief   Period of the system timer.
42 46
 */
......
52 56
 */
53 57
#define SYSTEM_INFO_NAMEWIDTH         14
54 58

  
55
/* forward declarations */
56
static void _printSystemInfo(BaseSequentialStream* stream);
57
#if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true)
59
#if ((AMIROOS_CFG_SSSP_ENABLE == true) && (AMIROOS_CFG_SSSP_MASTER != true) && (AMIROOS_CFG_PROFILE == true)) || defined(__DOXYGEN__)
60

  
61
/**
62
 * @brief   Weighting factor for the low-pass filter used for calculating the @p _syssyncskew value.
63
 */
64
#define SYSTEM_SYSSYNCSKEW_LPFACTOR   (0.1f / AOS_SYSTEM_TIME_RESOLUTION)
65

  
66
#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) && (AMIROOS_CFG_SSSP_MASTER != true) && (AMIROOS_CFG_PROFILE == true) */
67

  
68
/******************************************************************************/
69
/* EXPORTED VARIABLES                                                         */
70
/******************************************************************************/
71

  
72
/**
73
 * @brief   Global system object.
74
 */
75
aos_system_t aos;
76

  
77
/******************************************************************************/
78
/* LOCAL TYPES                                                                */
79
/******************************************************************************/
80

  
81
/******************************************************************************/
82
/* LOCAL VARIABLES                                                            */
83
/******************************************************************************/
84

  
85
/*
86
 * forward declarations
87
 */
88
#if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
58 89
static int _shellcmd_configcb(BaseSequentialStream* stream, int argc, char* argv[]);
59 90
static int _shellcmd_infocb(BaseSequentialStream* stream, int argc, char* argv[]);
60 91
static int _shellcmd_shutdowncb(BaseSequentialStream* stream, int argc, char* argv[]);
61
#if (AMIROOS_CFG_TESTS_ENABLE == true)
92
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
62 93
static int _shellcmd_kerneltestcb(BaseSequentialStream* stream, int argc, char* argv[]);
63 94
#endif /* AMIROOS_CFG_TESTS_ENABLE == true */
64 95
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) */
......
88 119
 * @brief   Last uptime of system wide time synchronization.
89 120
 */
90 121
static aos_timestamp_t _syssynctime;
91
#endif
122
#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) && (AMIROOS_CFG_SSSP_MASTER == true) */
92 123

  
93 124
#if ((AMIROOS_CFG_SSSP_ENABLE == true) && (AMIROOS_CFG_SSSP_MASTER != true) && (AMIROOS_CFG_PROFILE == true)) || defined(__DOXYGEN__)
94 125
/**
......
96 127
 */
97 128
static float _syssyncskew;
98 129

  
99
/**
100
 * @brief   Weighting factor for the low-pass filter used for calculating the @p _syssyncskew value.
101
 */
102
#define SYSTEM_SYSSYNCSKEW_LPFACTOR   (0.1f / AOS_SYSTEM_TIME_RESOLUTION)
103 130
#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) && (AMIROOS_CFG_SSSP_MASTER != true) && (AMIROOS_CFG_PROFILE == true) */
104 131

  
105 132
#if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
......
161 188
#endif /* AMIROOS_CFG_TESTS_ENABLE == true */
162 189
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) */
163 190

  
164
/**
165
 * @brief   Global system object.
166
 */
167
aos_system_t aos;
191
/******************************************************************************/
192
/* LOCAL FUNCTIONS                                                            */
193
/******************************************************************************/
168 194

  
169 195
/**
170 196
 * @brief   Print a separator line.
......
751 777
}
752 778
#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) && (AMIROOS_CFG_SSSP_MASTER == true) */
753 779

  
780
/******************************************************************************/
781
/* EXPORTED FUNCTIONS                                                         */
782
/******************************************************************************/
783

  
754 784
/**
755 785
 * @brief   AMiRo-OS system initialization.
756 786
 * @note    Must be called from the system control thread (usually main thread).

Also available in: Unified diff