/* Config the ADC peripheral according to the specified parameters in the adcConfig.  */
void TSC_Config(TSC_Config_T *tscConfig)
/* Config the ADC peripheral according to the specified parameters in the adcConfig.  */
void TSC_Config(TSC_Config_T *tscConfig)
{
    TSC->CTRL_B.CTPHSEL   = tscConfig->CTPHSEL;
    TSC->CTRL_B.CTPLSEL   = tscConfig->CTPLSEL;
    TSC->CTRL_B.SSERRVSEL = tscConfig->SpreadSpectrumDev;
    TSC->CTRL_B.SSEN      = tscConfig->SpreadSpectrum;
    TSC->CTRL_B.SSCDFSEL  = tscConfig->SpreadSpectrumPre;
    TSC->CTRL_B.PGCDFSEL  = tscConfig->PulseGeneratorPre;
    TSC->CTRL_B.MCNTVSEL  = tscConfig->MCountValue;
    TSC->CTRL_B.IODEFCFG  = tscConfig->IOMode;
    TSC->CTRL_B.SYNPPOL   = tscConfig->SynchroPinPolarity;
    TSC->CTRL_B.AMCFG     = tscConfig->AcqMode;
    TSC->INTFCLR = 0x00000003;
    TSC->INTEN = tscConfig->Interrupts;
}