Arash Partow wrote:
>
> Hi all,
>
> I'm seeing a problem with ioctl and FIONREAD, I use the
> following code to check if there are any bytes in the
> input buffer of a comport.
> ie:
Check the return value of ioctl(), I bet it's returning error and
setting EINVAL. I think you want TIOCINQ inste
Hi all,
I'm seeing a problem with ioctl and FIONREAD, I use the
following code to check if there are any bytes in the
input buffer of a comport.
ie:
unsigned int SerialIO::getBufferSize()
{
int bufferedBytes = 0;
ioctl(IOPortHandle, FIONREAD, &bufferedBytes);
if (bufferedBytes == -1)
2 matches
Mail list logo