summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/eve_platform.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-02-28 18:38:37 +0100
committerUros Majstorovic <majstor@majstor.org>2021-02-28 18:38:37 +0100
commit6a4c8a1f11f6a7bd57b0fd618f455bcdecbfe538 (patch)
tree6d16dbc38b3bac0e91d39f3e86bb6810761ddb84 /fw/fe310/eos/eve/eve_platform.c
parent468e81e6da66f6dfec3a4857dc6e2f370ab180f1 (diff)
net send will do selected spi dev pause/resume if more is set and netowk is not active
Diffstat (limited to 'fw/fe310/eos/eve/eve_platform.c')
-rw-r--r--fw/fe310/eos/eve/eve_platform.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fw/fe310/eos/eve/eve_platform.c b/fw/fe310/eos/eve/eve_platform.c
index 7f1b775..cfaf6d5 100644
--- a/fw/fe310/eos/eve/eve_platform.c
+++ b/fw/fe310/eos/eve/eve_platform.c
@@ -11,15 +11,11 @@
#include "irq_def.h"
static void handle_time(unsigned char type) {
- eos_spi_dev_start(EOS_DEV_DISP);
eve_handle_time();
- eos_spi_dev_stop();
}
static void handle_evt(unsigned char type, unsigned char *buffer, uint16_t len) {
- eos_spi_dev_start(EOS_DEV_DISP);
eve_handle_touch();
- eos_spi_dev_stop();
GPIO_REG(GPIO_LOW_IP) = (1 << EVE_PIN_INTR);
GPIO_REG(GPIO_LOW_IE) |= (1 << EVE_PIN_INTR);
@@ -62,6 +58,14 @@ void eve_platform_init(void) {
eos_spi_dev_set_div(EOS_DEV_DISP, 4);
}
+void eve_spi_start(void) {
+ eos_spi_dev_select(EOS_DEV_DISP);
+}
+
+void eve_spi_stop(void) {
+ eos_spi_dev_deselect();
+}
+
#include <stdio.h>
void *eve_malloc(size_t size) {