feat: 添加通信帧解析超时机制

This commit is contained in:
bmy
2024-02-23 20:13:34 +08:00
parent 3a68f98635
commit a1c047f15a
4 changed files with 85 additions and 4 deletions

View File

@@ -10,14 +10,18 @@
#define BY_TF_PARSE_BUFFER_SIZE (50)
/** 注释此项则为主机,否则为从机 **/
// 注释此项则为主机,否则为从机
// #define BY_TF_DEVICE_SLAVE
/********** 从机模式配置选项 **********/
#if defined(BY_TF_DEVICE_SLAVE)
/** 多从机通信时注意修改地址,避免冲突 **/
// 从机地址 (多从机通信时注意修改地址,避免冲突)
#define BY_TF_DEVICE_SLAVE_ADDRESS (0x0D)
/********** 主机模式配置选项 **********/
#else
#define BY_TF_DEVICE_MASTER
// 监听/解析 超时时间 单位毫秒
#define BY_TF_PARSE_TIMEOUT (200)
#endif
#endif