Create system_utils component

Somewhat of a 'misc' component; handles early initialization, checking
for first boot and rebooting.
This commit is contained in:
2023-05-19 16:05:27 +01:00
parent 9c9f027bb8
commit 685e0950bf
8 changed files with 120 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
idf_component_register(
SRCS "console.c"
INCLUDE_DIRS "."
REQUIRES console esp_system
REQUIRES console system_utils
)

View File

@@ -5,9 +5,10 @@
#include "console.h"
#include "system_utils.h"
#include "esp_console.h"
#include "esp_log.h"
#include "esp_system.h"
#define TAG "Console"
@@ -17,7 +18,7 @@ static int reboot_command_func(int argc, char **argv)
{
(void)argc;
(void)argv;
(void)esp_restart();
reboot();
return 0;
}