[−][src]Function mynewt::hw::hal::hal_spi_config
pub unsafe extern "C" fn hal_spi_config(
spi_num: c_int,
psettings: *mut hal_spi_settings
) -> c_int
Configure the spi. Must be called after the spi is initialized (after hal_spi_init is called) and when the spi is disabled (user must call hal_spi_disable if the spi has been enabled through hal_spi_enable prior to calling this function). Can also be used to reconfigure an initialized SPI (assuming it is disabled as described previously).
spi_num
: The number of the SPI to configure.psettings
: The settings to configure this SPI with
Return: int 0 on success, non-zero error code on failure.