Atmel QTouch Library User Guide
Atmel QTouch Library User Guide Atmel QTouch Library User Guide
structure.p_qta_config touch_qt_config_t* Pointer to the QTouch Group A configurationstructure.p_qtb_config touch_qt_config_t* Pointer to the QTouch Group B configurationstructure.p_general_config touch_general_config_t* Pointer to the general configuration structure.touch_info_tstructureInput / OutputUsetouch_info_tOutput from the libraryPointer to this structure is passed as input to touch_qm_get_libinfo &touch_at_get_libinfo APIsFields Type Commentnum_channels_in_use uint8_t Number of channels in usenum_sensors_in_use uint8_t Number of sensors in usenum_rotors_sliders_in_use uint8_t Number of rotor/sliders in usemax_channels_per_rotor_slider uint8_t Maximum number of channels per rotor/sliderallowed by the libraryhw_version uint32_t CAT module hardware revision as per VERSIONregister in CAT module.fw_version uint16_t QTouch Library version with MSB indicating themajor version & LSB indicating the minor version.Public Functions of QTouch Library for UC3LThis section lists the public functions available in the QTouch libraries for AT32UC3L devices.QMatrix APIThis section lists the functions that are specific to QMatrix method of acquisition.touch_qm_sensors_inittouch_ret_t touch_qm_sensors_init (touch_config_t *p_touch_config)Arguments Type Commentp_touch_config touch_config_t* Pointer to Touch Library input configuration structure. Thetouch_qm_config_t and touch_general_config_t members ofthe Structure should be non-NULL.• This API initializes the Touch library for QMatrix method acquisition. This API has to becalled before calling any other QMatrix API.• Based on the input parameters, the CAT module is initialized with QMatrix method Pinand Register configuration.• The Analog comparators necessary for QMatrix operation are initialized by this API.• Both p_qm_config & p_general_config members of the input configuration structure mustpoint to valid configuration data.1548207K-AT42-09/11
• The General configuration data provided by the p_general_config pointer is common toboth QMatrix, QTouch Group A, QTouch Group B and Autonomous Touch sensors.touch_qm_sensor_configtouch_ret_t touch_qm_sensor_config(sensor_type_t sensor_type,channel_t from_channel,channel_t to_channel,aks_group_t aks_group,threshold_t detect_threshold,hysteresis_t detect_hysteresis,resolution_t position_resolution,uint8_t position_hysteresis,sensor_id_t *p_sensor_id)Arguments Type Commentsensor_type sensor_type_t Specifies sensor type – SENSOR_TYPE_KEY orSENSOR_TYPE_ROTOR orSENSOR_TYPE_SLIDER.The SENSOR_TYPE_UNASSIGNED enum is not a validinput to this API.from_channel channel_t Start channel of the Sensor (rotor, slider or key).to_channel channel_t End channel of the Sensor (rotor, slider or key). For a key,the start and end channels must be the same.aks_group aks_group_t AKS group of this sensor.detect_threshold threshold_t Touch Detect threshold level for Sensor.detect_hysteresis hysteresis_t Value for detection hysteresis.position_resolution resolution_t Position resolution when configuring rotor / sliderposition_hysteresis uint8_t Position hysteresis when configuring rotor / sliderp_sensor_id sensor_id_t* The Sensor ID is updated by the Touch Library uponsuccessful sensor configuration. The Sensor ID starts with0.• This API configures a single QMatrix Key, Rotor or Slider.• The user must provide all the sensor specific settings as input to this API.• Rotor / Slider sensor will occupy contiguous channels from from_channel to to_channel.• For QMatrix acquisition method, 3 to 8 Touch channels per rotor / slider are supported.Keys are always formed using 1 Touch channel.touch_qm_sensor_update_configtouch_ret_t touch_qm_sensor_update_config(sensor_id_t sensor_id,touch_qm_param_t *p_touch_sensor_param)Arguments Type Commentsensor_id sensor_id_t Sensor ID for which the configurationneeds to be updated.155
- Page 104 and 105: Figure 5-38: Selecting New Design3.
- Page 106 and 107: Figure 5-42: Start window of the co
- Page 108 and 109: Figure 5-45: Selecting the X,YA,YB,
- Page 110 and 111: The code can be copied using the
- Page 112 and 113: ApplicablereleaseQTouch libraries v
- Page 114 and 115: Device Specific LibrariesIntroducti
- Page 116 and 117: Table 8 Compiler tool chains suppor
- Page 118 and 119: maintains the States of QMatrix, QT
- Page 120 and 121: equired as shown in the case A of F
- Page 122 and 123: Figure 37 QMatrix method schematicQ
- Page 124 and 125: Figure 39 QMatrix API Flow diagram
- Page 126 and 127: CAT Module Pin NameCSA0CSB0CSA1CSB1
- Page 128 and 129: The QTouch method acquisition using
- Page 130 and 131: Host Application codeUsing the init
- Page 132 and 133: Frozen Stop Stop Run Run Run Run On
- Page 134 and 135: Figure 45 Raw acquisition mode API
- Page 136 and 137: Figure 46 GNU Example project usage
- Page 138 and 139: the QTouch Library as QMatrix data
- Page 140 and 141: TOUCH_STATUS_CHANGE 0x0002u Status
- Page 142 and 143: sensor_type_tEnumerationUsesensor_t
- Page 144 and 145: OUT_OF_TOUCHIN_TOUCHCurrently the a
- Page 146 and 147: num_channel_signals uint8_t Length
- Page 148 and 149: touch_at_statusstructureInput / Out
- Page 150 and 151: UseData structure which holds the R
- Page 152 and 153: variable to the Touch library. The
- Page 156 and 157: p_touch_sensor_param touch_qm_param
- Page 158 and 159: current_time_ms touch_time_t Curren
- Page 160 and 161: touch_ret_t touch_qt_sensor_config(
- Page 162 and 163: touch_qt_sensors_calibratetouch_ret
- Page 164 and 165: touch_qt_get_libinfotouch_ret_t tou
- Page 166 and 167: • This API updates the configurat
- Page 168 and 169: Rule Rule Description Advisory/Requ
- Page 170 and 171: VCCPA0No ConnectionPA1PA2ATtiny20PA
- Page 172 and 173: QTouch Library configuration parame
- Page 174 and 175: Recommended setting.Table 19 QTouch
- Page 176 and 177: Figure 51 Schematic overview of QTo
- Page 178 and 179: QTouch Library configuration parame
- Page 180 and 181: Devices supportedThe list of differ
- Page 182 and 183: • The channel number is derived f
- Page 184 and 185: MISRA Compliance ReportThis section
- Page 186 and 187: May 2010Ver 4.2July 2010Ver 4.3Jan
structure.p_qta_config touch_qt_config_t* Pointer to the <strong>QTouch</strong> Group A configurationstructure.p_qtb_config touch_qt_config_t* Pointer to the <strong>QTouch</strong> Group B configurationstructure.p_general_config touch_general_config_t* Pointer to the general configuration structure.touch_info_tstructureInput / OutputUsetouch_info_tOutput from the libraryPointer to this structure is passed as input to touch_qm_get_libinfo &touch_at_get_libinfo APIsFields Type Commentnum_channels_in_use uint8_t Number of channels in usenum_sensors_in_use uint8_t Number of sensors in usenum_rotors_sliders_in_use uint8_t Number of rotor/sliders in usemax_channels_per_rotor_slider uint8_t Maximum number of channels per rotor/sliderallowed by the libraryhw_version uint32_t CAT module hardware revision as per VERSIONregister in CAT module.fw_version uint16_t <strong>QTouch</strong> <strong>Library</strong> version with MSB indicating themajor version & LSB indicating the minor version.Public Functions of <strong>QTouch</strong> <strong>Library</strong> for UC3LThis section lists the public functions available in the <strong>QTouch</strong> libraries for AT32UC3L devices.QMatrix APIThis section lists the functions that are specific to QMatrix method of acquisition.touch_qm_sensors_inittouch_ret_t touch_qm_sensors_init (touch_config_t *p_touch_config)Arguments Type Commentp_touch_config touch_config_t* Pointer to Touch <strong>Library</strong> input configuration structure. Thetouch_qm_config_t and touch_general_config_t members ofthe Structure should be non-NULL.• This API initializes the Touch library for QMatrix method acquisition. This API has to becalled before calling any other QMatrix API.• Based on the input parameters, the CAT module is initialized with QMatrix method Pinand Register configuration.• The Analog comparators necessary for QMatrix operation are initialized by this API.• Both p_qm_config & p_general_config members of the input configuration structure mustpoint to valid configuration data.1548207K-AT42-09/11