-
Notifications
You must be signed in to change notification settings - Fork 1
/
ublox_gps.h
83 lines (49 loc) · 1.48 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
#ifndef UBLOX_GPS_H_
#define UBLOX_GPS_H_
#include <stdint.h>
#include <stdbool.h>
#include "nrf_drv_twi.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;
extern volatile uint8_t twi_read_done;
extern volatile uint8_t twi_write_done;
extern volatile uint8_t twi_address_nack;
extern const nrf_drv_twi_t twi;
extern volatile uint8_t ublox_gps_timer;
typedef void (*ublox_gps_callback)(ublox_gps_data_t ublox_gps_data);
void set_ublox_gps_gpio_instance(uint32_t POWER_PIN);
void set_ublox_callback(ublox_gps_callback callback);
void set_ublox_gps_power_on(void);
void set_ublox_gps_power_off(void);
bool set_ublox_exit_backup_mode(void);
bool set_ublox_backup_mode(void);
bool set_ublox_i2c_nmea_off(void);
bool set_ublox_uart_nmea_off(void);
bool set_ublox_i2c_pvt_enable(void);
bool set_ublox_uart_pvt_enable(void);
bool set_ublox_i2c_pm2(void);
bool set_ublox_uart_pm2(void);
bool set_ublox_i2c_cfg_cfg_load(void);
bool set_ublox_uart_cfg_cfg_load(void);
bool set_ublox_i2c_cfg_cfg_save(void);
bool set_ublox_uart_cfg_cfg_save(void);
bool set_ublox_zoe_m8q_dcdc_enable(void);
uint16_t get_ublox_i2c_read_buffer_size(void);
bool get_ublox_i2c_data(uint16_t size);
void ublox_gps_ubx_input(uint8_t data);
#endif /* UBLOX_GPS_H_ */