From 412a8f99928beff605805807b0f07f6bf8d0a965 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Fri, 13 May 2022 12:45:53 +0200 Subject: code rename --- fw/fe310/eos/soc/spi_cfg.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 fw/fe310/eos/soc/spi_cfg.h (limited to 'fw/fe310/eos/soc/spi_cfg.h') diff --git a/fw/fe310/eos/soc/spi_cfg.h b/fw/fe310/eos/soc/spi_cfg.h new file mode 100644 index 0000000..84ab8bb --- /dev/null +++ b/fw/fe310/eos/soc/spi_cfg.h @@ -0,0 +1,37 @@ +#include + +#define EOS_SPI_MAX_DEV 4 + +typedef struct { + uint16_t div; + uint8_t csid; + uint8_t cspin; + unsigned char evt; +} SPIConfig; + +static const SPIConfig spi_cfg[EOS_SPI_MAX_DEV] = { + { // DEV_NET + .div = SPI_DIV_NET, + .csid = SPI_CSID_NET, + .cspin = SPI_CSPIN_NET, + .evt = 0, // Not SPI event + }, + { // DEV_EVE + .div = SPI_DIV_EVE, + .csid = SPI_CSID_EVE, + .cspin = SPI_CSPIN_EVE, + .evt = 0, + }, + { // DEV_SDC + .div = SPI_DIV_SDC, + .csid = SPI_CSID_SDC, + .cspin = SPI_CSPIN_SDC, + .evt = EOS_SPI_EVT_SDC, + }, + { // DEV_CAM + .div = SPI_DIV_CAM, + .csid = SPI_CSID_CAM, + .cspin = SPI_CSPIN_CAM, + .evt = EOS_SPI_EVT_CAM, + }, +}; -- cgit v1.2.3