/** * @brief Initializes the TS interface. * @param bank Array holding all the banks * @retval Status */ TSL_Status_enum_T TSL_Init(CONST TSL_Bank_T *bank) { TSL_Status_enum_T retval; // Get banks array TSL_Globals.Bank_Array = bank; // Initialization of the timing module retval = TSL_tim_Init(); if (retval == TSL_STATUS_OK) { // Initialization of the acquisition module retval = TSL_acq_Init(); } return retval; }
/** * @brief Initializes the TS interface. * @param bank Array holding all the banks * @retval Status */ TSL_Status_enum_T TSL_Init(CONST TSL_Bank_T *bank) { TSL_Status_enum_T retval; // Get banks array TSL_Globals.Bank_Array = bank; // Initialize the delay that will be used to discharge the capacitors TSL_Globals.DelayDischarge = (uint32_t)((TSLPRM_DELAY_DISCHARGE_ALL * (uint32_t)(SystemCoreClock/1000000)) / 72); // Note: The timing configuration (Systick) must be done in the user code. // Initialization of the acquisition module #ifdef __TSL_ACQ_TSC_H // Note: The TSC peripheral initialization must be done in the user code. retval = TSL_STATUS_OK; #else retval = TSL_acq_Init(); #endif return retval; }