This commit is contained in:
2024-09-26 22:32:20 +08:00
commit 097089ef4e
323 changed files with 135661 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
/*
* ParserPack.h
*
* Created on: Jun 24, 2020
* Author: matth
*/
#ifndef MATT_PARSEPACK_UBX_H_
#define MATT_PARSEPACK_UBX_H_
#include <stdint.h>
#include <stddef.h>
#ifndef PARSER_UBX_BUFF_LEN
#define PARSER_UBX_BUFF_LEN (255)
#endif
typedef struct{
int stage;
uint8_t idx;
uint8_t len;
uint8_t msgClass;
uint8_t msgId;
uint8_t suspend_step; //Ìø¹ýn¸ö±£Áôλ
uint8_t head_len;
uint16_t body_len;
uint8_t seq;
uint16_t id;
uint16_t crc16;
uint32_t crc32;
uint32_t crc_cal;
uint8_t checkA;
uint8_t checkB;
uint32_t head_err_cnt;
uint8_t buff[PARSER_UBX_BUFF_LEN];
} ParserUbx_t;
void ParserUbx_init(ParserUbx_t *parser);
int ParserUbx_char(ParserUbx_t *parser, uint8_t c);
#endif /* MATT_PARSEPACK_H_ */