Function riot_sys::spi_transfer_reg

source ·
pub unsafe extern "C" fn spi_transfer_reg(
    bus: spi_t,
    cs: spi_cs_t,
    reg: u8,
    out: u8
) -> u8
Expand description

@brief Transfer one byte 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 byte to send

@return value that was read from the given register address