summaryrefslogtreecommitdiff
path: root/code/fe310/eos/eos.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-05-23 23:59:04 +0200
committerUros Majstorovic <majstor@majstor.org>2020-05-23 23:59:04 +0200
commit8cab5fea518d4bf6c680816f8ba8b7b7d9ee7401 (patch)
treefaa5c53a57aaf22e53892e22d29f013f79994c5c /code/fe310/eos/eos.c
parent34da9599242ed7784c42f548e2d188d3d577c866 (diff)
eve power amanger fix
Diffstat (limited to 'code/fe310/eos/eos.c')
-rw-r--r--code/fe310/eos/eos.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/code/fe310/eos/eos.c b/code/fe310/eos/eos.c
index 1aae201..b02abed 100644
--- a/code/fe310/eos/eos.c
+++ b/code/fe310/eos/eos.c
@@ -1,3 +1,5 @@
+#include <stdio.h>
+
#include "event.h"
#include "interrupt.h"
#include "timer.h"
@@ -13,10 +15,11 @@
#include "eos.h"
-uint32_t eve_touch[6] = {0xfa46,0xfffffcf6,0x422fe,0xffffff38,0x10002,0xf3cb0};
+static uint32_t eve_touch[6] = {0xfa46,0xfffffcf6,0x422fe,0xffffff38,0x10002,0xf3cb0};
void eos_init(void) {
- uint8_t wake_src = eos_power_cause_wake();
+ uint8_t wakeup_cause = eos_power_wakeup_cause();
+ printf("WAKE:%d\n", wakeup_cause);
eos_evtq_init();
eos_intr_init();
@@ -31,10 +34,10 @@ void eos_init(void) {
eos_sock_init();
eos_spi_dev_init();
- eos_net_wake(wake_src);
+ eos_net_wake(wakeup_cause);
eve_set_touch_calibration(eve_touch);
eos_spi_dev_start(EOS_DEV_DISP);
- eve_init(wake_src == EOS_PWR_WAKE_RESET);
+ eve_init(wakeup_cause == EOS_PWR_WAKE_RST);
eos_spi_dev_stop();
}