pub unsafe extern "C" fn spi_init_cs(
bus: spi_t,
cs: spi_cs_t,
) -> c_int
Expand description
@brief Initialize the given chip select pin
The chip select can be any generic GPIO pin (e.g. GPIO_PIN(x,y)), or it can
be a hardware chip select line. The existence and number of hardware chip
select lines depends on the underlying platform and the actual pins used for
hardware chip select lines are defined in the board’s periph_conf.h
.
Define the used chip select line using the @ref SPI_HWCS(x) macro for
hardware chip select line x
or the GPIO_PIN(x,y) macro for using any
GPIO pin for manual chip select.
@param[in] bus SPI device that is used with the given CS line @param[in] cs chip select pin to initialize
@retval 0 success @retval -ENXIO invalid device @retval -EINVAL invalid CS pin/line