yy1717
2022-12-08 f7a18ec4494b9c5c9ef3fd440bbf68ffc6425e18
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
//
// Created by YY on 2022/11/14.
//
 
#ifndef MYAPPLICATION3_AHP_H
#define MYAPPLICATION3_AHP_H
 
#include <cstdint>
#include <string>
 
#define ID_AHP_INFO_REQ          0x0001
#define ID_AHP_INFO_RESP          0x8001
#define ID_AHP_DFU_UPLOAD       0x0002
#define ID_AHP_DFU_RESP         0x8002
#define ID_RTK_DATA             0x0008
#define ID_GNSS_DATA             0x8008
#define ID_CTRL_CMD             0x0009
 
typedef struct {
    std::string version;
    std::string sn;
} aph_info_t;
 
struct aph_dfu_data {
    uint32_t file_size;
    uint32_t offset;
    uint16_t length;
    uint8_t data[0];
};
 
struct aph_dfu_resp {
    uint8_t status;
    uint8_t data[0];
};
 
void InitAhp(void);
void WriteRtkCommand(const char *data, int length);
 
#endif //MYAPPLICATION3_AHP_H