Software Driven Shield Application Programming Interfaces (APIs)
DO_NOT_REMOVE
The Application Programming Interfaces (APIs) defined in this section are applicable only for devices that support the software driven shield option.
drivenshield_configure
Description: The drivenshield_configure function initializes all driven shield-related APIs required by the touch library. It configures additional peripherals like Direct Memory Access (DMA), Event System (EVSYS), Timer/Counter (TC)/Timer/Counter for Control Applications (TCC) as required.
Parameters: None
Return: None
drivenshield_start
Description: This function is called by the touch library before starting the dummy measurement. Here, EVSYS is configured to map a Peripheral Touch Controller (PTC) End Of Conversion (EOC) event to start DMA transfer and a DMA transfer complete event to start PTC measurement. Timer’s count, period and compare channel registers are configured based on the current channel’s Charge Share Delay (CSD), prescaler and acquisition frequency. The EVENT generated from the dummy measurement will start a DMA conversion (to configure proper oversampling to PTC) and when the DMA transfer is completed, PTC measurement is started using EVSYS. For some devices, Filter Level registers are 32-bit.
Parameters:
| Type | Description. |
|---|---|
| uint8_t | Current Channel’s CSD Value |
| uint8_t | Indicates current acquisition frequency |
| uint8_t | Current Channel’s Prescaler Value |
| uint8_t volatile * | Address of PTC’s Filter Level Register. For some devices Filter Level registers are 32-bit |
| uint8_t | Filter Level value that needs to be written. For some devices Filter Level values are 32-bit |
Return: None
drivenshield_port_mux_config
Description: This reconfigures the pin to the timer or PTC (depends on the mux value).
Parameters:
| Type | Description |
|---|---|
| uint8_t | Pin Details |
| uint8_t | Mux Value |
Return: None
drivenshield_stop
Description: This disables driven shield by disabling the timer peripheral.
Parameters: None
Return: None