comparison Small_CPU/Inc/externalInterface.h @ 731:2a801cfe23ab

Improvment sensor Autodetection: The sensor type optical has been introduce to enable the OSTC to completly switch of the external interface (voltage + ADC operation) The optical interface is handled via firmware. In addition some states have been added to reset the external power supply and to provide the ADC more time to do its conversation.
author Ideenmodellierer
date Sun, 15 Jan 2023 21:43:33 +0100
parents d646a0f724a7
children 30717de00f3a
comparison
equal deleted inserted replaced
730:9c65d226f4f6 731:2a801cfe23ab
39 39
40 typedef enum 40 typedef enum
41 { 41 {
42 DETECTION_OFF = 0, /* no detection requested */ 42 DETECTION_OFF = 0, /* no detection requested */
43 DETECTION_INIT, /* prepare external interface for operation if not already activated */ 43 DETECTION_INIT, /* prepare external interface for operation if not already activated */
44 DETECTION_ANALOG, /* check ADC channels for connected sensors */ 44 DETECTION_START,
45 DETECTION_ANALOG1, /* check ADC channels for connected sensors */
46 DETECTION_ANALOG2,
45 DETECTION_DIGO2, /* check UART channel for connected DigO2 sensor */ 47 DETECTION_DIGO2, /* check UART channel for connected DigO2 sensor */
46 DETECTION_CO2, /* check UART channel for connected CO2 sensor */ 48 DETECTION_CO2, /* check UART channel for connected CO2 sensor */
47 DETECTION_DONE 49 DETECTION_DONE
48 } externalInterfaceAutoDetect_t; 50 } externalInterfaceAutoDetect_t;
49 51
71 void externalInterface_SetCO2State(uint16_t state); 73 void externalInterface_SetCO2State(uint16_t state);
72 uint16_t externalInterface_GetCO2State(void); 74 uint16_t externalInterface_GetCO2State(void);
73 uint8_t externalInterface_GetSensorData(uint8_t* pDataStruct); 75 uint8_t externalInterface_GetSensorData(uint8_t* pDataStruct);
74 void externalInterface_SetSensorData(uint8_t dataId, uint8_t* pDataStruct); 76 void externalInterface_SetSensorData(uint8_t dataId, uint8_t* pDataStruct);
75 void externalInface_SetSensorMap(uint8_t* pMap); 77 void externalInface_SetSensorMap(uint8_t* pMap);
76 uint8_t* externalInterface_GetSensorMapPointer(void); 78 uint8_t* externalInterface_GetSensorMapPointer(uint8_t finalMap);
77 void externalInterface_AutodetectSensor(void); 79 void externalInterface_AutodetectSensor(void);
78 void externalInterface_ExecuteCmd(uint16_t Cmd); 80 void externalInterface_ExecuteCmd(uint16_t Cmd);
79 81
80 #endif /* EXTERNAL_INTERFACE_H */ 82 #endif /* EXTERNAL_INTERFACE_H */