/* param base The I3C peripheral base address. param handle Pointer to the I3C master driver handle. retval #kStatus_Success A transaction was successfully aborted. retval #kStatus_I3C_Idle There is not a non-blocking transaction currently in progress.  */
void I3C_MasterTransferAbort(I3C_Type *base, i3c_master_handle_t *handle)
/* param base The I3C peripheral base address. param handle Pointer to the I3C master driver handle. retval #kStatus_Success A transaction was successfully aborted. retval #kStatus_I3C_Idle There is not a non-blocking transaction currently in progress.  */
void I3C_MasterTransferAbort(I3C_Type *base, i3c_master_handle_t *handle)
{
    if (handle->state != (uint8_t)kIdleState)
    {
        I3C_MasterDisableInterrupts(base, (uint32_t)kMasterIrqFlags);
        base->MDATACTRL |= I3C_MDATACTRL_FLUSHTB_MASK | I3C_MDATACTRL_FLUSHFB_MASK;
        (void)I3C_MasterStop(base);
        handle->state = (uint8_t)kIdleState;
    }
}