comparison Common/Inc/settings.h @ 691:52d68cf9994c Betatest

Improvment external interface usage: The previous implementation of the external interface was straight forward for ADC and Co2 UART usage. The new implementation provides the possibility to configurate the behavior of the external interface. e.g. Switching of external3,3V and ADC separatly and selection of UART protocol.
author Ideenmodellierer
date Fri, 05 Aug 2022 15:26:28 +0200
parents c855753af9a6
children 6d7c812fc173
comparison
equal deleted inserted replaced
690:fca2bd25e6e2 691:52d68cf9994c
33 //#include "data_central.h" 33 //#include "data_central.h"
34 34
35 #include "global_constants.h" 35 #include "global_constants.h"
36 // From Common/Drivers/ 36 // From Common/Drivers/
37 #include "stm32f4xx_hal.h" 37 #include "stm32f4xx_hal.h"
38
39 #include "configuration.h"
38 40
39 #include <stdint.h> 41 #include <stdint.h>
40 42
41 43
42 #define NUM_GASES 5 44 #define NUM_GASES 5
78 80
79 #define PSCR_MAX_O2_DROP (15u) 81 #define PSCR_MAX_O2_DROP (15u)
80 #define PSCR_MIN_LUNG_RATIO (5u) 82 #define PSCR_MIN_LUNG_RATIO (5u)
81 #define PSCR_MAX_LUNG_RATIO (20u) 83 #define PSCR_MAX_LUNG_RATIO (20u)
82 84
83 #define FUTURE_SPARE_SIZE (29u) /* Applied for reuse of old, not used, scooter block (was 32 bytes)*/ 85 #define UART_MAX_PROTOCOL (2u)
86
87 #define FUTURE_SPARE_SIZE (28u) /* Applied for reuse of old, not used, scooter block (was 32 bytes)*/
84 88
85 typedef enum 89 typedef enum
86 { 90 {
87 O2_SENSOR_SOURCE_OPTIC = 0, 91 O2_SENSOR_SOURCE_OPTIC = 0,
88 O2_SENSOR_SOURCE_ANALOG, 92 O2_SENSOR_SOURCE_ANALOG,
93 #ifdef ENABLE_SENTINEL_MODE
94 O2_SENSOR_SOURCE_SENTINEL,
95 #endif
89 O2_SENSOR_SOURCE_MAX 96 O2_SENSOR_SOURCE_MAX
90 } SensorSource; 97 } SensorSource;
91 #define MAX_O2_SENSOR_SOURCE (2u) 98 #define MAX_O2_SENSOR_SOURCE (2u)
92 99
93 typedef enum 100 typedef enum
211 uint8_t safetystopDepth; 218 uint8_t safetystopDepth;
212 uint32_t updateSettingsAllowedFromHeader; 219 uint32_t updateSettingsAllowedFromHeader;
213 uint8_t pscr_lung_ratio; /* redefined in 0xFFFF0020 */ 220 uint8_t pscr_lung_ratio; /* redefined in 0xFFFF0020 */
214 uint8_t pscr_o2_drop; /* redefined in 0xFFFF0020 */ 221 uint8_t pscr_o2_drop; /* redefined in 0xFFFF0020 */
215 uint8_t co2_sensor_active; /* redefined in 0xFFFF0021 */ 222 uint8_t co2_sensor_active; /* redefined in 0xFFFF0021 */
223 uint8_t ext_uart_protocol; /* redefined in 0xFFFF0022 */
216 uint8_t Future_SPARE[FUTURE_SPARE_SIZE]; /* redefined in 0xFFFF0020 (old scooter Block was 32 byte)*/ 224 uint8_t Future_SPARE[FUTURE_SPARE_SIZE]; /* redefined in 0xFFFF0020 (old scooter Block was 32 byte)*/
217 // new in 0xFFFF0006 225 // new in 0xFFFF0006
218 uint8_t ppo2sensors_deactivated; 226 uint8_t ppo2sensors_deactivated;
219 uint8_t tX_colorscheme; 227 uint8_t tX_colorscheme;
220 uint8_t tX_userselectedLeftLowerCornerPrimary; 228 uint8_t tX_userselectedLeftLowerCornerPrimary;