Talk:Serial Programming/Serial Linux
Add topicAppearance
The termios simple example contains:
while (c!='q') {
if (read(tty_fd,&c,1)>0) write(STDOUT_FILENO,&c,1); // if new data is available on the serial port, print it out if (read(STDIN_FILENO,&c,1)>0) write(tty_fd,&c,1); // if new data is available on the console, send it to the serial port
}
This liveloop is terrible resource hog, but novices don't know this; nevertheless this get into many implementations.
- In termios example variable rdset looks unused; looks like "select" part of loop was forgotten
- Are you sure you want to explicitly set c_*flag to 0 after memsetting the whole structure?
Start a discussion about Serial Programming/Serial Linux
Talk pages are where people discuss how to make content on Wikibooks the best that it can be. You can use this page to start a discussion with others about how to improve Serial Programming/Serial Linux.