/* Poll wait for the SLVPENDING flag. 
Wait for the pending status to be set (SLVPENDING = 1) by polling the STAT register. */
static uint32_t I2C_SlavePollPending(I2C_Type *base)
/* Poll wait for the SLVPENDING flag. 
Wait for the pending status to be set (SLVPENDING = 1) by polling the STAT register. */
static uint32_t I2C_SlavePollPending(I2C_Type *base)
{
    uint32_t stat;
    do
    {
        stat = base->STAT;
    } while (0u == (stat & I2C_STAT_SLVPENDING_MASK));
    return stat;
}