#define RTX_115K_BAUD 0x85
Type: Posts; User: rpinsky
#define RTX_115K_BAUD 0x85
Here is the code:
rtxSpaFd = open (RTX_SPA_DEVICE, O_RDWR | O_NOCTTY | O_NDELAY );
if (rtxSpaFd == -1)
{
cout << "Can't open device " << RTX_SPA_DEVICE << ", error = " <<...
The code is a couple of hundred lines long. But let me tell you what I am doing. I use an open command. Then I write six bytes to the serial port (the command is two bytes long and I send three...
Since read blocks, I can't read unless there is a way to look ahead to see if there are characters in the input buffer. I want to clear the buffer, then go into a blocking read.
There is some...
One other question. After doing a write, does the data go out immediately or is it buffered in linux? Normally I would use a fflush when I want to make sure data is sent immediately. Is there an...
Is there a routine that would clear the input buffer (i.e. read everything off and throw it away)? I want to clear the buffer, than I want my next call to read to block indefinitely until data is...
I read the man page on fcntl and I am not sure what "fcntl(fd, F_SETFL,0);" does.
Secondly, the device I am connected to does use hardware flow control in case my software gets behind in reading...
I have selected just the I/O statements that I think are relavent. I open the file, set the configuration, write a few bytes, then I read data and then write again. It is after I write again when...
I am opening a /dev/ttyUSB0 device using fopen using mode "w+". I need to both read and write from the device. I have set the port to raw mode (using tcgetattr, cfmakeraw, and tcsetattr). I use...