Skip to content

Adding Flush() to flush serial port I/O buffers#22

Merged
tarm merged 3 commits into
tarm:masterfrom
madhurjain:master
Mar 17, 2015
Merged

Adding Flush() to flush serial port I/O buffers#22
tarm merged 3 commits into
tarm:masterfrom
madhurjain:master

Conversation

@madhurjain

Copy link
Copy Markdown
Contributor
  • Current implementation will flush both Input and Output buffers
  • Added Flush to Windows calling PurgeComm()
  • Added Flush to POSIX calling tcflush()
  • Added Flush to Linux using syscall IOCTL with TCFLSH
  • Tested on Windows, POSIX and Linux environment

- Current implementation will flush both Input and Output buffers
- Added Flush to Windows calling PurgeComm()
- Added Flush to POSIX calling tcflush()
- Added Flush to Linux using syscall IOCTL with TCFLSH
- Tested on Windows, POSIX and Linux environment
Comment thread serial_linux.go Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use p.f.Fd() here? Right now it seems like Port would have redundant information with both File and fd.

@tarm

tarm commented Mar 14, 2015

Copy link
Copy Markdown
Owner

Overall it looks good. It would be great to get some godoc comments about Flush() as well. I think the linux version is what godoc would grab.

http://godoc.org/github.com/tarm/serial

- Removed reduntant File Descriptor field stored in Port structure
  for Linux and POSIX implementations
tarm added a commit that referenced this pull request Mar 17, 2015
Adding Flush() to flush serial port I/O buffers
@tarm tarm merged commit e3f4c97 into tarm:master Mar 17, 2015
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