Skip to content

Commit

Permalink
[release] v1.5.0
Browse files Browse the repository at this point in the history
Update lt_device.c to breakout deep sleep wakeup reasons.
Update lt_device.h enum lt_reboot_reason_t
Update lt_device.h to add #defines for updated enum lt_reboot_reason_t

Per libretiny-eu#234
  • Loading branch information
kuba2k2 authored and cap9qd committed Feb 21, 2024
1 parent fbe23bb commit 94e9fb4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
6 changes: 4 additions & 2 deletions cores/beken-72xx/base/api/lt_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ lt_reboot_reason_t lt_get_reboot_reason() {
case RESET_SOURCE_CRASH_UNUSED:
case RESET_SOURCE_CRASH_PER_XAT0:
return REBOOT_REASON_CRASH;
case RESET_SOURCE_DEEPPS_USB:
return REBOOT_REASON_SLEEP_USB;
case RESET_SOURCE_DEEPPS_GPIO:
return REBOOT_REASON_SLEEP_GPIO;
case RESET_SOURCE_DEEPPS_RTC:
case RESET_SOURCE_DEEPPS_USB:
return REBOOT_REASON_SLEEP;
return REBOOT_REASON_SLEEP_RTC;
default:
return REBOOT_REASON_UNKNOWN;
}
Expand Down
12 changes: 8 additions & 4 deletions cores/common/base/api/lt_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#define RESET_REASON_SOFTWARE REBOOT_REASON_SOFTWARE
#define RESET_REASON_WATCHDOG REBOOT_REASON_WATCHDOG
#define RESET_REASON_CRASH REBOOT_REASON_CRASH
#define RESET_REASON_SLEEP REBOOT_REASON_SLEEP
#define RESET_REASON_SLEEP_GPIO REBOOT_REASON_SLEEP_GPIO
#define RESET_REASON_SLEEP_GPIO REBOOT_REASON_SLEEP_RTC
#define RESET_REASON_SLEEP_GPIO REBOOT_REASON_SLEEP_USB
#define RESET_REASON_MAX REBOOT_REASON_MAX

/**
Expand All @@ -25,9 +27,11 @@ typedef enum {
REBOOT_REASON_SOFTWARE = 5,
REBOOT_REASON_WATCHDOG = 6,
REBOOT_REASON_CRASH = 7,
REBOOT_REASON_SLEEP = 8,
REBOOT_REASON_DEBUGGER = 9,
REBOOT_REASON_MAX = 10,
REBOOT_REASON_SLEEP_GPIO = 8,
REBOOT_REASON_SLEEP_RTC = 9,
REBOOT_REASON_SLEEP_USB = 10,
REBOOT_REASON_DEBUGGER = 11,
REBOOT_REASON_MAX = 12,
} lt_reboot_reason_t;

/**
Expand Down
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "git",
"url": "https://github.com/libretiny-eu/libretiny.git"
},
"version": "1.4.1",
"version": "1.5.0",
"frameworks": {
"base": {
"title": "Base Framework (SDK only)",
Expand Down

0 comments on commit 94e9fb4

Please sign in to comment.