comparison Small_CPU/Inc/uartProtocol_O2.h @ 798:e9eba334b942

Migrated CO2 protocol implementation to new format: The previous implementation was a monolithic protocol implementation which was not usable together with the multiplexer. The new implementation moves the CO2 implementation into a separate C file and decoubles the upper layer external interface, which is not able to handle DiveO2 and CO2 sensors in parallel without restriction to port assignments.
author Ideenmodellierer
date Mon, 07 Aug 2023 20:29:44 +0200
parents d4083ac09b5d
children
comparison
equal deleted inserted replaced
797:acf6614dc396 798:e9eba334b942
29 29
30 /* Includes ------------------------------------------------------------------*/ 30 /* Includes ------------------------------------------------------------------*/
31 #include "configuration.h" 31 #include "configuration.h"
32 #include "stm32f4xx_hal.h" 32 #include "stm32f4xx_hal.h"
33 33
34 typedef enum
35 {
36 UART_COMMON_INIT = 0, /* Default Status for every sensor type */
37 UART_COMMON_IDLE, /* sensor detected and no communication pending */
38 UART_COMMON_ERROR, /* Error message received from sensor */
39 } uartCommonStatus_t;
34 40
35 typedef enum 41 typedef enum
36 { 42 {
37 UART_O2_INIT = 0, 43 UART_O2_INIT = UART_COMMON_INIT, /* Default Status for every sensor type */
38 UART_O2_CHECK, /* send blink command and check if sensor answers */ 44 UART_O2_IDLE = UART_COMMON_IDLE, /* sensor detected and no communication pending */
39 UART_O2_REQ_INFO, /* request information about available internal sensors of sensor */ 45 UART_O2_ERROR = UART_COMMON_ERROR, /* Error message received from sensor */
40 UART_O2_REQ_ID, /* request ID of sensor */ 46 UART_O2_CHECK, /* send blink command and check if sensor answers */
41 UART_O2_IDLE, /* sensor detected and no communication pending */ 47 UART_O2_REQ_INFO, /* request information about available internal sensors of sensor */
42 UART_O2_REQ_O2, /* O2 value has been requested and is in receiption progress */ 48 UART_O2_REQ_ID, /* request ID of sensor */
43 UART_O2_REQ_RAW, /* Request O2 and extended raw data */ 49 UART_O2_REQ_O2, /* O2 value has been requested and is in receiption progress */
44 UART_O2_ERROR /* Error message received from sensor */ 50 UART_O2_REQ_RAW, /* Request O2 and extended raw data */
45 } uartO2Status_t; 51 } uartO2Status_t;
46 52
47 53
48 typedef enum 54 typedef enum
49 { 55 {