stoping sending via serial port

bridged with qdn.public.devtools
Post Reply
tom

stoping sending via serial port

Post by tom » Mon Feb 24, 2003 11:34 am

I writing program to comunikate via serial port and sometimes I need
stop transmision. I trying use function tcflow(pointer,TCOOFF), but this
don't want work, still sending. Trying use tcflow(pointer,TCOOFFHW) but
the same result. What I have do to stop transmision?

Thanks

Artem Smolenkov

Re: stoping sending via serial port

Post by Artem Smolenkov » Tue Feb 25, 2003 4:32 pm

tcflush(fd, TCOFLUSH); ??

"tom" <tomasz.walenczak@radmor.com.pl> ???????/???????? ? ????????
?????????: news:b3cv4p$qmv$1@inn.qnx.com...
I writing program to comunikate via serial port and sometimes I need
stop transmision. I trying use function tcflow(pointer,TCOOFF), but this
don't want work, still sending. Trying use tcflow(pointer,TCOOFFHW) but
the same result. What I have do to stop transmision?

Thanks

tom

Re: stoping sending via serial port

Post by tom » Wed Feb 26, 2003 8:44 am

Artem Smolenkov wrote:
tcflush(fd, TCOFLUSH); ??
tcflush stoping transmision but I lost all unsended data in serial's
buffer. I need something what stop transmision but not lost data.

--
Thank you
Tom

Artem Smolenkov

Re: stoping sending via serial port

Post by Artem Smolenkov » Wed Feb 26, 2003 12:49 pm

"tom" <tomasz.walenczak@radmor.com.pl>
tcflush stoping transmision but I lost all unsended data in serial's
buffer. I need something what stop transmision but not lost data.
Yes, i missed that point
I've took a look at devc ddk source
----- io_devctl.c: -----
// Need to code this
case DCMD_CHR_TCFLOW:
if(status = job(ctp, dev, 0, SIGTTOU)) {
return status;
}
return(ENOTSUP);
break;
----------------------
So (as i can understand) tcflow() is not working at all, just check some
job control things
This source is old enough, though. You can check return value of tcflow(),
if it is ENOTSUP then nothing changed yet :-(
I'm afraid i don't know other "straight" way to do this

Artem

Post Reply

Return to “qdn.public.devtools”