comparison Small_CPU/Inc/externalInterface.h @ 696:cc542448fb28

Merge
author heinrichsweikamp
date Fri, 19 Aug 2022 11:30:24 +0200
parents 52d68cf9994c
children f1b40364b0af
comparison
equal deleted inserted replaced
661:87bee7cc77b3 696:cc542448fb28
30 /* Includes ------------------------------------------------------------------*/ 30 /* Includes ------------------------------------------------------------------*/
31 31
32 #define MAX_ADC_CHANNEL (3u) /* number of channels to be read */ 32 #define MAX_ADC_CHANNEL (3u) /* number of channels to be read */
33 #define EXTERNAL_ADC_NO_DATA 0xFF 33 #define EXTERNAL_ADC_NO_DATA 0xFF
34 34
35 #define EXT33V_CONTROL_PIN GPIO_PIN_7 /* PortC */
36
35 void externalInterface_Init(void); 37 void externalInterface_Init(void);
38 void externalInterface_InitPower33(void);
36 uint8_t externalInterface_StartConversion(uint8_t channel); 39 uint8_t externalInterface_StartConversion(uint8_t channel);
37 uint8_t externalInterface_ReadAndSwitch(); 40 uint8_t externalInterface_ReadAndSwitch();
38 float externalInterface_CalculateADCValue(uint8_t channel); 41 float externalInterface_CalculateADCValue(uint8_t channel);
39 float getExternalInterfaceChannel(uint8_t channel); 42 float getExternalInterfaceChannel(uint8_t channel);
43 uint8_t setExternalInterfaceChannel(uint8_t channel, float value);
44 void externalInterface_SwitchPower33(uint8_t state);
45 void externalInterface_SwitchADC(uint8_t state);
46 uint8_t externalInterface_isEnabledPower33(void);
47 uint8_t externalInterface_isEnabledADC(void);
48
49 void externalInterface_SetCO2Value(uint16_t CO2_ppm);
50 void externalInterface_SetCO2SignalStrength(uint16_t LED_qa);
51 uint16_t externalInterface_GetCO2Value(void);
52 uint16_t externalInterface_GetCO2SignalStrength(void);
53 void externalInterface_SetCO2State(uint16_t state);
54 uint16_t externalInterface_GetCO2State(void);
55
56 void externalInterface_ExecuteCmd(uint16_t Cmd);
40 57
41 #endif /* EXTERNAL_INTERFACE_H */ 58 #endif /* EXTERNAL_INTERFACE_H */