Files
project_bycmd/by_frame.h

30 lines
882 B
C
Raw Normal View History

2024-05-17 01:57:18 +08:00
#ifndef _BY_FRAME_H__
#define _BY_FRAME_H__
/* BY_TINY_FRAME 的超级减配版本(好吧基本上完全没有关系)
*
* 使
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#define BY_FRAME_HEAD (0XEB)
#define BY_FRAME_DATA_NUM (2)
#define BY_FRANE_DATA_LEN (BY_FRAME_DATA_NUM * sizeof(uint32_t))
#define BY_FRANE_LEN (BY_FRANE_DATA_LEN + 4)
typedef struct by_frame_queue_t {
uint8_t *buff;
int len;
int size;
} by_frame_queue_t;
extern int by_frame_init(void);
extern int by_frame_parse(uint8_t *cmd, uint32_t *data_array);
extern void by_frame_send(uint8_t cmd, uint8_t *data_array, uint8_t len);
#endif