I'm currently working on a project that will read data from a micro-controller via serial communications.
As of right now, the program (on my computer), opens a /dev/tty*
file and is able to read/write to it. The micro-controller will send a packet of n
bytes at any time. I want to know if there is any way I can tell when all of the bytes have been written to the file?
I've been looking at the select()
and poll()
functions, but they seem to be only able to tell when a byte is ready, but not when every byte has been written.
Any help is appreciated. Thanks!