System.Hardware.Serialport.Posix
- data StopBits
- data Parity
- data FlowControl
- data SerialPort = SerialPort {}
- hOpenSerial :: String -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> IO Handle
- openSerial :: String -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> Int -> IO SerialPort
- recvChar :: SerialPort -> IO (Maybe Char)
- sendChar :: SerialPort -> Char -> IO ()
- closeSerial :: SerialPort -> IO ()
- setSerial :: String -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> IO ()
- withParity :: TerminalAttributes -> Parity -> TerminalAttributes
- withFlowControl :: TerminalAttributes -> FlowControl -> TerminalAttributes
- withStopBits :: TerminalAttributes -> StopBits -> TerminalAttributes
- configureSettings :: TerminalAttributes -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> TerminalAttributes
Documentation
data FlowControl Source
Constructors
| Software | |
| NoFlowControl |
data SerialPort Source
Constructors
| SerialPort | |
Arguments
| :: String | The filename of the serial port, such as |
| -> BaudRate | |
| -> Word8 | The number of bits per word, typically 8 |
| -> StopBits | Almost always |
| -> Parity | Error checking |
| -> FlowControl | |
| -> IO Handle |
Open and configure a serial port and return a Handle
Arguments
| :: String | The filename of the serial port, such as |
| -> BaudRate | |
| -> Word8 | The number of bits per word, typically 8 |
| -> StopBits | Almost always |
| -> Parity | |
| -> FlowControl | |
| -> Int | Receive timeout in milliseconds |
| -> IO SerialPort |
Open and configure a serial port
recvChar :: SerialPort -> IO (Maybe Char)Source
Possibly receive a character unless the timeout given in openSerial is exceeded.
closeSerial :: SerialPort -> IO ()Source
Close the serial port
configureSettings :: TerminalAttributes -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> TerminalAttributesSource