diff Small_CPU/Inc/uart.h @ 729:d646a0f724a7

Added auto detection functionality for sensors connected to the external interface: O2 sensors may be connected to the analog input as well as to the UART. The GUI visualization provides three slots for ppo2 display. Beside detection of sensor kind the task of the function is to place the available sensor in this three slots. CO2 has its own communication slot outside the ppo2 channel. The result of the automatic detection is communicated via the sensor map.
author Ideenmodellierer
date Sat, 14 Jan 2023 20:46:17 +0100
parents fceae45b3a69
children e23fe82cbf8c
line wrap: on
line diff
--- a/Small_CPU/Inc/uart.h	Sat Jan 14 20:41:36 2023 +0100
+++ b/Small_CPU/Inc/uart.h	Sat Jan 14 20:46:17 2023 +0100
@@ -61,7 +61,7 @@
 
  typedef enum
   {
-	O2RX_IDLE = 0,			/* no receiption pending */
+	O2RX_IDLE = 0,			/* no reception pending */
 	O2RX_CONFIRM,			/* check the command echo */
 	O2RX_GETNR,				/* extract the sensor number */
 	O2RX_GETO2,				/* extract the ppo2 */
@@ -78,17 +78,25 @@
 	O2RX_HUMIDITY			/* extract humidity within the sensor housing */
   } uartO2RxState_t;
 
+
+
 void MX_USART1_UART_Init(void);
 void MX_USART1_UART_DeInit(void);
 void MX_USART1_DMA_Init(void);
 uint8_t UART_ButtonAdjust(uint8_t *array);
 #ifdef ENABLE_CO2_SUPPORT
-void HandleUARTCO2Data(void);
+void UART_HandleCO2Data(void);
 #endif
 #ifdef ENABLE_SENTINEL_MODE
-void HandleUARTSentinelData(void);
+void UART_HandleSentinelData(void);
 #endif
-void HandleUARTDigitalO2(void);
+void UART_HandleDigitalO2(void);
+
+uint8_t UART_isDigO2Connected();
+uint8_t UART_isCO2Connected();
+void UART_setTargetChannel(uint8_t channel);
+
+
 
 #ifdef __cplusplus
 }