summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/eve.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.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.c')
-rw-r--r--fw/fe310/eos/eve/eve.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fw/fe310/eos/eve/eve.c b/fw/fe310/eos/eve/eve.c
index 6b3943e..f35ccf7 100644
--- a/fw/fe310/eos/eve/eve.c
+++ b/fw/fe310/eos/eve/eve.c
@@ -103,6 +103,7 @@ void eve_dl_start(uint32_t addr, char burst) {
_dl_addr = addr;
_dl_burst = burst;
if (burst) {
+ eve_spi_lock();
eve_spi_cs_set();
eve_spi_xchg24(addr | EVE_MEM_WRITE, EVE_SPI_FLAG_TX);
}
@@ -121,6 +122,7 @@ void eve_dl_end(void) {
if (_dl_burst) {
eve_spi_flush();
eve_spi_cs_clear();
+ eve_spi_unlock();
_dl_burst = 0;
}
}
@@ -266,6 +268,7 @@ int eve_cmd_exec(int w) {
void eve_cmd_burst_start(void) {
uint32_t addr = EVE_RAM_CMD + _cmd_offset;
+ eve_spi_lock();
eve_spi_cs_set();
eve_spi_xchg24(addr | EVE_MEM_WRITE, EVE_SPI_FLAG_TX);
_cmd_burst = 1;
@@ -274,6 +277,7 @@ void eve_cmd_burst_start(void) {
void eve_cmd_burst_end(void) {
eve_spi_flush();
eve_spi_cs_clear();
+ eve_spi_unlock();
_cmd_burst = 0;
}