From 2e6facf66ee3d6aa37f2fb41096b1763261506a7 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sat, 7 Dec 2019 17:17:21 +0100 Subject: eos evtq flags refactor; net buf flags refator for all modules --- code/fe310/eos/spi.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'code/fe310/eos/spi.c') diff --git a/code/fe310/eos/spi.c b/code/fe310/eos/spi.c index 56ef318..d752bfb 100644 --- a/code/fe310/eos/spi.c +++ b/code/fe310/eos/spi.c @@ -18,8 +18,6 @@ #define MAX(X, Y) (((X) > (Y)) ? (X) : (Y)) #define SPI_IOF_MASK (((uint32_t)1 << IOF_SPI1_SCK) | ((uint32_t)1 << IOF_SPI1_MOSI) | ((uint32_t)1 << IOF_SPI1_MISO)) | ((uint32_t)1 << IOF_SPI1_SS0) | ((uint32_t)1 << IOF_SPI1_SS2) | ((uint32_t)1 << IOF_SPI1_SS3) -extern EOSMsgQ _eos_event_q; - static uint8_t spi_dev; static uint8_t spi_dev_cs_pin; static uint8_t spi_state_flags; @@ -60,6 +58,14 @@ static void spi_xchg_wait(void) { } void eos_spi_init(void) { + int i; + + for (i=0; i