SPI class of PicoRuby
Type aliases
spi_first_bit_t
0|1
spi_mode_t
0|1|2|3
Singleton methods
new
SPI.new(
unit: Symbol,
?frequency: Integer,
?sck_pin: Integer,
?cipo_pin: Integer,
?copi_pin: Integer,
?cs_pin: Integer,
?mode: spi_mode_t,
?first_bit: spi_first_bit_t
) -> instance
Instance methods
cipo_pin
instance.cipo_pin() -> Integer
copi_pin
instance.copi_pin() -> Integer
cs_pin
instance.cs_pin() -> Integer
deselect
instance.deselect() -> void
params_to_array
instance.params_to_array(*(Integer|String)|Array[Integer] params) -> Array[Integer]
read
instance.read(Integer len, ?Integer repeated_tx_data) -> String
sck_pin
instance.sck_pin() -> Integer
select
instance.select() ?{ (SPI) -> untyped } -> untyped
transfer
instance.transfer(*(Integer|String)|Array[Integer] outputs, ?additional_read_bytes: Integer) -> String
write
instance.write(*(Integer|String)|Array[Integer] outputs) -> Integer
Attr accessors
unit (reader)
instance.unit -> String