feat(ch934x_serial): 添加串口写入功能的端口索引参数

- write方法新增可选的serialPortIndex参数,支持直接写入指定端口
- 传入端口索引时不会改变当前活跃端口,保持原有活跃端口行为
- 添加对负数端口索引的验证处理,直接返回零避免异常
- 更新文档说明多端口并发客户端应使用显式端口写入方式
- 增加相关单元测试覆盖新参数的各种使用场景
- 同步更新Android原生层实现以支持端口索引传递
This commit is contained in:
2026-07-13 20:51:27 +08:00
parent 020904bd2a
commit 7fe87f8d7c
10 changed files with 137 additions and 73 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
name: ch934x_serial
description: "Flutter 插件,封装南京沁恒 CH934X 系列 USB 转串口芯片的 Android SDK,提供设备查找、串口读写、GPIO 与 Modem 控制等能力。"
version: 1.0.0
version: 1.0.1
homepage: https://example.com/ch934x_serial
environment: