Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
BoYs-J authored Nov 7, 2024
1 parent fccb143 commit f4e1009
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 6 additions & 5 deletions application/main/src/driver/ssd1306/ssd1306_oled.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,14 @@ static void ssd1306_event_handler(enum user_event event, void* arg)
}
break;
case USER_EVT_POWERSAVE: // 处理省电模式
if (ssd1306_is_sleep && ssd1306_inited) {
break;
}
switch (param) {
case PWR_SAVE_ENTER:
if (!ssd1306_is_sleep && ssd1306_inited) {
ssd1306_is_sleep = true;
ssd1306_sleep();
break;
}
ssd1306_is_sleep = true;
ssd1306_sleep();
break;
case PWR_SAVE_EXIT:
ssd1306_is_sleep = false;
ssd1306_wake();
Expand Down
1 change: 0 additions & 1 deletion application/main/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ static void sleep_delay_handler(void* p_context)
uint8_t sleep_mode = (uint32_t)p_context;
switch (sleep_mode) {
case SLEEP_EVT_AUTO:
break;
case SLEEP_EVT_MANUAL:
sleep_mode_enter(true);
break;
Expand Down

0 comments on commit f4e1009

Please sign in to comment.