comparison Small_CPU/Src/uartProtocol_Co2.c @ 916:4832981f9af8 Evo_2_23

External sensor UART: Switch to DMA TX transfers: The previous version used polling tx function to transfer data. Because of the short command length of the protocols supported this was no big issue. New protocolls (like GNSS) have longer command sequence which have an impact to the program flow. That's why the implementation has been changed to DMA transmission.
author Ideenmodellierer
date Mon, 28 Oct 2024 20:34:58 +0100
parents c3dd461ca3f9
children c0553dd70608
comparison
equal deleted inserted replaced
915:ff318ae65dd0 916:4832981f9af8
172 { 172 {
173 rxState = CO2RX_Ready; 173 rxState = CO2RX_Ready;
174 } 174 }
175 } 175 }
176 } 176 }
177 if((data == ' ') || (data == '\n')) /* Abort data detection */ 177 else if((data == ' ') || (data == '\n')) /* Abort data detection */
178 { 178 {
179 if(rxState == CO2RX_DataComplete) 179 if(rxState == CO2RX_DataComplete)
180 { 180 {
181 CO2Connected = 1; 181 CO2Connected = 1;
182 if(localComState == UART_CO2_SETUP) 182 if(localComState == UART_CO2_SETUP)
211 if(rxState != CO2RX_Data0) /* reset state machine because message in wrong format */ 211 if(rxState != CO2RX_Data0) /* reset state machine because message in wrong format */
212 { 212 {
213 rxState = CO2RX_Ready; 213 rxState = CO2RX_Ready;
214 } 214 }
215 } 215 }
216 else
217 {
218 if((rxState >= CO2RX_Data0) && (rxState <= CO2RX_Data4))
219 {
220 rxState = CO2RX_Ready; /* numerical data expected => abort */
221 }
222 }
216 externalInterface_SetSensorState(activeSensor + EXT_INTERFACE_MUX_OFFSET,localComState); 223 externalInterface_SetSensorState(activeSensor + EXT_INTERFACE_MUX_OFFSET,localComState);
217 } 224 }
218 225
219 uint8_t uartCo2_isSensorConnected() 226 uint8_t uartCo2_isSensorConnected()
220 { 227 {