feat: 完成通信帧组包功能

This commit is contained in:
bmy
2024-02-23 18:56:53 +08:00
parent 1e982b4954
commit 3a68f98635
7 changed files with 112 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
#ifndef _BY_TINY_FRAME_CONFIG_H__
#define _BY_TINY_FRAME_CONFIG_H__
#define BY_TF_DEBUG (1)
#define BY_TF_UART_TX_PIN (UART3_MAP0_TX_B10)
#define BY_TF_UART_RX_PIN (UART3_MAP0_RX_B11)
#define BY_TF_UART_INDEX (UART_3)
@@ -8,4 +10,14 @@
#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
#endif
#endif