set_spi_decoder

Configure decoder on the given channel

Parameters

integer
Id of channel to configure decoder on
default: undefined
allowed values:1 to 2
integer
Bit index to send/receive data
default: undefined
allowed values:1 to 16
boolean required
Bit order for SPI
integer
Number of data bits
default: 8
allowed values:5 to 9
integer required
Bit index to send clock signal
allowed values:1 to 16
integer required
Sets the bit that tells the peripheral that it should wake up and receive / send data
allowed values:1 to 16
integer
Sets SPI Clock Polarity (1 for High and 0 for Low)
default: 0
allowed values:0 to 1
integer
Sets SPI Clock Phase (1 for trailing edge and 0 for leading edge)
default: 0
allowed values:0 to 1
boolean
Disable all implicit conversions and coercions.
default: true

# Examples

# Sample response,

{
  "clock_bit": 2, 
  "data_bit": 1, 
  "data_width": 8, 
  "lsb_first": false, 
  "protocol": "SPI", 
  "spi_cpha": 0, 
  "spi_cpol": 0, 
  "spi_cs": 3
}
1
2
3
4
5
6
7
8
9
10