diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-11-16 19:19:51 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-11-16 19:19:51 +0100 |
commit | 9d1721008fe1d35abdedbff063ef29d35996124c (patch) | |
tree | 10a38a337add60c6584abcf7745f3c9054444237 /fw/fe310/eos/eve/eve_platform.c | |
parent | 554144b3caeb478881560fc0bff19ba95af87077 (diff) |
board REV3 pins in board.h; eve BT817 support
Diffstat (limited to 'fw/fe310/eos/eve/eve_platform.c')
-rw-r--r-- | fw/fe310/eos/eve/eve_platform.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fw/fe310/eos/eve/eve_platform.c b/fw/fe310/eos/eve/eve_platform.c index 6bc87bb..003f396 100644 --- a/fw/fe310/eos/eve/eve_platform.c +++ b/fw/fe310/eos/eve/eve_platform.c @@ -6,6 +6,8 @@ #include "interrupt.h" #include "event.h" +#include "board.h" + #include "eve.h" #include "eve_platform.h" @@ -54,8 +56,6 @@ void eve_platform_init(void) { GPIO_REG(GPIO_LOW_IE) |= (1 << EVE_PIN_INTR); eos_intr_set(INT_GPIO_BASE + EVE_PIN_INTR, IRQ_PRIORITY_UI, handle_intr); - - eos_spi_set_div(EOS_SPI_DEV_EVE, 4); } void eve_spi_start(void) { @@ -66,6 +66,14 @@ void eve_spi_stop(void) { eos_spi_deselect(); } +void eve_spi_set_fast(void) { + eos_spi_set_div(EOS_SPI_DEV_EVE, SPI_DIV_EVE); +} + +void eve_spi_set_slow(void) { + eos_spi_set_div(EOS_SPI_DEV_EVE, SPI_DIV_EVE_SLOW); +} + #include <stdio.h> void *eve_malloc(size_t size) { |