[erlang-questions] pseudoterminal port process
Anthony Ramine
n.oxyde@REDACTED
Sat Oct 12 14:05:05 CEST 2013
Have you ever thought about making your uart:uart() type a #file_descriptor{} as defined in file.hrl? That would allow users to call file functions on a uart handle:
https://github.com/erlang/otp/blob/maint/lib/kernel/src/file.erl#L492-493
Regards,
Le 12 oct. 2013 à 02:23, Tony Rogvall <tony@REDACTED> a écrit :
> Not exactly sure what you want to do but ...
> have a look at https://github.com/tonyrog/uart, it has got some support for pseduo terminals,
> use "//pty" as the device name in uart:open, and then get the name of the selected slave
> device by calling uart:getopts(Uart, [device])
>
> There is an option {ptypkt, boolean()} that can be used to turn on pty packet mode (TIOCPKT)
> this is handy for pseudo terminal flow control handling. Because of a little bug, this option
> can not be given when opening the device but must be set with uart:setopts (there is a fix on its way)
>
> /Tony
More information about the erlang-questions
mailing list