annotate Small_CPU/Inc/uartProtocol_GNSS.h @ 949:c6b858f2e025 Evo_2_23 tip

GNSS UTC in Date-Time menu: The UTC time provided by the gnss module is not shown in the date-time settings menu. If a valid time signal is available then the OSTC RTC may be set to it by selecting the UTC menu entry. The time zone has to be selected manually. This is possible using a separate edit line.
author Ideenmodellierer
date Sun, 22 Dec 2024 21:19:21 +0100
parents f41974734268
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
899
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
1 /**
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
2 ******************************************************************************
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
3 * @file uartProtocol_GNSS.h
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
4 * @author heinrichs weikamp gmbh
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
5 * @version V0.0.1
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
6 * @date 30-Sep-2024
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
7 * @brief Interface functionality for operation of gnss devices
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
8 *
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
9 @verbatim
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
10 ==============================================================================
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
11 ##### How to use #####
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
12 ==============================================================================
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
13 @endverbatim
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
14 ******************************************************************************
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
15 * @attention
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
16 *
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
17 * <h2><center>&copy; COPYRIGHT(c) 2014 heinrichs weikamp</center></h2>
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
18 *
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
19 ******************************************************************************
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
20 */
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
21
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
22 /* Define to prevent recursive inclusion -------------------------------------*/
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
23 #ifndef UART_PROTOCOL_GNSS_H
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
24 #define UART_PROTOCOL_GNSS_H
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
25
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
26 #ifdef __cplusplus
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
27 extern "C" {
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
28 #endif
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
29
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
30 /* Includes ------------------------------------------------------------------*/
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
31 #include "configuration.h"
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
32 #include "stm32f4xx_hal.h"
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
33
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
34 typedef enum
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
35 {
919
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
36 UART_GNSS_INIT = 0, /* Default Status for every sensor type */
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
37 UART_GNSS_IDLE, /* sensor detected and no communication pending */
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
38 UART_GNSS_ERROR, /* Error message received from sensor */
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
39 UART_GNSS_WARMUP = 10,
936
3029f0332f4f GNSS introduced power saving mode:
Ideenmodellierer
parents: 932
diff changeset
40 UART_GNSS_INACTIVE, /* no requests to the receiver */
919
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
41 UART_GNSS_LOADCONF_0,
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
42 UART_GNSS_LOADCONF_1,
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
43 UART_GNSS_LOADCONF_2,
939
f41974734268 Resume UART com with gnss after sleep:
Ideenmodellierer
parents: 936
diff changeset
44 UART_GNSS_SETMODE_MOBILE,
936
3029f0332f4f GNSS introduced power saving mode:
Ideenmodellierer
parents: 932
diff changeset
45 UART_GNSS_PWRDOWN,
3029f0332f4f GNSS introduced power saving mode:
Ideenmodellierer
parents: 932
diff changeset
46 UART_GNSS_PWRUP,
3029f0332f4f GNSS introduced power saving mode:
Ideenmodellierer
parents: 932
diff changeset
47 UART_GNSS_SETCONF, /* save configuration */
919
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
48 UART_GNSS_GET_PVT,
931
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
49 UART_GNSS_GET_SAT
899
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
50 } uartGnssStatus_t;
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
51
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
52 typedef enum
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
53 {
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
54 GNSSRX_READY = 0, /* Initial state */
919
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
55 GNSSRX_DETECT_HEADER_0,
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
56 GNSSRX_DETECT_HEADER_1,
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
57 GNSSRX_DETECT_HEADER_2,
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
58 GNSSRX_DETECT_HEADER_3,
931
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
59 GNSSRX_DETECT_LENGTH_0,
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
60 GNSSRX_DETECT_LENGTH_1,
919
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
61 GNSSRX_DETECT_ACK_0,
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
62 GNSSRX_DETECT_ACK_1,
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
63 GNSSRX_DETECT_ACK_2,
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
64 GNSSRX_DETECT_ACK_3,
931
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
65 GNSSRX_READ_DATA,
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
66 GNSSRX_READ_CK_A,
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
67 GNSSRX_READ_CK_B,
899
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
68 } receiveStateGnss_t;
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
69
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
70
919
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
71 typedef enum
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
72 {
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
73 GNSSCMD_LOADCONF_0 = 0,
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
74 GNSSCMD_LOADCONF_1,
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
75 GNSSCMD_LOADCONF_2,
939
f41974734268 Resume UART com with gnss after sleep:
Ideenmodellierer
parents: 936
diff changeset
76 GNSSCMD_SETMOBILE,
936
3029f0332f4f GNSS introduced power saving mode:
Ideenmodellierer
parents: 932
diff changeset
77 GNSSCMD_MODE_PWS,
3029f0332f4f GNSS introduced power saving mode:
Ideenmodellierer
parents: 932
diff changeset
78 GNSSCMD_MODE_NORMAL,
3029f0332f4f GNSS introduced power saving mode:
Ideenmodellierer
parents: 932
diff changeset
79 GNSSCMD_SET_CONFIG,
919
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
80 GNSSCMD_GET_NAV_DATA,
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
81 GNSSCMD_GET_PVT_DATA,
931
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
82 GNSSCMD_GET_POSLLH_DATA,
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
83 GNSSCMD_GET_NAVSAT_DATA
919
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
84 } gnssSensorCmd_t;
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
85
931
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
86 typedef struct
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
87 {
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
88 uint8_t class;
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
89 uint8_t id;
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
90 } gnssRequest_s;
5a9bc2e6112d Added Sat Status Overview:
Ideenmodellierer
parents: 919
diff changeset
91
936
3029f0332f4f GNSS introduced power saving mode:
Ideenmodellierer
parents: 932
diff changeset
92 void uartGnss_ReqPowerDown(uint8_t request);
939
f41974734268 Resume UART com with gnss after sleep:
Ideenmodellierer
parents: 936
diff changeset
93 uint8_t uartGnss_isPowerDownRequested(void);
932
effadaa3a1f7 Cleanup Gnss UART implementation:
Ideenmodellierer
parents: 931
diff changeset
94 uartGnssStatus_t uartGnss_GetState(void);
effadaa3a1f7 Cleanup Gnss UART implementation:
Ideenmodellierer
parents: 931
diff changeset
95 void uartGnss_SetState(uartGnssStatus_t newState);
899
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
96 void uartGnss_Control(void);
919
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
97 void uartGnss_ProcessData(uint8_t data);
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
98 uint8_t uartGnss_isSensorConnected();
c0553dd70608 GNSS support for external UART interface:
Ideenmodellierer
parents: 899
diff changeset
99 void uartGnss_SendCmd(uint8_t GnssCmd);
899
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
100
2225c467f1e9 Added data path and visualization for position data:
Ideenmodellierer
parents:
diff changeset
101 #endif /* UART_PROTOCOL_GNSS_H */