class

Quartz::Serial

Inherits Quartz::Transport < Reference < Object

Constants

DEFAULT_BAUD = LibC::SpeedT.new(LibC::B115200)
DEFAULT_PATH = "/dev/ttyACM0"

Constructors

new(path : String = DEFAULT_PATH, baud : LibC::SpeedT = DEFAULT_BAUD)
Source

Instance methods

close
Source
drain(duration : Time::Span = 400.milliseconds) : Bytes

Drain pending input within duration. Used to swallow CLI banner text after the start_rpc_session\r\n transition on real Flipper devices. Crystal's File uses nonblocking IO + evented scheduler, so termios VTIME is ignored; we use the scheduler's read_timeout instead.

Source
open
Source
path
Source
read(n : Int32) : Bytes
Source
write(bytes : Bytes) : Nil
Source