3.2.1 General APIs
The APIs defined in this sections are typically found in all Touch projects and applicable mostly for all devices.
void touch_init(void)
Description: Initializes various Touch library modules and other peripherals,
such as Timer. This routine must be called during the initialization phase,
typically before the main while(1) loop.
Parameters: None.
Return: None.
void touch_process(void)
Description: Monitors various flags used in the touch.c file
and calls touch libraries APIs accordingly. This routine is a scheduler for all
touch-related API calls; when the timer gives a periodic interrupt, it starts the
touch measurement. When the touch measurement is completed, post-processing APIs are
also called in this routine. This routine should be called as frequently as
possible. In a typical application, it can be called in the main
while(1) loop without any additional checks. In an RTOS-based
application, it can be called in a task which is executed at a shorter interval, or
when an interrupt occurs (either due to the timer or to the touch measurement
hardware—PTC, HCVD). Any delay in calling this routine can affect response time.
Parameters: None.
Return: None.
void qtm_measure_complete_callback(void)
Description: Callback function passed to the
qtm_ptc_start_measurement_seq() API. This routine will be
called when the touch measurement is completed. In this function, the
post-processing flag is set, which will be checked in
touch_process().
Parameters: None.
Return: None.
void touch_timer_config(void)
Description: Configures the timer (typically RTC) to give periodic interrupt to perform touch measurement.
Parameters: None.
Return: None.
void touch_timer_handler(void)
Description:Usually a callback function from the RTC Handler. This routine
sets the flag to start touch measurement, and is also responsible for calling
qtm_update_qtlib_timer() and
qtm_update_gesture_2d_timer(). Various other application level timings
(like low-power time-out) are also updated in this function.
Parameters: None.
Return: None.
