Function soapysdr_sys::SoapySDRDevice_transactSPI
source · pub unsafe extern "C" fn SoapySDRDevice_transactSPI(
device: *mut SoapySDRDevice,
addr: c_int,
data: c_uint,
numBits: usize
) -> c_uint
Expand description
Perform a SPI transaction and return the result. Its up to the implementation to set the clock rate, and read edge, and the write edge of the SPI core. SPI slaves without a readback pin will return 0.
If the device contains multiple SPI masters, the address bits can encode which master.
\param device a pointer to a device instance \param addr an address of an available SPI slave \param data the SPI data, numBits-1 is first out \param numBits the number of bits to clock out \return the readback data, numBits-1 is first in