liulong 070b7685d5 Linux系统下串口Close相关实现的深度优化
1. 优化了Close方法的资源释放顺序,先释放独占访问权,再关闭实际的端口句柄
2. 添加了句柄有效性检查,避免对无效句柄进行操作
3. 确保所有资源都能正确清理,包括句柄和信号管道
4. 改进了错误处理机制,确保只返回第一个错误
5. 为所有方法添加了端口状态检查,确保在端口关闭后立即返回PortClosed错误
6. 统一了错误处理格式,使用PortError类型包装系统错误
7. 优化了Read方法的错误处理和超时逻辑
8. 为Write、Break、SetMode、SetDTR、SetRTS和GetModemStatusBits方法添加了端口状态检查
2026-03-03 10:27:03 +08:00
2024-06-24 17:33:18 +02:00
2024-04-01 16:04:53 +02:00
2024-06-24 17:33:18 +02:00
2024-02-20 15:27:44 +01:00
2024-02-20 15:27:44 +01:00
2024-02-20 15:27:44 +01:00
2024-03-18 22:25:55 +01:00
2024-02-20 15:27:44 +01:00
2024-02-20 15:27:44 +01:00
2024-02-20 15:27:44 +01:00
2024-02-20 15:57:58 +01:00
2024-02-20 15:57:58 +01:00
2024-02-20 15:27:44 +01:00
2024-02-20 15:27:44 +01:00
2024-02-20 15:57:58 +01:00
2024-06-24 17:33:18 +02:00

Build Status

go.bug.st/serial

A cross-platform serial port library for Go.

Documentation and examples

See the package documentation here: https://pkg.go.dev/go.bug.st/serial

go.mod transition

This library supports go.mod with the import go.bug.st/serial.

If you came from the pre-go.mod era please update your import paths from go.bug.st/serial.v1 to go.bug.st/serial to receive updates. The latest v1 release is still available using the old import path.

Credits

Thanks to all awesome contributors!

License

This software is released under the BSD 3-clause license.

Description
No description provided
Readme BSD-3-Clause 371 KiB
Languages
Go 100%