Revision aed3754b core/src/aos_system.c
core/src/aos_system.c | ||
---|---|---|
59 | 59 |
static int _shellcmd_configcb(BaseSequentialStream* stream, int argc, char* argv[]); |
60 | 60 |
static int _shellcmd_infocb(BaseSequentialStream* stream, int argc, char* argv[]); |
61 | 61 |
static int _shellcmd_shutdowncb(BaseSequentialStream* stream, int argc, char* argv[]); |
62 |
#endif /* AMIROOS_CFG_SHELL_ENABLE == true */ |
|
63 | 62 |
#if (AMIROOS_CFG_TESTS_ENABLE == true) |
64 | 63 |
static int _shellcmd_kerneltestcb(BaseSequentialStream* stream, int argc, char* argv[]); |
65 | 64 |
#endif /* AMIROOS_CFG_TESTS_ENABLE == true */ |
65 |
#endif /* AMIROOS_CFG_SHELL_ENABLE == true */ |
|
66 | 66 |
|
67 | 67 |
/** |
68 | 68 |
* @brief Timer to accumulate system uptime. |
... | ... | |
498 | 498 |
chprintf(stream, "%10u microseconds\n", (uint16_t)(uptime % MICROSECONDS_PER_MILLISECOND / MICROSECONDS_PER_MICROSECOND)); |
499 | 499 |
#if (AMIROOS_CFG_SSSP_MASTER != true) && (AMIROOS_CFG_PROFILE == true) |
500 | 500 |
chprintf(stream, "SSSP synchronization offset: %.3fus per %uus\n", _syssyncskew, AMIROOS_CFG_SSSP_SYSSYNCPERIOD); |
501 |
#endif |
|
501 |
#endif /* AMIROOS_CFG_SSSP_MASTER != true && AMIROOS_CFG_PROFILE == true */
|
|
502 | 502 |
_printSystemInfoSeparator(stream, '=', SYSTEM_INFO_WIDTH); |
503 | 503 |
|
504 |
#if (AMIROOS_CFG_SHELL_ENABLE == true) |
|
505 |
// print shell info |
|
506 |
chprintf(stream, "System shell information:\n"); |
|
507 |
chprintf(stream, "\tnumber of commands: %u\n", aosShellCountCommands(&aos.shell)); |
|
508 |
chprintf(stream, "\tmaximum line width: %u characters\n", aos.shell.linesize); |
|
509 |
chprintf(stream, "\tmaximum #arguments: %u\n", aos.shell.arglistsize); |
|
510 |
chprintf(stream, "\tshell thread stack size: %u bytes\n", aosThdGetStacksize(aos.shell.thread)); |
|
511 |
#if (CH_DBG_FILL_THREADS == TRUE) |
|
512 |
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); |
|
513 |
#endif /* CH_DBG_FILL_THREADS == TRUE */ |
|
514 |
_printSystemInfoSeparator(stream, '=', SYSTEM_INFO_WIDTH); |
|
515 |
#endif /* AMIROOS_CFG_SHELL_ENABLE == true */ |
|
516 |
|
|
504 | 517 |
return AOS_OK; |
505 | 518 |
} |
506 | 519 |
|
... | ... | |
567 | 580 |
} |
568 | 581 |
} |
569 | 582 |
} |
570 |
#endif /* AMIROOS_CFG_SHELL_ENABLE == true */ |
|
571 | 583 |
|
572 | 584 |
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__) |
573 | 585 |
/** |
... | ... | |
591 | 603 |
return retval; |
592 | 604 |
} |
593 | 605 |
#endif /* AMIROOS_CFG_TESTS_ENABLE == true */ |
606 |
#endif /* AMIROOS_CFG_SHELL_ENABLE == true */ |
|
594 | 607 |
|
595 | 608 |
/** |
596 | 609 |
* @brief Generic callback function for GPIO interrupts. |
Also available in: Unified diff