From 34da9599242ed7784c42f548e2d188d3d577c866 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Mon, 18 May 2020 09:00:01 +0200 Subject: poer management fix --- code/esp32/components/eos/include/power.h | 2 +- code/esp32/components/eos/net.c | 2 +- code/esp32/components/eos/power.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'code/esp32/components/eos') diff --git a/code/esp32/components/eos/include/power.h b/code/esp32/components/eos/include/power.h index 3f44507..8a35a04 100644 --- a/code/esp32/components/eos/include/power.h +++ b/code/esp32/components/eos/include/power.h @@ -10,4 +10,4 @@ void eos_power_init(void); void eos_power_sleep(void); void eos_power_wake(uint8_t source); -void eos_power_1v8rdy(void); \ No newline at end of file +void eos_power_net_ready(void); \ No newline at end of file diff --git a/code/esp32/components/eos/net.c b/code/esp32/components/eos/net.c index c5be1bf..07434f7 100644 --- a/code/esp32/components/eos/net.c +++ b/code/esp32/components/eos/net.c @@ -130,7 +130,7 @@ static void net_xchg_task(void *pvParameters) { // ESP_LOGD(TAG, "RECV:%d", buf_recv[0]); if (wake) { - eos_power_1v8rdy(); + eos_power_net_ready(); wake = 0; } if (buf_recv[0] == 0x00) continue; diff --git a/code/esp32/components/eos/power.c b/code/esp32/components/eos/power.c index 6d55a10..77f2d05 100644 --- a/code/esp32/components/eos/power.c +++ b/code/esp32/components/eos/power.c @@ -20,7 +20,7 @@ #define POWER_ETYPE_BTN 1 #define POWER_ETYPE_SLEEP 2 #define POWER_ETYPE_WAKE 3 -#define POWER_ETYPE_1V8RDY 4 +#define POWER_ETYPE_NETRDY 4 typedef struct { uint8_t type; @@ -165,7 +165,7 @@ static void power_event_task(void *pvParameters) { } break; - case POWER_ETYPE_1V8RDY: + case POWER_ETYPE_NETRDY: if (sleep && source) { power_wake_stage2(source); sleep = 0; @@ -247,10 +247,10 @@ void eos_power_wake(uint8_t source) { xQueueSend(power_queue, &evt, portMAX_DELAY); } -void eos_power_1v8rdy(void) { +void eos_power_net_ready(void) { power_event_t evt; - evt.type = POWER_ETYPE_1V8RDY; + evt.type = POWER_ETYPE_NETRDY; evt.source = 0; xQueueSend(power_queue, &evt, portMAX_DELAY); -- cgit v1.2.3