/***************************************************************************//** * @brief Measure the capacitance of each element within the Sensor * * This function selects the appropriate HAL to perform the capacitance * measurement based upon the halDefinition found in the sensor * structure. * The order of the elements within the Sensor structure is arbitrary * but must be consistent between the application and configuration. * The first element in the array (counts) corresponds to the first * element within the Sensor structure. * @param groupOfElements Pointer to Sensor structure to be measured * @param counts Address to where the measurements are to be written * @return none ******************************************************************************/ void TI_CAPT_Raw(const struct Sensor *groupOfElements, uint16_t *counts) { #ifdef RO_PINOSC_TA0_WDTp if (groupOfElements->halDefinition == RO_PINOSC_TA0_WDTp) { TI_CTS_RO_PINOSC_TA0_WDTp_HAL(groupOfElements, counts); } #endif }
/***************************************************************************//** * @brief Measure the capacitance of each element within the Sensor * * This function selects the appropriate HAL to perform the capacitance * measurement based upon the halDefinition found in the sensor * structure. * * The order of the elements within the Sensor structure is arbitrary * but must be consistent between the application and configuration. * The first element in the array (counts) corresponds to the first * element within the Sensor structure. * @param groupOfElements Pointer to Sensor structure to be measured * @param counts Address to where the measurements are to be written * @return none ******************************************************************************/ void TI_CAPT_Raw(const struct Sensor* groupOfElements, uint16_t * counts) { #ifdef RO_COMPAp_TA0_WDTp if(groupOfElements->halDefinition == RO_COMPAp_TA0_WDTp) { TI_CTS_RO_COMPAp_TA0_WDTp_HAL(groupOfElements, counts); } #endif #ifdef fRO_COMPAp_TA0_SW if(groupOfElements->halDefinition == fRO_COMPAp_TA0_SW) { TI_CTS_fRO_COMPAp_TA0_SW_HAL(groupOfElements, counts); } #endif #ifdef fRO_COMPAp_SW_TA0 if(groupOfElements->halDefinition == fRO_COMPAp_SW_TA0) { TI_CTS_fRO_COMPAp_SW_TA0_HAL(groupOfElements, counts); } #endif #ifdef RO_COMPAp_TA1_WDTp if(groupOfElements->halDefinition == RO_COMPAp_TA1_WDTp) { TI_CTS_RO_COMPAp_TA1_WDTp_HAL(groupOfElements, counts); } #endif #ifdef fRO_COMPAp_TA1_SW if(groupOfElements->halDefinition == fRO_COMPAp_TA1_SW) { TI_CTS_fRO_COMPAp_TA1_SW_HAL(groupOfElements, counts); } #endif #ifdef RC_PAIR_TA0 if(groupOfElements->halDefinition == RC_PAIR_TA0) { TI_CTS_RC_PAIR_TA0_HAL(groupOfElements, counts); // Measure all sensors } #endif #ifdef RO_PINOSC_TA0_WDTp if(groupOfElements->halDefinition == RO_PINOSC_TA0_WDTp) { TI_CTS_RO_PINOSC_TA0_WDTp_HAL(groupOfElements, counts); } #endif #ifdef RO_PINOSC_TA0 if(groupOfElements->halDefinition == RO_PINOSC_TA0) { TI_CTS_RO_PINOSC_TA0_HAL(groupOfElements, counts); } #endif #ifdef fRO_PINOSC_TA0_SW if(groupOfElements->halDefinition == fRO_PINOSC_TA0_SW) { TI_CTS_fRO_PINOSC_TA0_SW_HAL(groupOfElements, counts); // Measure all sensors } #endif #ifdef RO_COMPB_TA0_WDTA if(groupOfElements->halDefinition == RO_COMPB_TA0_WDTA) { TI_CTS_RO_COMPB_TA0_WDTA_HAL(groupOfElements, counts); } #endif #ifdef fRO_COMPB_TA0_SW if(groupOfElements->halDefinition == fRO_COMPB_TA0_SW) { TI_CTS_fRO_COMPB_TA0_SW_HAL(groupOfElements, counts); } #endif #ifdef RO_COMPB_TA1_WDTA if(groupOfElements->halDefinition == RO_COMPB_TA1_WDTA) { TI_CTS_RO_COMPB_TA1_WDTA_HAL(groupOfElements, counts); } #endif #ifdef fRO_COMPB_TA1_SW if(groupOfElements->halDefinition == fRO_COMPB_TA1_SW) { TI_CTS_fRO_COMPB_TA1_SW_HAL(groupOfElements, counts); } #endif }