//
|
// 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
|