comparison Small_CPU/Inc/uartProtocol_GNSS.h @ 919:c0553dd70608 Evo_2_23

GNSS support for external UART interface: An ubox gps module may now be connected to the external UART. Per default the functionality is disabled using the compile switch ENABLE_GNSS_SUPPORT
author Ideenmodellierer
date Sun, 03 Nov 2024 15:43:04 +0100
parents 2225c467f1e9
children 5a9bc2e6112d
comparison
equal deleted inserted replaced
918:f72613a152dd 919:c0553dd70608
31 #include "configuration.h" 31 #include "configuration.h"
32 #include "stm32f4xx_hal.h" 32 #include "stm32f4xx_hal.h"
33 33
34 typedef enum 34 typedef enum
35 { 35 {
36 UART_GNSS_INIT = 0, /* Default Status for every sensor type */ 36 UART_GNSS_INIT = 0, /* Default Status for every sensor type */
37 UART_GNSS_LOAD, /* Load modul configuration */ 37 UART_GNSS_IDLE, /* sensor detected and no communication pending */
38 UART_GNSS_GET_ID, /* get unique module ID */ 38 UART_GNSS_ERROR, /* Error message received from sensor */
39 UART_GNSS_IDLE, /* sensor detected and no communication pending */ 39 UART_GNSS_WARMUP = 10,
40 UART_GNSS_ERROR, 40 UART_GNSS_LOADCONF_0,
41 UART_GNSS_OPERATING, /* normal operation => cyclic request of PVT data */ 41 UART_GNSS_LOADCONF_1,
42 UART_GNSS_LOADCONF_2,
43 UART_GNSS_GET_PVT,
42 } uartGnssStatus_t; 44 } uartGnssStatus_t;
43 45
44 typedef enum 46 typedef enum
45 { 47 {
46 GNSSRX_READY = 0, /* Initial state */ 48 GNSSRX_READY = 0, /* Initial state */
47 GNSSRX_RECEIVING, /* Pending data receiption */ 49 GNSSRX_DETECT_HEADER_0,
50 GNSSRX_DETECT_HEADER_1,
51 GNSSRX_DETECT_HEADER_2,
52 GNSSRX_DETECT_HEADER_3,
53 GNSSRX_DETECT_ACK_0,
54 GNSSRX_DETECT_ACK_1,
55 GNSSRX_DETECT_ACK_2,
56 GNSSRX_DETECT_ACK_3,
57 GNSSRX_READ_NAV_DATA,
58 GNSSRX_READ_PVT_DATA,
59 GNSSRX_READ_POSLLH_DATA
48 } receiveStateGnss_t; 60 } receiveStateGnss_t;
49 61
50 62
63 typedef enum
64 {
65 GNSSCMD_LOADCONF_0 = 0,
66 GNSSCMD_LOADCONF_1,
67 GNSSCMD_LOADCONF_2,
68 GNSSCMD_GET_NAV_DATA,
69 GNSSCMD_GET_PVT_DATA,
70 GNSSCMD_GET_POSLLH_DATA
71 } gnssSensorCmd_t;
72
73
51 void uartGnss_Control(void); 74 void uartGnss_Control(void);
52 void uartGnss_ProcessData(void); 75 void uartGnss_ProcessData(uint8_t data);
53 uint8_t uartSentinel_isSensorConnected(); 76 uint8_t uartGnss_isSensorConnected();
77 void uartGnss_SendCmd(uint8_t GnssCmd);
54 78
55 #endif /* UART_PROTOCOL_GNSS_H */ 79 #endif /* UART_PROTOCOL_GNSS_H */