Function openthread_sys::otPlatSpiSlaveEnable
source ยท pub unsafe extern "C" fn otPlatSpiSlaveEnable(
aCompleteCallback: otPlatSpiSlaveTransactionCompleteCallback,
aProcessCallback: otPlatSpiSlaveTransactionProcessCallback,
aContext: *mut c_void,
) -> otError
Expand description
Initialize the SPI slave interface.
Note that SPI slave is not fully ready until a transaction is prepared using otPlatSPISlavePrepareTransaction()
.
If otPlatSPISlavePrepareTransaction() is not called before the master begins a transaction, the resulting SPI transaction will send all
0xFF` bytes and discard all received bytes.
@param[in] aCompleteCallback Pointer to transaction complete callback. @param[in] aProcessCallback Pointer to process callback. @param[in] aContext Context pointer to be passed to callbacks.
@retval OT_ERROR_NONE Successfully enabled the SPI Slave interface. @retval OT_ERROR_ALREADY SPI Slave interface is already enabled. @retval OT_ERROR_FAILED Failed to enable the SPI Slave interface.