From 3f913efda03fd840cd526ef72e6f397c7da61bd7 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Tue, 9 Aug 2022 22:23:08 +0200 Subject: code layout --- fw/fe310/eos/dev/spi.c | 113 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 fw/fe310/eos/dev/spi.c (limited to 'fw/fe310/eos/dev/spi.c') diff --git a/fw/fe310/eos/dev/spi.c b/fw/fe310/eos/dev/spi.c new file mode 100644 index 0000000..12549fc --- /dev/null +++ b/fw/fe310/eos/dev/spi.c @@ -0,0 +1,113 @@ +#include +#include + +#include "encoding.h" +#include "platform.h" + +#include "eos.h" +#include "msgq.h" +#include "event.h" + +#include "board.h" + +#include "soc/interrupt.h" +#include "soc/spi.h" + +#include "net.h" + +#include "spi.h" +#include "spi_cfg.h" + +static uint8_t spi_dev; +static uint8_t spi_lock; +static uint16_t spi_div[EOS_SPI_MAX_DEV]; + +int eos_spi_dev_init(uint8_t wakeup_cause) { + int i; + + for (i=0; i