Module Rpi.Serial

module Serial: sig .. end
Serial connection.

Serial gives access to a serial connection using the Pi's UART0 peripheral.



val init : unit -> unit
init () initializes the serial connection.


val read_byte : unit -> int
read_byte () blocks until a byte becomes available on the serial connection.
val try_read_byte : unit -> int option
try_read_byte () is Some b a byte could be read from the serial connection and None otherwise.


val write_byte : int -> unit
write_byte b writes the byte b on the serial connection.
val write : string -> unit
write s writes s on the serial connection.
val writef : ('a, Format.formatter, unit) Pervasives.format -> 'a
writef fmt ... write a string formatted according to fmt on the serial connection.