Mercurial > public > ostc4
comparison Small_CPU/Inc/externalInterface.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 | bb37d4f3e50e |
children | 061174d88af9 |
comparison
equal
deleted
inserted
replaced
797:acf6614dc396 | 798:e9eba334b942 |
---|---|
39 #define EXT33V_CONTROL_PIN GPIO_PIN_7 /* PortC */ | 39 #define EXT33V_CONTROL_PIN GPIO_PIN_7 /* PortC */ |
40 | 40 |
41 #define MIN_ADC_VOLTAGE_MV (5.0f) /* miminal voltage to rate an ADC channel as active */ | 41 #define MIN_ADC_VOLTAGE_MV (5.0f) /* miminal voltage to rate an ADC channel as active */ |
42 | 42 |
43 #define COMMON_SENSOR_STATE_INIT (0x0u) /* All individual state definitions shall start with a INIT state = 0 */ | 43 #define COMMON_SENSOR_STATE_INIT (0x0u) /* All individual state definitions shall start with a INIT state = 0 */ |
44 #define COMMON_SENSOR_STATE_INVALID (0xFFu) /* All individual state devinitions shall not use 0xFF for operation control */ | 44 #define COMMON_SENSOR_STATE_INVALID (0xFFu) /* All individual state definitions shall not use 0xFF for operation control */ |
45 | 45 |
46 typedef enum | 46 typedef enum |
47 { | 47 { |
48 DETECTION_OFF = 0, /* no detection requested */ | 48 DETECTION_OFF = 0, /* no detection requested */ |
49 DETECTION_INIT, /* prepare external interface for operation if not already activated */ | 49 DETECTION_INIT, /* prepare external interface for operation if not already activated */ |
54 DETECTION_DIGO2_0, /* check UART channel for connected DigO2 sensor */ | 54 DETECTION_DIGO2_0, /* check UART channel for connected DigO2 sensor */ |
55 DETECTION_DIGO2_1, | 55 DETECTION_DIGO2_1, |
56 DETECTION_DIGO2_2, | 56 DETECTION_DIGO2_2, |
57 DETECTION_DIGO2_3, | 57 DETECTION_DIGO2_3, |
58 #ifdef ENABLE_CO2_SUPPORT | 58 #ifdef ENABLE_CO2_SUPPORT |
59 DETECTION_CO2, /* check UART channel for connected CO2 sensor */ | 59 DETECTION_CO2_0, /* check UART channel for connected CO2 sensor */ |
60 DETECTION_CO2_1, | |
61 DETECTION_CO2_2, | |
62 DETECTION_CO2_3, | |
60 #endif | 63 #endif |
61 #ifdef ENABLE_SENTINEL_MODE | 64 #ifdef ENABLE_SENTINEL_MODE |
62 DETECTION_SENTINEL, /* check UART channel for connected Sentinel */ | 65 DETECTION_SENTINEL, /* check UART channel for connected Sentinel */ |
63 DETECTION_SENTINEL2, | 66 DETECTION_SENTINEL2, |
64 #endif | 67 #endif |