diff options
author | Uros Majstorovic <majstor@majstor.org> | 2022-08-10 19:14:08 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2022-08-10 19:14:08 +0200 |
commit | 4971ba4a97b304ae814b253707a789653f17b3c0 (patch) | |
tree | b413c3980af8a9b9a3ebcadf02bac5c7bf700807 /fw/fe310/eos/eve | |
parent | ee54d05c5889b0f938b7198b659c7f493f66f941 (diff) |
fixed eve_select
Diffstat (limited to 'fw/fe310/eos/eve')
-rw-r--r-- | fw/fe310/eos/eve/eve_platform.c | 8 | ||||
-rw-r--r-- | fw/fe310/eos/eve/eve_platform.h | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/fw/fe310/eos/eve/eve_platform.c b/fw/fe310/eos/eve/eve_platform.c index f0fc399..a57281c 100644 --- a/fw/fe310/eos/eve/eve_platform.c +++ b/fw/fe310/eos/eve/eve_platform.c @@ -33,10 +33,14 @@ void eve_sys_timer_clear(void) { eos_timer_clear(EOS_TIMER_ETYPE_UI); } -void eve_spi_start(void) { +void eve_select(void) { eos_spi_select(EOS_SPI_DEV_EVE); } -void eve_spi_stop(void) { +void eve_deselect(void) { eos_spi_deselect(); } + +int eve_selected(void) { + return (eos_spi_dev() == EOS_SPI_DEV_EVE); +} diff --git a/fw/fe310/eos/eve/eve_platform.h b/fw/fe310/eos/eve/eve_platform.h index 29240d5..cae7222 100644 --- a/fw/fe310/eos/eve/eve_platform.h +++ b/fw/fe310/eos/eve/eve_platform.h @@ -18,8 +18,9 @@ void eve_free(void *); //#define eve_malloc malloc //#define eve_free free -void eve_spi_start(void); -void eve_spi_stop(void); +void eve_select(void); +void eve_deselect(void); +int eve_selected(void); #define eve_spi_cs_set eos_spi_cs_set #define eve_spi_cs_clear eos_spi_cs_clear |