diff Small_CPU/Inc/externalInterface.h @ 779:0b5f45448eb6

Added UART multiplexer support for DiveO2: The existing autodetect function now includes a UART multiplexer. The datastructures and protocol handling has been adapted to support several DiveO2 sensors connected to the UART.
author Ideenmodellierer
date Tue, 23 May 2023 21:45:34 +0200
parents e23fe82cbf8c
children 01b3eb9d55c3
line wrap: on
line diff
--- a/Small_CPU/Inc/externalInterface.h	Mon May 22 09:15:09 2023 +0200
+++ b/Small_CPU/Inc/externalInterface.h	Tue May 23 21:45:34 2023 +0200
@@ -46,7 +46,10 @@
 	DETECTION_START,
 	DETECTION_ANALOG1,		/* check ADC channels for connected sensors */
 	DETECTION_ANALOG2,
-	DETECTION_DIGO2,		/* check UART channel for connected DigO2 sensor */
+	DETECTION_UARTMUX,		/* check if a uart multiplexer is present */
+	DETECTION_DIGO2_0,		/* check UART channel for connected DigO2 sensor */
+	DETECTION_DIGO2_1,
+	DETECTION_DIGO2_2,
 #ifdef ENABLE_CO2_SUPPORT
 	DETECTION_CO2,			/* check UART channel for connected CO2 sensor */
 #endif
@@ -81,7 +84,7 @@
 uint16_t externalInterface_GetCO2SignalStrength(void);
 void externalInterface_SetCO2State(uint16_t state);
 uint16_t externalInterface_GetCO2State(void);
-uint8_t externalInterface_GetSensorData(uint8_t* pDataStruct);
+uint8_t externalInterface_GetSensorData(uint8_t sensorId, uint8_t* pDataStruct);
 void externalInterface_SetSensorData(uint8_t dataId, uint8_t* pDataStruct);
 void externalInface_SetSensorMap(uint8_t* pMap);
 uint8_t* externalInterface_GetSensorMapPointer(uint8_t finalMap);