Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
728:5143e927219f | 729:d646a0f724a7 |
---|---|
59 } uartO2Status_t; | 59 } uartO2Status_t; |
60 | 60 |
61 | 61 |
62 typedef enum | 62 typedef enum |
63 { | 63 { |
64 O2RX_IDLE = 0, /* no receiption pending */ | 64 O2RX_IDLE = 0, /* no reception pending */ |
65 O2RX_CONFIRM, /* check the command echo */ | 65 O2RX_CONFIRM, /* check the command echo */ |
66 O2RX_GETNR, /* extract the sensor number */ | 66 O2RX_GETNR, /* extract the sensor number */ |
67 O2RX_GETO2, /* extract the ppo2 */ | 67 O2RX_GETO2, /* extract the ppo2 */ |
68 O2RX_GETTEMP, /* extract the temperature */ | 68 O2RX_GETTEMP, /* extract the temperature */ |
69 O2RX_GETSTATUS, /* extract the sensor status */ | 69 O2RX_GETSTATUS, /* extract the sensor status */ |
76 O2RX_AMBIENTLIGHT, /* extract the intensity of the ambient light */ | 76 O2RX_AMBIENTLIGHT, /* extract the intensity of the ambient light */ |
77 O2RX_PRESSURE, /* extract pressor within the sensor housing */ | 77 O2RX_PRESSURE, /* extract pressor within the sensor housing */ |
78 O2RX_HUMIDITY /* extract humidity within the sensor housing */ | 78 O2RX_HUMIDITY /* extract humidity within the sensor housing */ |
79 } uartO2RxState_t; | 79 } uartO2RxState_t; |
80 | 80 |
81 | |
82 | |
81 void MX_USART1_UART_Init(void); | 83 void MX_USART1_UART_Init(void); |
82 void MX_USART1_UART_DeInit(void); | 84 void MX_USART1_UART_DeInit(void); |
83 void MX_USART1_DMA_Init(void); | 85 void MX_USART1_DMA_Init(void); |
84 uint8_t UART_ButtonAdjust(uint8_t *array); | 86 uint8_t UART_ButtonAdjust(uint8_t *array); |
85 #ifdef ENABLE_CO2_SUPPORT | 87 #ifdef ENABLE_CO2_SUPPORT |
86 void HandleUARTCO2Data(void); | 88 void UART_HandleCO2Data(void); |
87 #endif | 89 #endif |
88 #ifdef ENABLE_SENTINEL_MODE | 90 #ifdef ENABLE_SENTINEL_MODE |
89 void HandleUARTSentinelData(void); | 91 void UART_HandleSentinelData(void); |
90 #endif | 92 #endif |
91 void HandleUARTDigitalO2(void); | 93 void UART_HandleDigitalO2(void); |
94 | |
95 uint8_t UART_isDigO2Connected(); | |
96 uint8_t UART_isCO2Connected(); | |
97 void UART_setTargetChannel(uint8_t channel); | |
98 | |
99 | |
92 | 100 |
93 #ifdef __cplusplus | 101 #ifdef __cplusplus |
94 } | 102 } |
95 #endif | 103 #endif |
96 | 104 |