Skip to content

Commit 45bb4bf

Browse files
committed
feature: Add boot_option module
Signed-off-by: lbuque <[email protected]>
1 parent 5856c18 commit 45bb4bf

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

m5stack/libs/boot_option.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import esp32
2+
3+
4+
def set_boot_option(option):
5+
nvs = esp32.NVS("uiflow")
6+
nvs.set_u8("boot_option", option)
7+
nvs.commit()
8+
9+
10+
def get_boot_option():
11+
nvs = esp32.NVS("uiflow")
12+
return nvs.get_u8("boot_option")

m5stack/libs/manifest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
include("unit/manifest.py")
1010
# freeze("$(MPY_DIR)/../m5stack/libs/unit")
1111
include("utility/manifest.py")
12+
module("boot_option.py")
1213
module("label_plus.py")
1314
module("m5camera.py")

0 commit comments

Comments
 (0)