Mercurial > public > ostc4
comparison Small_CPU/Inc/externalInterface.h @ 704:f1b40364b0af
Added protocol functions for UART DiveO2 sensor:
The code has been modified to support the handling of several protocols (including baud rate changes). The data is requested by polling and passed via DMA into a ringbuffer which is then parsed by a cyclic function call in the main loop. At the moment only the O2 values are forwarded but because the sensor send several types of data within a signle message already more is extracted but yet discarded.
author | Ideenmodellierer |
---|---|
date | Fri, 28 Oct 2022 20:49:21 +0200 |
parents | 52d68cf9994c |
children | 045ff7800501 |
comparison
equal
deleted
inserted
replaced
703:2f457024049b | 704:f1b40364b0af |
---|---|
41 float externalInterface_CalculateADCValue(uint8_t channel); | 41 float externalInterface_CalculateADCValue(uint8_t channel); |
42 float getExternalInterfaceChannel(uint8_t channel); | 42 float getExternalInterfaceChannel(uint8_t channel); |
43 uint8_t setExternalInterfaceChannel(uint8_t channel, float value); | 43 uint8_t setExternalInterfaceChannel(uint8_t channel, float value); |
44 void externalInterface_SwitchPower33(uint8_t state); | 44 void externalInterface_SwitchPower33(uint8_t state); |
45 void externalInterface_SwitchADC(uint8_t state); | 45 void externalInterface_SwitchADC(uint8_t state); |
46 void externalInterface_SwitchUART(uint8_t protocol); | |
46 uint8_t externalInterface_isEnabledPower33(void); | 47 uint8_t externalInterface_isEnabledPower33(void); |
47 uint8_t externalInterface_isEnabledADC(void); | 48 uint8_t externalInterface_isEnabledADC(void); |
49 uint8_t externalInterface_GetUARTProtocol(); | |
48 | 50 |
49 void externalInterface_SetCO2Value(uint16_t CO2_ppm); | 51 void externalInterface_SetCO2Value(uint16_t CO2_ppm); |
50 void externalInterface_SetCO2SignalStrength(uint16_t LED_qa); | 52 void externalInterface_SetCO2SignalStrength(uint16_t LED_qa); |
51 uint16_t externalInterface_GetCO2Value(void); | 53 uint16_t externalInterface_GetCO2Value(void); |
52 uint16_t externalInterface_GetCO2SignalStrength(void); | 54 uint16_t externalInterface_GetCO2SignalStrength(void); |