riot_sys

Function spi_transfer_regs

Source
pub unsafe extern "C" fn spi_transfer_regs(
    bus: spi_t,
    cs: spi_cs_t,
    reg: u8,
    out: *const c_void,
    in_: *mut c_void,
    len: size_t,
)
Expand description

@brief Transfer a number of bytes to/from a given register address

This function is a shortcut function for easier handling of SPI devices that implement a register based access scheme.

@param[in] bus SPI device to use @param[in] cs chip select pin/line to use, set to SPI_CS_UNDEF if chip select should not be handled by the SPI driver @param[in] reg register address to transfer data to/from @param[in] out buffer to send data from, set NULL if only receiving @param[out] in buffer to read into, set NULL if only sending @param[in] len number of bytes to transfer