Skip to content

Conversation

@gkuga
Copy link

@gkuga gkuga commented Sep 7, 2025

Issue: #2

move LinuxCSerialStruct definition to a shared file make setserial API methods OS-specific

  • Move LinuxCSerialStruct struct definition to serial_setserial_unix.go for cross-arch clarity.
  • Change IOMapBase type to uint for architecture-dependent binary compatibility with C's unsigned long.
  • Refactor GetSerialStruct and SetSerialPortMode to be unixPort methods, removing device open/close logic.
  • Add OS stubs for unsupported platforms (darwin, freebsd, openbsd) to return clear errors.

…e setserial API methods OS-specific

- Move LinuxCSerialStruct struct definition to serial_setserial_unix.go for cross-arch clarity.
- Change IOMapBase type to uint for architecture-dependent binary compatibility with C's unsigned long.
- Refactor GetSerialStruct and SetSerialPortMode to be unixPort methods, removing device open/close logic.
- Add OS stubs for unsupported platforms (darwin, freebsd, openbsd) to return clear errors.
@gkuga gkuga merged commit 3f2cd1c into master Sep 7, 2025
2 checks passed
@gkuga gkuga deleted the chore/setserial branch September 7, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants