Mercurial > public > ostc4
comparison Small_CPU/Src/uart.c @ 861:ad96f99ebc78 Evo_2_23
Synchronize ADC and UART activities:
depending on the cable configuration the UART sensor operation may have an impact to the ADC measurement (peaks). To avoid this the ADC measurements are now only started in case no UART communication is pending.
author | Ideenmodellierer |
---|---|
date | Tue, 07 May 2024 21:25:25 +0200 |
parents | c3dd461ca3f9 |
children | cf3967fe6924 |
comparison
equal
deleted
inserted
replaced
860:3e499569baf3 | 861:ad96f99ebc78 |
---|---|
258 rxReadIndex = 0; | 258 rxReadIndex = 0; |
259 } | 259 } |
260 } | 260 } |
261 } | 261 } |
262 | 262 |
263 | 263 uint8_t UART_isComActive(uint8_t sensorId) |
264 { | |
265 uint8_t active = 1; | |
266 | |
267 uint8_t ComState = externalInterface_GetSensorState(sensorId + EXT_INTERFACE_MUX_OFFSET); | |
268 | |
269 if((ComState == UART_COMMON_INIT) || (ComState == UART_COMMON_IDLE) || (ComState == UART_COMMON_ERROR)) | |
270 { | |
271 active = 0; | |
272 } | |
273 return active; | |
274 } | |
264 | 275 |
265 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/ | 276 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/ |