/* param base TSI peripheral base address. param mask The status flags to clear.  */
void TSI_ClearStatusFlags(TSI_Type *base, uint32_t mask)
/* param base TSI peripheral base address. param mask The status flags to clear.  */
void TSI_ClearStatusFlags(TSI_Type *base, uint32_t mask)
{
    uint32_t regValue = base->DATA & (~ALL_FLAGS_MASK);
    if ((bool)(mask & (uint32_t)kTSI_EndOfScanFlag))
    {
        regValue |= TSI_DATA_EOSF_MASK;
    }
    if ((bool)(mask & (uint32_t)kTSI_OutOfRangeFlag))
    {
        regValue |= TSI_DATA_OUTRGF_MASK;
    }
    base->DATA = regValue;
}