feat: 移植从机通信帧协议
This commit is contained in:
27
app/tiny_frame/by_tiny_frame_config.h
Normal file
27
app/tiny_frame/by_tiny_frame_config.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef _BY_TINY_FRAME_CONFIG_H__
|
||||
#define _BY_TINY_FRAME_CONFIG_H__
|
||||
|
||||
#define BY_TF_DEBUG (1)
|
||||
|
||||
#define BY_TF_UART_TX_PIN (UART1_MAP0_TX_A9)
|
||||
#define BY_TF_UART_RX_PIN (UART1_MAP0_RX_A10)
|
||||
#define BY_TF_UART_INDEX (UART_1)
|
||||
#define BY_TF_UART_BAUDRATE (115200)
|
||||
|
||||
#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
|
||||
Reference in New Issue
Block a user