sync
This commit is contained in:
@@ -16,21 +16,22 @@
|
||||
#include <usb.h>
|
||||
#include <utils.h>
|
||||
|
||||
LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);
|
||||
|
||||
volatile static uint8_t reboot_code = 0;
|
||||
|
||||
void init_reboot_status()
|
||||
int init_reboot_status()
|
||||
{
|
||||
reboot_code = get_reboot_status();
|
||||
if (reboot_code != 0)
|
||||
{
|
||||
LOG_INF("Device rebooted with status code: 0x%02x", reboot_code);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(init_reboot_status, POST_KERNEL, 0);
|
||||
|
||||
LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
LOG_INF("Starting Edi's Buzzer Application");
|
||||
|
||||
@@ -273,6 +273,7 @@ int cmd_confirm_firmware() {
|
||||
return rc;
|
||||
}
|
||||
LOG_INF("Firmware confirmed successfully");
|
||||
send_ok();
|
||||
reboot_with_status(REBOOT_STATUS_FIRMWARE_CONFIRMED);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user