tcdrain takes too long (50ms instead of 1ms )

Hi

Why does tcdrain take more then 50ms for flushing 10 bytes @ 9600bds ?
Transmiiting 10 bytes @ 9600 bds only takes about 1 ms.

What causes the extra delay ?

Johan

Hi Johan,

looking at the source of the “devc-ser8250” this delay is a bug or an
implemented feature (I don’t know).
Be warned that “tcdrain()” in some cases never return: this is a bug.

Regards,
Maurizio

“Sagaert Johan” <sagaert.j@belgacom.net> ha scritto nel messaggio
news:cuocm2$e1d$3@inn.qnx.com

Hi

Why does tcdrain take more then 50ms for flushing 10 bytes @ 9600bds ?
Transmiiting 10 bytes @ 9600 bds only takes about 1 ms.

What causes the extra delay ?

Johan

Thanks for the info.

Is there an other way (ioctl ?) to cjeck if all data has been sent ?


“Maurizio Rossi” <mrossi@system-group.it> wrote in message
news:cupkfl$ael$1@inn.qnx.com

Hi Johan,

looking at the source of the “devc-ser8250” this delay is a bug or an
implemented feature (I don’t know).
Be warned that “tcdrain()” in some cases never return: this is a bug.

Regards,
Maurizio

“Sagaert Johan” <> sagaert.j@belgacom.net> > ha scritto nel messaggio
news:cuocm2$e1d$> 3@inn.qnx.com> …
Hi

Why does tcdrain take more then 50ms for flushing 10 bytes @ 9600bds ?
Transmiiting 10 bytes @ 9600 bds only takes about 1 ms.

What causes the extra delay ?

Johan
\

Hi Johan,

you can chek how many chars are in the output queue in this way:

int chars_in_tx_queue;

if (devctl(fd, DCMD_CHR_OSCHARS, &chars_in_tx_queue,
sizeof(chars_in_tx_queue),NULL) != E_OK)
{
// handle errors
}

Regards,
Maurizio


“Sagaert Johan” <sagaert.j@belgacom.net> ha scritto nel messaggio
news:cuqf0n$18a$1@inn.qnx.com

Thanks for the info.

Is there an other way (ioctl ?) to cjeck if all data has been sent ?


“Maurizio Rossi” <> mrossi@system-group.it> > wrote in message
news:cupkfl$ael$> 1@inn.qnx.com> …
Hi Johan,

looking at the source of the “devc-ser8250” this delay is a bug or an
implemented feature (I don’t know).
Be warned that “tcdrain()” in some cases never return: this is a bug.

Regards,
Maurizio

“Sagaert Johan” <> sagaert.j@belgacom.net> > ha scritto nel messaggio
news:cuocm2$e1d$> 3@inn.qnx.com> …
Hi

Why does tcdrain take more then 50ms for flushing 10 bytes @ 9600bds ?
Transmiiting 10 bytes @ 9600 bds only takes about 1 ms.

What causes the extra delay ?

Johan


\