From 447da22efa183a1d977e2e128ae1c89ff341d6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20B=C3=A9rub=C3=A9?= Date: Thu, 30 May 2024 21:16:46 -0400 Subject: [PATCH] Sensor working on Ingenic, next step is the framesource configuration --- src/hal/inge/tx_isp.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/hal/inge/tx_isp.h b/src/hal/inge/tx_isp.h index 844dc0c..f07583c 100644 --- a/src/hal/inge/tx_isp.h +++ b/src/hal/inge/tx_isp.h @@ -2,6 +2,11 @@ #include "tx_common.h" +typedef enum { + TX_ISP_COMM_I2C = 1, + TX_ISP_COMM_SPI, +} tx_isp_comm; + typedef struct { char type[20]; int addr; @@ -15,7 +20,7 @@ typedef struct { typedef struct { char name[32]; - int spiMode; + tx_isp_comm mode; union { tx_isp_i2c i2c; tx_isp_spi spi; @@ -26,7 +31,7 @@ typedef struct { } tx_isp_snr; static tx_isp_snr tx_sensors[] = { - { .name = "sc2335", .spiMode = 0, .i2c.type = "sc2335", .i2c.addr = 0x30 } + { .name = "sc2335", .mode = TX_ISP_COMM_I2C, .i2c.type = "sc2335", .i2c.addr = 0x30 } }; typedef struct {