stoping sending via serial port

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

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

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

“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 :frowning:
I’m afraid i don’t know other “straight” way to do this

Artem