Mercurial > public > ostc4
annotate Small_CPU/Inc/uartProtocol_GNSS.h @ 938:df87dbfc9c21 Evo_2_23
Update GPIO:
Splitted the init function and moved GPS deactivation into the sleep loop (deep sleep)
author | Ideenmodellierer |
---|---|
date | Tue, 10 Dec 2024 21:00:55 +0100 |
parents | 3029f0332f4f |
children | f41974734268 |
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>© 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 | 36 UART_GNSS_INIT = 0, /* Default Status for every sensor type */ |
37 UART_GNSS_IDLE, /* sensor detected and no communication pending */ | |
38 UART_GNSS_ERROR, /* Error message received from sensor */ | |
39 UART_GNSS_WARMUP = 10, | |
936 | 40 UART_GNSS_INACTIVE, /* no requests to the receiver */ |
919 | 41 UART_GNSS_LOADCONF_0, |
42 UART_GNSS_LOADCONF_1, | |
43 UART_GNSS_LOADCONF_2, | |
936 | 44 UART_GNSS_PWRDOWN, |
45 UART_GNSS_PWRUP, | |
46 UART_GNSS_SETCONF, /* save configuration */ | |
919 | 47 UART_GNSS_GET_PVT, |
931 | 48 UART_GNSS_GET_SAT |
899
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
diff
changeset
|
49 } uartGnssStatus_t; |
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
diff
changeset
|
50 |
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
diff
changeset
|
51 typedef enum |
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
diff
changeset
|
52 { |
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
diff
changeset
|
53 GNSSRX_READY = 0, /* Initial state */ |
919 | 54 GNSSRX_DETECT_HEADER_0, |
55 GNSSRX_DETECT_HEADER_1, | |
56 GNSSRX_DETECT_HEADER_2, | |
57 GNSSRX_DETECT_HEADER_3, | |
931 | 58 GNSSRX_DETECT_LENGTH_0, |
59 GNSSRX_DETECT_LENGTH_1, | |
919 | 60 GNSSRX_DETECT_ACK_0, |
61 GNSSRX_DETECT_ACK_1, | |
62 GNSSRX_DETECT_ACK_2, | |
63 GNSSRX_DETECT_ACK_3, | |
931 | 64 GNSSRX_READ_DATA, |
65 GNSSRX_READ_CK_A, | |
66 GNSSRX_READ_CK_B, | |
899
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
diff
changeset
|
67 } receiveStateGnss_t; |
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
diff
changeset
|
68 |
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
diff
changeset
|
69 |
919 | 70 typedef enum |
71 { | |
72 GNSSCMD_LOADCONF_0 = 0, | |
73 GNSSCMD_LOADCONF_1, | |
74 GNSSCMD_LOADCONF_2, | |
936 | 75 GNSSCMD_MODE_PWS, |
76 GNSSCMD_MODE_NORMAL, | |
77 GNSSCMD_SET_CONFIG, | |
919 | 78 GNSSCMD_GET_NAV_DATA, |
79 GNSSCMD_GET_PVT_DATA, | |
931 | 80 GNSSCMD_GET_POSLLH_DATA, |
81 GNSSCMD_GET_NAVSAT_DATA | |
919 | 82 } gnssSensorCmd_t; |
83 | |
931 | 84 typedef struct |
85 { | |
86 uint8_t class; | |
87 uint8_t id; | |
88 } gnssRequest_s; | |
89 | |
936 | 90 void uartGnss_ReqPowerDown(uint8_t request); |
932 | 91 uartGnssStatus_t uartGnss_GetState(void); |
92 void uartGnss_SetState(uartGnssStatus_t newState); | |
899
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
diff
changeset
|
93 void uartGnss_Control(void); |
919 | 94 void uartGnss_ProcessData(uint8_t data); |
95 uint8_t uartGnss_isSensorConnected(); | |
96 void uartGnss_SendCmd(uint8_t GnssCmd); | |
899
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
diff
changeset
|
97 |
2225c467f1e9
Added data path and visualization for position data:
Ideenmodellierer
parents:
diff
changeset
|
98 #endif /* UART_PROTOCOL_GNSS_H */ |