You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the code basically just differs at the point where setTerminalAttributes is called, like this:
openSerial device baudrate =do-- ....
setTerminalAttributes fd (makeRaw termOpts `withSpeed` baudrate) Immediately
closeFd fd
h <- openFile device ReadWriteMode
hSetBuffering h NoBuffering
hSetEcho h Falsereturn h
and where makeRaw is defined like this:
--| Disables all necessary flags for raw mode according to-- http://man7.org/linux/man-pages/man3/termios.3.htmlmakeRaw::TerminalAttributes->TerminalAttributes
makeRaw termOpts = termOpts
-- input flags`withoutMode`IgnoreBreak`withoutMode`InterruptOnBreak`withoutMode`MarkParityErrors`withoutMode`StripHighBit`withoutMode`MapLFtoCR`withoutMode`IgnoreCR`withoutMode`MapCRtoLF`withoutMode`StartStopOutput-- output flags`withoutMode`ProcessOutput-- local flags`withoutMode`EnableEcho`withoutMode`EchoLF`withoutMode`ProcessInput`withoutMode`KeyboardInterrupts`withoutMode`ExtendedFunctions-- control flags`withoutMode`TwoStopBits`withBits`8`withoutMode`EnableParity
What do you think about a patch on this lib that adds some kind of openSerialRaw call or adds a parameter to openSerial for raw mode yes/no?
The text was updated successfully, but these errors were encountered:
Hi @jmct,
in one project, we use a hard fork of this library where we enable "raw mode" (reference to raw mode in man page of termios).
the code basically just differs at the point where
setTerminalAttributes
is called, like this:and where
makeRaw
is defined like this:What do you think about a patch on this lib that adds some kind of
openSerialRaw
call or adds a parameter toopenSerial
for raw mode yes/no?The text was updated successfully, but these errors were encountered: