UART class of PicoRuby

Type aliases

unit_t

Symbol|String

Singleton methods

new

UART.new(
    unit: unit_t,
    ?txd_pin: Integer,
    ?rxd_pin: Integer,
    ?baudrate: Integer,
    ?data_bits: Integer,
    ?stop_bits: Integer,
    ?parity: Integer,
    ?flow_control: Integer,
    ?rts_pin: Integer,
    ?cts_pin: Integer,
    ?rx_buffer_size: Integer?
  ) -> instance

Instance methods

break

instance.break(?Integer|Float time) -> self

bytes_available

instance.bytes_available() -> Integer

clear_rx_buffer

instance.clear_rx_buffer() -> self

clear_tx_buffer

instance.clear_tx_buffer() -> self

flush

instance.flush() -> self

gets

instance.gets() -> String?

line_ending=

instance.line_ending=(("\n"|"\r\n"|"\r") line_ending) -> void

puts

instance.puts(String str) -> nil

read

instance.read(?Integer len) -> (String | nil)

readpartial

instance.readpartial(Integer maxlen) -> String

set_flow_control

instance.set_flow_control(Integer flow_control, Integer rts_pin, Integer cts_pin) -> void

set_format

instance.set_format(Integer data_bits, Integer stop_bits, Integer parity) -> void

setmode

instance.setmode(
    ?baudrate: Integer?,
    ?data_bits: Integer?,
    ?stop_bits: Integer?,
    ?parity: Integer?,
    ?flow_control: Integer?,
    ?rts_pin: Integer?,
    ?cts_pin: Integer?
  ) -> self

write

instance.write(String str) -> Integer

Attr accessors

baudrate (reader)

instance.baudrate -> Integer
Tags: class