/* param base The I3C peripheral base address. param txBuff The pointer to the data to be transferred. param txSize The length in bytes of the data to be transferred. return Error or success status returned by API.  */
status_t I3C_SlaveSend(I3C_Type *base, const void *txBuff, size_t txSize)
/* param base The I3C peripheral base address. param txBuff The pointer to the data to be transferred. param txSize The length in bytes of the data to be transferred. return Error or success status returned by API.  */
status_t I3C_SlaveSend(I3C_Type *base, const void *txBuff, size_t txSize)
{
    const uint8_t *buf = (const uint8_t *)((const void *)txBuff);
    status_t result    = kStatus_Success;
    assert(NULL != txBuff);
    while (0UL != txSize--)
    {
        result = I3C_SlaveWaitForTxReady(base);
        if (kStatus_Success != result)
        {
            return result;
        }
        if (0UL != txSize)
        {
            base->SWDATAB = *buf++;
        }
        else
        {
            base->SWDATABE = *buf++;
        }
    }
    return result;
}