summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eos.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/eos.c')
-rw-r--r--fw/fe310/eos/eos.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/fw/fe310/eos/eos.c b/fw/fe310/eos/eos.c
index 0b6228b..2f1f4d3 100644
--- a/fw/fe310/eos/eos.c
+++ b/fw/fe310/eos/eos.c
@@ -23,12 +23,12 @@
#include "eos.h"
void eos_init(void) {
- uint8_t wakeup_cause = eos_power_wakeup_cause() | EOS_PWR_INIT;
+ uint8_t wakeup_cause = eos_power_wakeup_cause();
uint32_t touch_matrix[6] = {0xfa46,0xfffffcf6,0x422fe,0xffffff38,0x10002,0xf3cb0};
int touch_calibrate = 0;
int rv;
- printf("INIT:%d\n", wakeup_cause & ~EOS_PWR_INIT);
+ printf("INIT:%d\n", wakeup_cause);
rv = eos_evtq_init(wakeup_cause);
if (rv) printf("EVTQ INIT ERR:%d\n", rv);
@@ -67,16 +67,20 @@ void eos_init(void) {
printf("TOUCH MATRIX:\n");
printf("uint32_t touch_matrix[6] = {0x%x,0x%x,0x%x,0x%x,0x%x,0x%x}\n", touch_matrix[0], touch_matrix[1], touch_matrix[2], touch_matrix[3], touch_matrix[4], touch_matrix[5]);
}
- eos_start(wakeup_cause);
+ eos_run(wakeup_cause);
}
-void eos_start(uint8_t wakeup_cause) {
+void eos_run(uint8_t wakeup_cause) {
+ int rv;
+
eos_spi_select(EOS_SPI_DEV_EVE);
- eve_start(wakeup_cause);
+ rv = eve_run(wakeup_cause);
eos_spi_deselect();
+ if (rv) printf("EVE RUN ERR:%d\n", rv);
eos_wifi_init();
eos_cell_init();
eos_sock_init();
- eos_net_start(wakeup_cause);
+ rv = eos_net_run(wakeup_cause);
+ if (rv) printf("NET RUN ERR:%d\n", rv);
}