summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/spi_cfg.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2025-02-16 20:17:07 +0100
committerUros Majstorovic <majstor@majstor.org>2025-02-16 20:17:07 +0100
commit2e17dd17ee9777084b2f211f08c4231dd5f8b906 (patch)
treef50ad99c62d81906082cbb28eb84d857ef7311c9 /fw/fe310/eos/dev/spi_cfg.h
parent064631db87182694459056ceeb331506b553d0f0 (diff)
extended gpio implemented
Diffstat (limited to 'fw/fe310/eos/dev/spi_cfg.h')
-rw-r--r--fw/fe310/eos/dev/spi_cfg.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/fw/fe310/eos/dev/spi_cfg.h b/fw/fe310/eos/dev/spi_cfg.h
index 6a5d7b4..6ef92aa 100644
--- a/fw/fe310/eos/dev/spi_cfg.h
+++ b/fw/fe310/eos/dev/spi_cfg.h
@@ -1,17 +1,16 @@
#include <stdint.h>
-#define EOS_SPI_MAX_DEV 5
-
typedef struct {
uint16_t div;
- int8_t csid;
- int8_t cspin;
+ uint8_t csid;
+ uint8_t cspin;
uint8_t flags;
unsigned char evt;
} SPIConfig;
-#define SPI_DEV_FLAG_9BIT 0x1
-#define SPI_DEV_FLAG_CSFLOAT 0x2
+#define SPI_DEV_FLAG_9BIT 0x01
+
+#define EOS_SPI_MAX_DEV 6
static const SPIConfig spi_cfg[EOS_SPI_MAX_DEV] = {
{ // DEV_NET
@@ -42,11 +41,18 @@ static const SPIConfig spi_cfg[EOS_SPI_MAX_DEV] = {
.flags = 0,
.evt = EOS_SPI_EVT_CAM,
},
+ { // DEV_HPAMP
+ .div = SPI_DIV_HPAMP,
+ .csid = SPI_CSID_HPAMP,
+ .cspin = SPI_CSPIN_HPAMP,
+ .flags = 0,
+ .evt = 0,
+ },
{ // DEV_LCD 9bit spi
- .div = 0,
- .csid = -1,
+ .div = SPI_DIV_LCD,
+ .csid = SPI_CSID_LCD,
.cspin = SPI_CSPIN_LCD,
- .flags = SPI_DEV_FLAG_9BIT | SPI_DEV_FLAG_CSFLOAT,
+ .flags = SPI_DEV_FLAG_9BIT,
.evt = 0,
},
};