Revision 4c72a54c core/src/aos_system.c
| core/src/aos_system.c | ||
|---|---|---|
| 147 | 147 |
/** |
| 148 | 148 |
* @brief Shell command to retrieve system information. |
| 149 | 149 |
*/ |
| 150 |
static aos_shellcommand_t _shellcmd_info = {
|
|
| 151 |
/* name */ "module:info", |
|
| 152 |
/* callback */ _shellcmd_infocb, |
|
| 153 |
/* next */ NULL, |
|
| 154 |
}; |
|
| 150 |
static AOS_SHELL_COMMAND(_shellcmd_info, "module:info", _shellcmd_infocb); |
|
| 155 | 151 |
|
| 156 | 152 |
/** |
| 157 | 153 |
* @brief Shell command to set or retrieve system configuration. |
| 158 | 154 |
*/ |
| 159 |
static aos_shellcommand_t _shellcmd_config = {
|
|
| 160 |
/* name */ "module:config", |
|
| 161 |
/* callback */ _shellcmd_configcb, |
|
| 162 |
/* next */ NULL, |
|
| 163 |
}; |
|
| 155 |
static AOS_SHELL_COMMAND(_shellcmd_config, "module:config", _shellcmd_configcb); |
|
| 164 | 156 |
|
| 165 | 157 |
/** |
| 166 | 158 |
* @brief Shell command to shutdown the system. |
| 167 | 159 |
*/ |
| 168 |
static aos_shellcommand_t _shellcmd_shutdown = {
|
|
| 169 | 160 |
#if (AMIROOS_CFG_SSSP_ENABLE == true) |
| 170 |
/* name */ "system:shutdown",
|
|
| 161 |
static AOS_SHELL_COMMAND(_shellcmd_shutdown, "system:shutdown", _shellcmd_shutdowncb);
|
|
| 171 | 162 |
#else /* (AMIROOS_CFG_SSSP_ENABLE == true) */ |
| 172 |
/* name */ "module:shutdown",
|
|
| 163 |
static AOS_SHELL_COMMAND(_shellcmd_shutdown, "module:shutdown", _shellcmd_shutdowncb);
|
|
| 173 | 164 |
#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) */ |
| 174 |
/* callback */ _shellcmd_shutdowncb, |
|
| 175 |
/* next */ NULL, |
|
| 176 |
}; |
|
| 177 | 165 |
|
| 178 | 166 |
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__) |
| 179 | 167 |
/** |
| 180 | 168 |
* @brief Shell kommand to run a test of the ChibiOS/RT kernel. |
| 181 | 169 |
*/ |
| 182 |
static aos_shellcommand_t _shellcmd_kerneltest = {
|
|
| 183 |
/* name */ "kernel:test", |
|
| 184 |
/* callback */ _shellcmd_kerneltestcb, |
|
| 185 |
/* next */ NULL, |
|
| 186 |
}; |
|
| 170 |
static AOS_SHELL_COMMAND(_shellcmd_kerneltest, "kernel:test", _shellcmd_kerneltestcb); |
|
| 187 | 171 |
#endif /* (AMIROOS_CFG_TESTS_ENABLE == true) */ |
| 188 | 172 |
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) */ |
| 189 | 173 |
|
| ... | ... | |
| 561 | 545 |
#if (AMIROOS_CFG_DBG == true) |
| 562 | 546 |
chprintf(stream, "\tthread stack size: %u bytes\n", aosThdGetStacksize(aos.shell.thread)); |
| 563 | 547 |
#if (CH_DBG_FILL_THREADS == TRUE) |
| 564 |
chprintf(stream, "\tstack peak utilization: %u bytes (%.2f%%)\n", aosThdGetStackPeakUtilization(aos.shell.thread), (float)aosThdGetStackPeakUtilization(aos.shell.thread) / (float)aosThdGetStacksize(aos.shell.thread) * 100.0f);
|
|
| 548 |
chprintf(stream, "\tstack peak utilization: %u bytes (%.2f%%)\n", aosThdGetStackPeakUtilization(aos.shell.thread), (float)(aosThdGetStackPeakUtilization(aos.shell.thread)) / (float)(aosThdGetStacksize(aos.shell.thread)) * 100.0f);
|
|
| 565 | 549 |
#endif /* (CH_DBG_FILL_THREADS == TRUE) */ |
| 566 | 550 |
#endif /* (AMIROOS_CFG_DBG == true) */ |
| 567 | 551 |
_printSystemInfoSeparator(stream, '=', SYSTEM_INFO_WIDTH); |
Also available in: Unified diff