Tasmota/lib/lib_div/ams/HdlcParser.h
gemu f09a083777
Sml ams (#17828)
* sml ams crypto support

* add ams library

* fix crc names

* fix TLS dependency

* Update library.properties

* Update xsns_53_sml.ino
2023-01-30 15:03:46 +01:00

30 lines
517 B
C++

#ifndef _HDLCPARSER_H
#define _HDLCPARSER_H
#include "Arduino.h"
#include "DataParser.h"
#define HDLC_FLAG 0x7E
typedef struct HDLCHeader {
uint8_t flag;
uint16_t format;
} __attribute__((packed)) HDLCHeader;
typedef struct HDLCFooter {
uint16_t fcs;
uint8_t flag;
} __attribute__((packed)) HDLCFooter;
typedef struct HDLC3CtrlHcs {
uint8_t control;
uint16_t hcs;
} __attribute__((packed)) HDLC3CtrlHcs;
class HDLCParser {
public:
int8_t parse(uint8_t *buf, DataParserContext &ctx);
};
#endif