comparison Small_CPU/Inc/uartProtocol_Sentinel.h @ 842:c3dd461ca3f9 Evo_2_23

Migrated Sentinel protocol to new UART structure: The Sentinel protocol had not been migrated to the new UART structure which was introduced with the introduction of the UART MUX. The Sentinel is now supported by autodetection again (development version only)
author Ideenmodellierer
date Mon, 15 Jan 2024 21:44:18 +0100
parents
children
comparison
equal deleted inserted replaced
841:70092f552f5a 842:c3dd461ca3f9
1 /**
2 ******************************************************************************
3 * @file uartProtocol_Sentinel.h
4 * @author heinrichs weikamp gmbh
5 * @version V0.0.1
6 * @date 15-Jan-2024
7 * @brief Interface functionality read data from Sentinel rebreather
8 *
9 @verbatim
10 ==============================================================================
11 ##### How to use #####
12 ==============================================================================
13 @endverbatim
14 ******************************************************************************
15 * @attention
16 *
17 * <h2><center>&copy; COPYRIGHT(c) 2014 heinrichs weikamp</center></h2>
18 *
19 ******************************************************************************
20 */
21
22 /* Define to prevent recursive inclusion -------------------------------------*/
23 #ifndef UART_PROTOCOL_SENTINEL_H
24 #define UART_PROTOCOL_SENTINEL_H
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 /* Includes ------------------------------------------------------------------*/
31 #include "configuration.h"
32 #include "stm32f4xx_hal.h"
33
34 typedef enum
35 {
36 UART_SENTINEL_INIT = 0, /* Default Status for every sensor type */
37 UART_SENTINEL_IDLE, /* sensor detected and no communication pending */
38 UART_SENTINEL_ERROR,
39 UART_SENTINEL_OPERATING, /* normal operation */
40 } uartSentinelStatus_t;
41
42 typedef enum
43 {
44 SENTRX_Ready= 0, /* Initial state */
45 SENTRX_DetectStart, /* validate start byte */
46 SENTRX_SelectData, /* Data contained in this frame */
47 SENTRX_Data0, /* Process incoming data */
48 SENTRX_Data1,
49 SENTRX_Data2,
50 SENTRX_Data3,
51 SENTRX_Data4,
52 SENTRX_Data5,
53 SENTRX_Data6,
54 SENTRX_Data7,
55 SENTRX_Data8,
56 SENTRX_Data9,
57 SENTRX_Data10,
58 SENTRX_Data11,
59 SENTRX_Data12,
60 SENTRX_DataComplete
61 } receiveStateSentinel_t;
62
63
64 void uartSentinel_Control(void);
65 void uartSentinel_ProcessData(uint8_t data);
66 uint8_t uartSentinel_isSensorConnected();
67
68 #endif /* UART_PROTOCOL_SENTINEL_H */