Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dos
flow3r firmware
Commits
7b28f31e
Commit
7b28f31e
authored
1 year ago
by
q3k
Browse files
Options
Downloads
Patches
Plain Diff
main: enable NVS
Fixes #12.
parent
064de7be
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/main.c
+9
-1
9 additions, 1 deletion
main/main.c
with
9 additions
and
1 deletion
main/main.c
+
9
−
1
View file @
7b28f31e
...
...
@@ -15,6 +15,7 @@
#include
"esp_log.h"
#include
"freertos/FreeRTOS.h"
#include
"freertos/task.h"
#include
"nvs_flash.h"
// Called by micropython via MICROPY_BOARD_STARTUP.
void
flow3r_startup
(
void
)
{
...
...
@@ -70,7 +71,14 @@ void flow3r_startup(void) {
st3m_leds_init
();
st3m_io_init
();
st3m_captouch_init
();
st3m_mode_set
(
st3m_mode_kind_starting
,
"nvs"
);
esp_err_t
ret
=
nvs_flash_init
();
if
(
ret
==
ESP_ERR_NVS_NO_FREE_PAGES
||
ret
==
ESP_ERR_NVS_NEW_VERSION_FOUND
)
{
nvs_flash_erase
();
nvs_flash_init
();
}
st3m_mode_set
(
st3m_mode_kind_starting
,
"micropython"
);
st3m_mode_update_display
(
NULL
);
}
\ No newline at end of file
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment