[fpc-pascal] One experience with the unit serial
Henry Vermaak
henry.vermaak at gmail.com
Thu Nov 19 15:44:38 CET 2009
2009/11/19 Holger Bruns <holger.bruns at gmx.net>:
> Gustavo Enrique Jimenez schrieb:
>>
>> Despite queues an baud rates, you must expect data loss. You will
>> loss data in the physical layer. You have to implement some handshake
>> to prevent it. (using google translator, excuse my english).
>>
>>
>> Gustavo
>>
>>
>
> Which can be done through a direct port access and some lines of code in
> assembler language. The second idea I have is the use of the device files
> /dev/ttySx, but how can these files be used to get access to all of the
> registers of an uart?
No, you don't need direct port access, you can use tcsetattr(). See
man pages for termios and tty_ioctl (if you need to set the modem
lines explicitly).
Henry
More information about the fpc-pascal
mailing list