Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
dev_lis2dw12
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
aohui.li
dev_lis2dw12
Commits
3836be1c
Commit
3836be1c
authored
Jul 10, 2025
by
aohui.li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加深度睡眠
parent
0099c5eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
blink_example_main.c
main/blink_example_main.c
+7
-0
lis2dw12.c
main/lis2dw12.c
+1
-1
No files found.
main/blink_example_main.c
View file @
3836be1c
...
...
@@ -14,6 +14,7 @@
#include "led_strip.h"
#include "sdkconfig.h"
#include "lis2dw12.h"
#include "esp_sleep.h"
static
const
char
*
TAG
=
"example"
;
...
...
@@ -101,11 +102,17 @@ static void configure_led(void)
void
app_main
(
void
)
{
ESP_LOGI
(
TAG
,
"Wake Up"
);
/* Configure the peripheral according to the LED type */
configure_led
();
lis2dw12_init
();
ESP_LOGI
(
TAG
,
"Start Sleep"
);
vTaskDelay
(
1000
/
portTICK_PERIOD_MS
);
esp_deep_sleep_start
();
while
(
1
);
while
(
1
)
{
ESP_LOGI
(
TAG
,
"Turning the LED %s!"
,
s_led_state
==
true
?
"ON"
:
"OFF"
);
blink_led
();
...
...
main/lis2dw12.c
View file @
3836be1c
...
...
@@ -144,7 +144,7 @@ void lis2dw12_init()
ESP_LOGI
(
TAG
,
"LIS2DW12 reset done"
);
ESP_LOGI
(
TAG
,
"LIS2DW12 Start Config Regiseter"
);
//
WakeupEnable();
WakeupEnable
();
lis2dw12_wake_config
();
ESP_LOGI
(
TAG
,
"LIS2DW12 Start Config Done"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment