From 2e17dd17ee9777084b2f211f08c4231dd5f8b906 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sun, 16 Feb 2025 20:17:07 +0100 Subject: extended gpio implemented --- fw/fe310/eos/dev/spi_cfg.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'fw/fe310/eos/dev/spi_cfg.h') 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 -#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, }, }; -- cgit v1.2.3