serialport 0.1.0 → 0.1.0.1
raw patch · 4 files changed
+11/−9 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- System.Hardware.Serialport: hOpenSerial :: String -> BaudRate -> Int -> StopBits -> Parity -> FlowControl -> IO Handle
+ System.Hardware.Serialport: hOpenSerial :: String -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> IO Handle
- System.Hardware.Serialport: openSerial :: String -> BaudRate -> Int -> StopBits -> Parity -> FlowControl -> IO SerialPort
+ System.Hardware.Serialport: openSerial :: String -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> IO SerialPort
- System.Hardware.Serialport.Posix: configureSettings :: TerminalAttributes -> BaudRate -> Int -> StopBits -> Parity -> FlowControl -> TerminalAttributes
+ System.Hardware.Serialport.Posix: configureSettings :: TerminalAttributes -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> TerminalAttributes
- System.Hardware.Serialport.Posix: hOpenSerial :: String -> BaudRate -> Int -> StopBits -> Parity -> FlowControl -> IO Handle
+ System.Hardware.Serialport.Posix: hOpenSerial :: String -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> IO Handle
- System.Hardware.Serialport.Posix: openSerial :: String -> BaudRate -> Int -> StopBits -> Parity -> FlowControl -> IO SerialPort
+ System.Hardware.Serialport.Posix: openSerial :: String -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> IO SerialPort
- System.Hardware.Serialport.Posix: setSerial :: String -> BaudRate -> Int -> StopBits -> Parity -> FlowControl -> IO ()
+ System.Hardware.Serialport.Posix: setSerial :: String -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> IO ()
Files
- System/Hardware/Serialport/Posix.hs +6/−5
- System/Hardware/Serialport/Windows.hs +3/−2
- System/Win32/Comm.hsc +1/−1
- serialport.cabal +1/−1
System/Hardware/Serialport/Posix.hs view
@@ -4,6 +4,7 @@ import System.IO import System.Posix.Terminal import System.Posix.IO+import Data.Word data StopBits = One | Two@@ -20,7 +21,7 @@ -} hOpenSerial :: String -- ^ The filename of the serial port, such as @/dev/ttyS0@ or @/dev/ttyUSB0@ -> BaudRate - -> Int -- ^ The number of bits per word, typically 8+ -> Word8 -- ^ The number of bits per word, typically 8 -> StopBits -- ^ Almost always @One@ unless you're talking to a printer -> Parity -- ^ Error checking -> FlowControl@@ -35,7 +36,7 @@ openSerial :: String -- ^ The filename of the serial port, such as @/dev/ttyS0@ -> BaudRate - -> Int -- ^ The number of bits per word, typically 8+ -> Word8 -- ^ The number of bits per word, typically 8 -> StopBits -- ^ Almost always @One@ unless you're talking to a printer -> Parity -> FlowControl@@ -48,7 +49,7 @@ setSerial :: String -> BaudRate - -> Int + -> Word8 -> StopBits -> Parity -> FlowControl@@ -87,11 +88,11 @@ withStopBits termOpts Two = termOpts `withMode` TwoStopBits -configureSettings :: TerminalAttributes -> BaudRate -> Int -> StopBits -> Parity -> FlowControl -> TerminalAttributes+configureSettings :: TerminalAttributes -> BaudRate -> Word8 -> StopBits -> Parity -> FlowControl -> TerminalAttributes configureSettings termOpts baud bPerB stopBits parity flow = termOpts `withInputSpeed` baud `withOutputSpeed` baud- `withBits` bPerB+ `withBits` (fromIntegral bPerB :: Int) `withStopBits` stopBits `withParity` parity `withFlowControl` flow
System/Hardware/Serialport/Windows.hs view
@@ -4,6 +4,7 @@ import System.Win32.File import System.Win32.Types import Data.Bits+import Data.Word import Control.Concurrent import System.Win32.Comm import Foreign.Marshal.Alloc@@ -18,7 +19,7 @@ openSerial :: String -- ^ The filename of the serial port, such as @COM5@ or @//./CNCA0@ -> BaudRate- -> Int+ -> Word8 -> StopBits -> Parity -> FlowControl@@ -38,7 +39,7 @@ setSerial :: HANDLE -> BaudRate - -> Int + -> Word8 -> StopBits -> Parity -> FlowControl
System/Win32/Comm.hsc view
@@ -77,7 +77,7 @@ parity :: Parity, stopBits :: StopBits, flowControl :: FlowControl,- byteSize :: Int+ byteSize :: Word8 } deriving Show
serialport.cabal view
@@ -1,5 +1,5 @@ Name: serialport-Version: 0.1.0+Version: 0.1.0.1 Cabal-Version: >= 1.2 Build-Type: Simple license: BSD3