jputcu / serialport

Cross platform haskell library for using the serial port
Other
43 stars 36 forks source link

Inter character delay #17

Closed hirschenberger closed 12 years ago

hirschenberger commented 12 years ago

Hey,

I have a hardware device (USB -> serial) which needs an inter-character delay of at least 1ms. I tried to simulate this with a char-by-char send with a delay in a mapM but it doesn't work as expected. Is it possible to specify a inter-character delay?

jputcu commented 12 years ago

Hello

My library doesn't provide a way to specify a inter-character delay, just because a mapM with a delay should do the trick. I suppose you did something like mapM (threadDelay 1000 << hPutChar h) "string"? Perhaps it has something to do with hardware flow?

hirschenberger commented 12 years ago

Hey, you are right, It was a wrong setting when trying all possibilities. It works with mapM. I'm closing this and thanks for this great lib.