/* parser.h */
#ifndef PARSER_H
#define PARSER_H

#include <stdint.h>
#include <stdbool.h>

/* Platform-dependent function pointer set */
typedef struct {
    void (*log)(const char *fmt, ...);
    void (*tx_bin)(const uint8_t *buf, uint16_t len);
    bool crc_check;  
} dr_platform_if_t;


/* Global interface & log flag */
extern dr_platform_if_t g_plat;
extern bool g_log_enable;

/* Main parser entry point */
int dr_cmd_parser(const uint8_t *buf, uint8_t len);

#endif /* PARSER_H */

