Mail Archives: djgpp/1999/08/12/16:46:09
On Wed, 11 Aug 1999, Simon Redwood wrote:
> as I am writing a peice of code to basically put some binary data down the
> serial port. My problem comes when
> the bios times out because of flowcontrol.
What flow control? Could you please explain what problems do you see,
what kind of flow control do you think is at work here, and why?
> Under unix this is easily
> resolved, as I can just set the line to CLOCAL with an ioctl setting.
Unlike on Unix, the BIOS doesn't implement any dialup capabilities and
doesn't assume it is talking to a modem. So I don't think CLOCAL would
help you here, since there's no Unix-style device driver to talk to.
> This
> does seem to work under DOS to well, unless its the way I am doing it.
The docs for the ioctl function clearly states that only the DOS IOCTL
function are implemented. So CLOCAL is not going to work with DJGPP,
don't try that.
> _bios_serialcom(_COM_INIT, 0, _COM_9600|_COM_NOPARITY|_COM_STOP1|_COM_CHR8);
>
> ...
> for(i=0;i<...;i++)
> _bios_serialcom(_COM_SEND, 0, data[i]);
This seems like a good plan. What exactly doesn't work, and why?
- Raw text -