-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathublox_gps.h
85 lines (51 loc) · 1.61 KB
/
ublox_gps.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef UBLOX_GPS_H_
#define UBLOX_GPS_H_
#include <stdint.h>
#include <stdbool.h>
#include "board_define.h"
#include <ti/drivers/I2C.h>
#include <ti/drivers/UART2.h>
#include <ti/drivers/PIN.h>
#include "ti_drivers_config.h"
typedef struct
{
int32_t lat;
int32_t lon;
int32_t height;
uint32_t hAcc;
uint32_t vAcc;
uint16_t year;
uint8_t month;
uint8_t day;
uint8_t hour;
uint8_t minute;
uint8_t second;
uint8_t sv_fix_count;
uint8_t aop_status;
uint8_t navigation_statue;
uint8_t ubx_ack;
} ublox_gps_data_t;
typedef void (*ublox_gps_callback)(ublox_gps_data_t ublox_gps_data);
void set_ublox_callback(ublox_gps_callback callback);
void set_ublox_gps_gpio_instance(PIN_Handle pinHandleInstance);
void set_ublox_gps_uart2_instance(UART2_Handle uart);
void set_ublox_gps_i2c_instance(I2C_Handle i2cInstance);
void set_ublox_gps_power_on(void);
void set_ublox_gps_power_off(void);
uint8_t set_ublox_exit_backup_mode(void);
uint8_t set_ublox_backup_mode(void);
uint8_t set_ublox_i2c_nmea_off(void);
uint8_t set_ublox_uart_nmea_off(void);
uint8_t set_ublox_i2c_pvt_enable(void);
uint8_t set_ublox_uart_pvt_enable(void);
uint8_t set_ublox_i2c_pm2(void);
uint8_t set_ublox_uart_pm2(void);
uint8_t set_ublox_i2c_cfg_cfg_load(void);
uint8_t set_ublox_uart_cfg_cfg_load(void);
uint8_t set_ublox_i2c_cfg_cfg_save(void);
uint8_t set_ublox_uart_cfg_cfg_save(void);
uint8_t set_ublox_zoe_m8q_dcdc_enable(void);
uint16_t get_ublox_i2c_read_buffer_size(void);
uint8_t get_ublox_i2c_data(uint16_t size);
void ublox_gps_ubx_input(uint8_t data);
#endif /* UBLOX_GPS_H_ */