[−][src]Function mynewt::hw::hal::hal_spi_init
pub unsafe extern "C" fn hal_spi_init(
spi_num: c_int,
cfg: *mut c_void,
spi_type: u8
) -> c_int
Initialize the SPI, given by spi_num.
spi_num
: The number of the SPI to initializecfg
: HW/MCU specific configuration, passed to the underlying implementation, providing extra configuration.spi_type
: SPI type (master or slave)
Return: int 0 on success, non-zero error code on failure.