/* param base Pointer to the FLEXIO_SPI_Type structure. param handle Pointer to the flexio_spi_slave_handle_t structure to store the transfer state. param callback The callback function. param userData The parameter of the callback function. retval kStatus_Success Successfully create the handle. retval kStatus_OutOfRange The FlexIO type/handle/ISR table out of range.  */
status_t FLEXIO_SPI_SlaveTransferCreateHandle(FLEXIO_SPI_Type *base, flexio_spi_slave_handle_t *handle, flexio_spi_slave_transfer_callback_t callback, void *userData)
/* param base Pointer to the FLEXIO_SPI_Type structure. param handle Pointer to the flexio_spi_slave_handle_t structure to store the transfer state. param callback The callback function. param userData The parameter of the callback function. retval kStatus_Success Successfully create the handle. retval kStatus_OutOfRange The FlexIO type/handle/ISR table out of range.  */
status_t FLEXIO_SPI_SlaveTransferCreateHandle(FLEXIO_SPI_Type *base, flexio_spi_slave_handle_t *handle, flexio_spi_slave_transfer_callback_t callback, void *userData)
{
    assert(handle != NULL);
    IRQn_Type flexio_irqs[] = FLEXIO_IRQS;
    (void)memset(handle, 0, sizeof(*handle));
    handle->callback = callback;
    handle->userData = userData;
    (void)EnableIRQ(flexio_irqs[FLEXIO_SPI_GetInstance(base)]);
    return FLEXIO_RegisterHandleIRQ(base, handle, FLEXIO_SPI_SlaveTransferHandleIRQ);
}