This commit introduces a major refactoring of the project structure to align with Zephyr's recommended multi-application and library organization. Key changes include: - Relocation of custom modules from 'software/modules/' to 'software/lib/'. - Introduction of a central 'software/CMakeLists.txt' to manage application and library subdirectories. - Creation of new Kconfig files for 'software/' and 'software/apps/slave_node/' to define project-wide and application-specific configurations. - Removal of the 'gateway' and 'stm32g431_tests' applications. - Removal of 'shell_modbus.c' and 'shell_system.c' from 'slave_node' application's direct source files, indicating a shift towards library-based shell commands. - Updates to 'software/apps/slave_node/CMakeLists.txt', 'prj.conf', and 'boards/bluepill_f103rb.conf' to reflect the new structure and dependencies.
13 lines
350 B
C
13 lines
350 B
C
#include <zephyr/shell/shell.h>
|
|
#include <zephyr/sys/reboot.h>
|
|
|
|
static int cmd_reset(const struct shell *sh, size_t argc, char **argv)
|
|
{
|
|
shell_print(sh, "Rebooting system...");
|
|
k_sleep(K_MSEC(100)); // Allow the shell to print the message
|
|
sys_reboot(SYS_REBOOT_WARM);
|
|
return 0;
|
|
}
|
|
|
|
SHELL_CMD_REGISTER(reset, NULL, "Reboot the system", cmd_reset);
|