规范串口通讯

This commit is contained in:
2024-12-19 10:49:02 +08:00
parent 3f760e2955
commit b4913d63b3
5 changed files with 37 additions and 21 deletions

View File

@@ -13,7 +13,8 @@ import (
type Reader interface {
io.Closer
SetSlave(uint8)
// SetSlave 设置读卡器的 UnitID
SetSlave(byte)
// WriteUnitId 写入读卡器的 UnitID
WriteUnitId(uint16) error
// Init 初始化读卡器配置