summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/spi_cfg.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-04-08 04:03:03 +0200
committerUros Majstorovic <majstor@majstor.org>2021-04-08 04:03:03 +0200
commit5c4ad4969514b82285ef37922f7acf61600c70de (patch)
tree8ff857d9b3432eff30e4e485343a608c02e833c5 /fw/fe310/eos/spi_cfg.h
parent66e53b7e54878e2161f5c0dab6f90aebd9a1d97a (diff)
reintrodiced spi_dev
Diffstat (limited to 'fw/fe310/eos/spi_cfg.h')
-rw-r--r--fw/fe310/eos/spi_cfg.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/fw/fe310/eos/spi_cfg.h b/fw/fe310/eos/spi_cfg.h
new file mode 100644
index 0000000..43b0763
--- /dev/null
+++ b/fw/fe310/eos/spi_cfg.h
@@ -0,0 +1,35 @@
+#include <stdint.h>
+
+typedef struct {
+ uint16_t div;
+ uint8_t csid;
+ uint8_t cspin;
+ unsigned char evt;
+} SPIConfig;
+
+static const SPIConfig spi_cfg[] = {
+ { // 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,
+ },
+};