feat: 添加蓝牙串口模块支持

- 添加 ble_serial_module.c 实现蓝牙串口功能
- 添加 ble_serial_rx_event 和 ble_serial_tx_event 事件定义及实现
- 在 CMakeLists.txt 中注册新的源文件和事件
- 配置蓝牙 L2CAP MTU 和缓冲区大小参数
- 修改 usb_cdc_test_module 支持通过蓝牙发送测试消息
- 实现蓝牙连接状态管理及数据收发功能
This commit is contained in:
2026-04-13 10:10:46 +08:00
parent 33fb416cfa
commit 15307dfde5
8 changed files with 562 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
#ifndef BLINKY_BLE_SERIAL_RX_EVENT_H_
#define BLINKY_BLE_SERIAL_RX_EVENT_H_
#include <app_event_manager.h>
#include <app_event_manager_profiler_tracer.h>
#ifdef __cplusplus
extern "C" {
#endif
struct ble_serial_rx_event {
struct app_event_header header;
struct event_dyndata dyndata;
};
APP_EVENT_TYPE_DYNDATA_DECLARE(ble_serial_rx_event);
#ifdef __cplusplus
}
#endif
#endif /* BLINKY_BLE_SERIAL_RX_EVENT_H_ */