summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/net.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-12-07 20:14:23 +0100
committerUros Majstorovic <majstor@majstor.org>2021-12-07 20:14:23 +0100
commit9c8f5a5e8f11e4a5012d55b96afae290242b8fdd (patch)
tree785538c3539d0b3d710f983c55c089567f5a458a /fw/fe310/eos/net.c
parent7ded8116d90081851e0ddb1b4bdd77b645f6535c (diff)
fixed eve, spi start/stop interface
Diffstat (limited to 'fw/fe310/eos/net.c')
-rw-r--r--fw/fe310/eos/net.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fw/fe310/eos/net.c b/fw/fe310/eos/net.c
index 167a879..4d9aadf 100644
--- a/fw/fe310/eos/net.c
+++ b/fw/fe310/eos/net.c
@@ -311,6 +311,10 @@ static void net_start(void) {
SPI1_REG(SPI_REG_CSID) = eos_spi_csid(EOS_SPI_DEV_NET);
}
+static void net_stop(void) {
+ eos_intr_set_handler(INT_SPI1_BASE, NULL);
+}
+
int eos_net_init(uint8_t wakeup_cause) {
int i;
@@ -400,6 +404,7 @@ void eos_net_stop(void) {
if (!done) asm volatile ("wfi");
set_csr(mstatus, MSTATUS_MIE);
}
+ net_stop();
}
int eos_net_sleep(uint32_t timeout) {