Microchip® Advanced Software Framework

avr32/applications/uc3l-ek-touch-demo/touch_api_at32uc3l.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include "touch_config_at32uc3l.h"

Data Structures

struct  tag_sensor_t
 
struct  tag_touch_at_config_t
 
struct  tag_touch_at_param_t
 
struct  tag_touch_at_pin_t
 
struct  tag_touch_at_reg_t
 
struct  tag_touch_at_status_t
 
struct  tag_touch_config_t
 
struct  tag_touch_filter_data_t
 
struct  tag_touch_general_config_t
 
struct  tag_touch_global_param_t
 
struct  tag_touch_info_t
 
struct  tag_touch_measure_data_t
 
struct  tag_touch_qm_config_t
 
struct  tag_touch_qm_dma_t
 
struct  tag_touch_qm_param_t
 
struct  tag_touch_qm_pin_t
 
struct  tag_touch_qm_reg_t
 
struct  tag_touch_qt_config_t
 
struct  tag_touch_qt_param_t
 
struct  tag_touch_qt_pin_t
 
struct  tag_touch_qt_reg_t
 

Macros

#define PRIV_QM_BURST_LENGTH_WRITE_COUNT   (((((QM_Y_PAIRS_SELECTED) >> 4u) & 0x0Fu) != 0u) + 1u)
 
#define PRIV_QM_DATA_BLK_SIZE
 
#define PRIV_QM_NUM_X_SENSE_PAIRS
 
#define PRIV_QM_PAD_BYTE_SIZE   (36u)
 
#define PRIV_QM_RS_TABLE_INIT   touch_qm_rs_table_init
 
#define PRIV_QM_SIZE_CHANNEL   (5u)
 
#define PRIV_QM_SIZE_RS   (11u)
 
#define PRIV_QM_SIZE_SENSOR   (8u)
 
#define PRIV_QM_X_SENSE_PAIR_MASK
 
#define PRIV_QT_RS_TABLE_INIT   NULL
 
#define QM_NUM_CHANNELS   (QM_NUM_X_LINES * QM_NUM_Y_LINES)
 
#define TOUCH_BURST_AGAIN   (0x0100u)
 
#define TOUCH_CHANNEL_REF_CHANGE   (0x0008u)
 
#define TOUCH_IN_DETECT   (0x0001u)
 
#define TOUCH_NO_ACTIVITY   (0x0000u)
 
#define touch_qm_sensors_init(x)   touch_qm_sensors_init_with_rs_table( (x) , PRIV_QM_RS_TABLE_INIT )
 
#define TOUCH_QT_GRP_A   (0u)
 
#define TOUCH_QT_GRP_B   (1u)
 
#define touch_qt_sensors_init(x, y)
 
#define TOUCH_RESOLVE_CAL   (0x0200u)
 
#define TOUCH_RESOLVE_DI   (0x0800u)
 
#define TOUCH_RESOLVE_FILTERIN   (0x0400u)
 
#define TOUCH_RESOLVE_POS_RECAL   (0x1000u)
 
#define TOUCH_ROTOR_SLIDER_POS_CHANGE   (0x0004u)
 
#define TOUCH_STATUS_CHANGE   (0x0002u)
 

Typedefs

typedef enum tag_aks_group_t aks_group_t
 
typedef enum tag_at_status_change_t at_status_change_t
 
typedef uint8_t channel_t
 
typedef enum
tag_general_pin_options_t 
general_pin_options_t
 
typedef enum tag_hysteresis_t hysteresis_t
 
typedef enum tag_qt_pin_options_t qt_pin_options_t
 
typedef enum tag_recal_threshold_t recal_threshold_t
 
typedef enum tag_resolution_t resolution_t
 
typedef uint8_t sensor_id_t
 
typedef struct tag_sensor_t sensor_t
 
typedef enum tag_sensor_type_t sensor_type_t
 
typedef uint8_t threshold_t
 
typedef enum tag_touch_acq_mode_t touch_acq_mode_t
 
typedef uint16_t touch_acq_status_t
 
typedef struct
tag_touch_at_config_t 
touch_at_config_t
 
typedef struct tag_touch_at_param_t touch_at_param_t
 
typedef struct tag_touch_at_pin_t touch_at_pin_t
 
typedef struct tag_touch_at_reg_t touch_at_reg_t
 
typedef struct
tag_touch_at_status_t 
touch_at_status
 
typedef uint8_t touch_bl_t
 
typedef struct tag_touch_config_t touch_config_t
 
typedef int16_t touch_delta_t
 
typedef struct
tag_touch_filter_data_t 
touch_filter_data_t
 
typedef struct
tag_touch_general_config_t 
touch_general_config_t
 
typedef struct
tag_touch_global_param_t 
touch_global_param_t
 
typedef struct tag_touch_info_t touch_info_t
 
typedef enum tag_touch_lib_state_t touch_lib_state_t
 
typedef struct
tag_touch_measure_data_t 
touch_measure_data_t
 
typedef struct
tag_touch_qm_config_t 
touch_qm_config_t
 
typedef struct tag_touch_qm_dma_t touch_qm_dma_t
 
typedef struct tag_touch_qm_param_t touch_qm_param_t
 
typedef struct tag_touch_qm_pin_t touch_qm_pin_t
 
typedef struct tag_touch_qm_reg_t touch_qm_reg_t
 
typedef struct
tag_touch_qt_config_t 
touch_qt_config_t
 
typedef uint8_t touch_qt_dma_t
 
typedef uint8_t touch_qt_grp_t
 
typedef struct tag_touch_qt_param_t touch_qt_param_t
 
typedef struct tag_touch_qt_pin_t touch_qt_pin_t
 
typedef struct tag_touch_qt_reg_t touch_qt_reg_t
 
typedef enum tag_touch_ret_t touch_ret_t
 
typedef uint16_t touch_time_t
 
typedef enum tag_x_pin_options_t x_pin_options_t
 
typedef enum tag_y_pin_options_t y_pin_options_t
 

Enumerations

enum  tag_aks_group_t {
  NO_AKS_GROUP,
  AKS_GROUP_1,
  AKS_GROUP_2,
  AKS_GROUP_3,
  AKS_GROUP_4,
  AKS_GROUP_5,
  AKS_GROUP_6,
  AKS_GROUP_7,
  MAX_AKS_GROUP,
  NO_AKS_GROUP,
  AKS_GROUP_1,
  AKS_GROUP_2,
  AKS_GROUP_3,
  AKS_GROUP_4,
  AKS_GROUP_5,
  AKS_GROUP_6,
  AKS_GROUP_7,
  MAX_AKS_GROUP
}
 
enum  tag_at_status_change_t {
  OUT_OF_TOUCH,
  IN_TOUCH,
  OUT_OF_TOUCH,
  IN_TOUCH
}
 
enum  tag_general_pin_options_t {
  USE_NO_PIN = 0u,
  USE_PIN_PA12_AS_SMP,
  USE_PIN_PA13_AS_SMP,
  USE_PIN_PA14_AS_SMP,
  USE_PIN_PA17_AS_SMP,
  USE_PIN_PA21_AS_SMP,
  USE_PIN_PA22_AS_SMP,
  USE_PIN_PA17_AS_DIS,
  USE_PIN_PB11_AS_VDIV,
  USE_PIN_PA15_AS_SYNC,
  USE_PIN_PA18_AS_SYNC,
  USE_PIN_PA19_AS_SYNC,
  USE_PIN_PB08_AS_SYNC,
  USE_PIN_PB12_AS_SYNC,
  USE_NO_PIN = 0u,
  USE_PIN_PA12_AS_SMP,
  USE_PIN_PA13_AS_SMP,
  USE_PIN_PA14_AS_SMP,
  USE_PIN_PA17_AS_SMP,
  USE_PIN_PA21_AS_SMP,
  USE_PIN_PA22_AS_SMP,
  USE_PIN_PA17_AS_DIS,
  USE_PIN_PB11_AS_VDIV,
  USE_PIN_PA15_AS_SYNC,
  USE_PIN_PA18_AS_SYNC,
  USE_PIN_PA19_AS_SYNC,
  USE_PIN_PB08_AS_SYNC,
  USE_PIN_PB12_AS_SYNC
}
 
enum  tag_hysteresis_t {
  HYST_50,
  HYST_25,
  HYST_12_5,
  HYST_6_25,
  MAX_HYST,
  HYST_50,
  HYST_25,
  HYST_12_5,
  HYST_6_25,
  MAX_HYST
}
 
enum  tag_qt_pin_options_t {
  SP0,
  SP1,
  SP2,
  SP3,
  SP4,
  SP5,
  SP6,
  SP7,
  SP8,
  SP9,
  SP10,
  SP11,
  SP12,
  SP13,
  SP14,
  SP15,
  SP16,
  SP0,
  SP1,
  SP2,
  SP3,
  SP4,
  SP5,
  SP6,
  SP7,
  SP8,
  SP9,
  SP10,
  SP11,
  SP12,
  SP13,
  SP14,
  SP15,
  SP16
}
 
enum  tag_recal_threshold_t {
  RECAL_100,
  RECAL_50,
  RECAL_25,
  RECAL_12_5,
  RECAL_6_25,
  MAX_RECAL,
  RECAL_100,
  RECAL_50,
  RECAL_25,
  RECAL_12_5,
  RECAL_6_25,
  MAX_RECAL
}
 
enum  tag_resolution_t {
  RES_1_BIT,
  RES_2_BIT,
  RES_3_BIT,
  RES_4_BIT,
  RES_5_BIT,
  RES_6_BIT,
  RES_7_BIT,
  RES_8_BIT,
  MAX_RES,
  RES_1_BIT,
  RES_2_BIT,
  RES_3_BIT,
  RES_4_BIT,
  RES_5_BIT,
  RES_6_BIT,
  RES_7_BIT,
  RES_8_BIT,
  MAX_RES
}
 
enum  tag_sensor_type_t {
  SENSOR_TYPE_UNASSIGNED,
  SENSOR_TYPE_KEY,
  SENSOR_TYPE_ROTOR,
  SENSOR_TYPE_SLIDER,
  MAX_SENSOR_TYPE,
  SENSOR_TYPE_UNASSIGNED,
  SENSOR_TYPE_KEY,
  SENSOR_TYPE_ROTOR,
  SENSOR_TYPE_SLIDER,
  MAX_SENSOR_TYPE
}
 
enum  tag_touch_acq_mode_t {
  RAW_ACQ_MODE,
  NORMAL_ACQ_MODE,
  RAW_ACQ_MODE,
  NORMAL_ACQ_MODE
}
 
enum  tag_touch_lib_state_t {
  TOUCH_STATE_NULL,
  TOUCH_STATE_INIT,
  TOUCH_STATE_READY,
  TOUCH_STATE_CALIBRATE,
  TOUCH_STATE_BUSY,
  TOUCH_STATE_NULL,
  TOUCH_STATE_INIT,
  TOUCH_STATE_READY,
  TOUCH_STATE_CALIBRATE,
  TOUCH_STATE_BUSY
}
 
enum  tag_touch_ret_t {
  TOUCH_SUCCESS,
  TOUCH_ACQ_INCOMPLETE,
  TOUCH_INVALID_INPUT_PARAM,
  TOUCH_INVALID_LIB_STATE,
  TOUCH_INVALID_QM_CONFIG_PARAM,
  TOUCH_INVALID_AT_CONFIG_PARAM,
  TOUCH_INVALID_QT_CONFIG_PARAM,
  TOUCH_INVALID_GENERAL_CONFIG_PARAM,
  TOUCH_INVALID_QM_NUM_X_LINES,
  TOUCH_INVALID_QM_NUM_Y_LINES,
  TOUCH_INVALID_QM_NUM_SENSORS,
  TOUCH_INVALID_MAXDEV_VALUE,
  TOUCH_INVALID_RECAL_THRESHOLD,
  TOUCH_INVALID_CHANNEL_NUM,
  TOUCH_INVALID_SENSOR_TYPE,
  TOUCH_INVALID_SENSOR_ID,
  TOUCH_INVALID_DMA_PARAM,
  TOUCH_FAILURE_ANALOG_COMP,
  TOUCH_INVALID_RS_NUM,
  TOUCH_SUCCESS,
  TOUCH_ACQ_INCOMPLETE,
  TOUCH_INVALID_INPUT_PARAM,
  TOUCH_INVALID_LIB_STATE,
  TOUCH_INVALID_QM_CONFIG_PARAM,
  TOUCH_INVALID_AT_CONFIG_PARAM,
  TOUCH_INVALID_QT_CONFIG_PARAM,
  TOUCH_INVALID_GENERAL_CONFIG_PARAM,
  TOUCH_INVALID_QM_NUM_X_LINES,
  TOUCH_INVALID_QM_NUM_Y_LINES,
  TOUCH_INVALID_QM_NUM_SENSORS,
  TOUCH_INVALID_MAXDEV_VALUE,
  TOUCH_INVALID_RECAL_THRESHOLD,
  TOUCH_INVALID_CHANNEL_NUM,
  TOUCH_INVALID_SENSOR_TYPE,
  TOUCH_INVALID_SENSOR_ID,
  TOUCH_INVALID_DMA_PARAM,
  TOUCH_FAILURE_ANALOG_COMP,
  TOUCH_INVALID_RS_NUM
}
 
enum  tag_x_pin_options_t {
  X0,
  X1,
  X2,
  X3,
  X4,
  X5,
  X6,
  X7,
  X8,
  X9,
  X10,
  X11,
  X12,
  X13,
  X14,
  X15,
  X16,
  X17,
  X0,
  X1,
  X2,
  X3,
  X4,
  X5,
  X6,
  X7,
  X8,
  X9,
  X10,
  X11,
  X12,
  X13,
  X14,
  X15,
  X16,
  X17
}
 
enum  tag_y_pin_options_t {
  Y0_YK0,
  Y1_YK1,
  Y2_YK2,
  Y3_YK3,
  Y4_YK4,
  Y5_YK5,
  Y6_YK6,
  Y7_YK7,
  Y0_YK0,
  Y1_YK1,
  Y2_YK2,
  Y3_YK3,
  Y4_YK4,
  Y5_YK5,
  Y6_YK6,
  Y7_YK7
}
 

Functions

touch_ret_t touch_at_get_libinfo (touch_info_t *p_touch_info)
 
touch_ret_t touch_at_sensor_disable (void)
 
touch_ret_t touch_at_sensor_enable (void(*touch_at_status_change_interrupt_callback)(touch_at_status *p_at_status))
 
touch_ret_t touch_at_sensor_get_config (touch_at_param_t *p_at_param)
 
touch_ret_t touch_at_sensor_init (touch_config_t *p_touch_config)
 
touch_ret_t touch_at_sensor_update_config (touch_at_param_t *p_at_param)
 
void touch_deinit (void)
 
void touch_event_dispatcher (void)
 
touch_ret_t touch_qm_channel_update_burstlen (channel_t channel_id, touch_bl_t qm_burst_length)
 
touch_ret_t touch_qm_get_global_param (touch_global_param_t *p_global_param)
 
touch_ret_t touch_qm_get_libinfo (touch_info_t *p_touch_info)
 
void touch_qm_rs_table_init (void)
 
touch_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)
 
touch_ret_t touch_qm_sensor_get_config (sensor_id_t sensor_id, touch_qm_param_t *p_touch_sensor_param)
 
touch_ret_t touch_qm_sensor_get_delta (sensor_id_t sensor_id, touch_delta_t *p_delta)
 
touch_ret_t touch_qm_sensor_update_config (sensor_id_t sensor_id, touch_qm_param_t *p_touch_sensor_param)
 
touch_ret_t touch_qm_sensors_calibrate (void)
 
touch_ret_t touch_qm_sensors_init_with_rs_table (touch_config_t *p_touch_config, void(*rs_table_init)(void))
 
touch_ret_t touch_qm_sensors_start_acquisition (touch_time_t current_time_ms, touch_qm_dma_t *p_qm_dma, touch_acq_mode_t qm_acq_mode, void(*measure_complete_callback)(touch_measure_data_t *p_measure_data))
 
touch_ret_t touch_qm_update_global_param (touch_global_param_t *p_global_param)
 
touch_ret_t touch_qt_get_global_param (touch_qt_grp_t touch_qt_grp, touch_global_param_t *p_global_param)
 
touch_ret_t touch_qt_get_libinfo (touch_qt_grp_t touch_qt_grp, touch_info_t *p_touch_info)
 
void touch_qt_rs_table_init (void)
 
touch_ret_t touch_qt_sensor_config (touch_qt_grp_t touch_qt_grp, 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, sensor_id_t *p_sensor_id)
 
touch_ret_t touch_qt_sensor_disable (touch_qt_grp_t touch_qt_grp, sensor_id_t sensor_id)
 
touch_ret_t touch_qt_sensor_get_config (touch_qt_grp_t touch_qt_grp, sensor_id_t sensor_id, touch_qt_param_t *p_touch_sensor_param)
 
touch_ret_t touch_qt_sensor_get_delta (touch_qt_grp_t touch_qt_grp, sensor_id_t sensor_id, touch_delta_t *p_delta)
 
touch_ret_t touch_qt_sensor_reenable (touch_qt_grp_t touch_qt_grp, sensor_id_t sensor_id)
 
touch_ret_t touch_qt_sensor_update_config (touch_qt_grp_t touch_qt_grp, sensor_id_t sensor_id, touch_qt_param_t *p_touch_sensor_param)
 
touch_ret_t touch_qt_sensors_calibrate (touch_qt_grp_t touch_qt_grp)
 
touch_ret_t touch_qt_sensors_init_with_rs_table (touch_qt_grp_t touch_qt_grp, touch_config_t *p_touch_config, void(*rs_table_init)(void), void(*touch_qt_table_init)(void))
 
touch_ret_t touch_qt_sensors_start_acquisition (touch_qt_grp_t touch_qt_grp, touch_time_t current_time_ms, touch_qt_dma_t qt_dma_ch, touch_acq_mode_t qt_acq_mode, void(*measure_complete_callback)(touch_measure_data_t *p_measure_data))
 
touch_ret_t touch_qt_update_global_param (touch_qt_grp_t touch_qt_grp, touch_global_param_t *p_global_param)
 
void touch_qta_table_init (void)
 
void touch_qtb_table_init (void)
 

#define PRIV_QM_BURST_LENGTH_WRITE_COUNT   (((((QM_Y_PAIRS_SELECTED) >> 4u) & 0x0Fu) != 0u) + 1u)
#define PRIV_QM_DATA_BLK_SIZE
Value:
((QM_NUM_CHANNELS+ 7u) / 8u) + (PRIV_QM_PAD_BYTE_SIZE))
#define QM_NUM_ROTORS_SLIDERS
QMatrix number of Rotors and Sliders.
Definition: avr32/applications/uc3-l0_xplained-demo/touch_config_at32uc3l.h:183
#define PRIV_QM_BURST_LENGTH_WRITE_COUNT
Definition: avr32/applications/uc3l-ek-touch-demo/touch_api_at32uc3l.h:143
#define QM_NUM_CHANNELS
Definition: avr32/applications/uc3l-ek-touch-demo/touch_api_at32uc3l.h:101
#define QM_NUM_SENSORS
QMatrix number of Sensors.
Definition: avr32/applications/uc3-l0_xplained-demo/touch_config_at32uc3l.h:174
#define PRIV_QM_NUM_X_SENSE_PAIRS
Definition: avr32/applications/uc3l-ek-touch-demo/touch_api_at32uc3l.h:132
#define PRIV_QM_SIZE_RS
Definition: avr32/applications/uc3l-ek-touch-demo/touch_api_at32uc3l.h:122
#define PRIV_QM_PAD_BYTE_SIZE
Definition: avr32/applications/uc3l-ek-touch-demo/touch_api_at32uc3l.h:125
#define PRIV_QM_SIZE_CHANNEL
Definition: avr32/applications/uc3l-ek-touch-demo/touch_api_at32uc3l.h:119
#define PRIV_QM_SIZE_SENSOR
Definition: avr32/applications/uc3l-ek-touch-demo/touch_api_at32uc3l.h:116
#define PRIV_QM_NUM_X_SENSE_PAIRS
Value:
((((PRIV_QM_X_SENSE_PAIR_MASK) >> 1u) & 0x00000001u) + \
(((PRIV_QM_X_SENSE_PAIR_MASK) >> 3u) & 0x00000001u) + \
(((PRIV_QM_X_SENSE_PAIR_MASK) >> 5u) & 0x00000001u) + \
(((PRIV_QM_X_SENSE_PAIR_MASK) >> 7u) & 0x00000001u) + \
(((PRIV_QM_X_SENSE_PAIR_MASK) >> 9u) & 0x00000001u) + \
(((PRIV_QM_X_SENSE_PAIR_MASK) >> 11u) & 0x00000001u) + \
(((PRIV_QM_X_SENSE_PAIR_MASK) >> 13u) & 0x00000001u) + \
(((PRIV_QM_X_SENSE_PAIR_MASK) >> 15u) & 0x00000001u) + \
(((PRIV_QM_X_SENSE_PAIR_MASK) >> 17u) & 0x00000001u))
#define PRIV_QM_X_SENSE_PAIR_MASK
Definition: avr32/applications/uc3l-ek-touch-demo/touch_api_at32uc3l.h:128
#define PRIV_QM_PAD_BYTE_SIZE   (36u)
#define PRIV_QM_RS_TABLE_INIT   touch_qm_rs_table_init
#define PRIV_QM_SIZE_CHANNEL   (5u)
#define PRIV_QM_SIZE_RS   (11u)
#define PRIV_QM_SIZE_SENSOR   (8u)
#define PRIV_QM_X_SENSE_PAIR_MASK
Value:
((((QM_X_PINS_SELECTED) & 0x00015555u) << 1u ) | \
((QM_X_PINS_SELECTED) & 0x0002AAAAu))
#define QM_X_PINS_SELECTED
QMatrix X Pins selected.
Definition: avr32/applications/uc3-l0_xplained-demo/touch_config_at32uc3l.h:199
#define PRIV_QT_RS_TABLE_INIT   NULL
#define QM_NUM_CHANNELS   (QM_NUM_X_LINES * QM_NUM_Y_LINES)
#define TOUCH_BURST_AGAIN   (0x0100u)
#define TOUCH_CHANNEL_REF_CHANGE   (0x0008u)

Referenced by QDebug_SendData().

#define TOUCH_IN_DETECT   (0x0001u)
#define TOUCH_NO_ACTIVITY   (0x0000u)

Referenced by main().

#define touch_qm_sensors_init (   x)    touch_qm_sensors_init_with_rs_table( (x) , PRIV_QM_RS_TABLE_INIT )

Referenced by init_touch(), and main().

#define TOUCH_QT_GRP_A   (0u)
#define TOUCH_QT_GRP_B   (1u)
#define touch_qt_sensors_init (   x,
 
)
Value:
((x) == TOUCH_QT_GRP_A)? \
touch_ret_t touch_qt_sensors_init_with_rs_table(touch_qt_grp_t touch_qt_grp, touch_config_t *p_touch_config, void(*rs_table_init)(void), void(*touch_qt_table_init)(void))
#define PRIV_QT_RS_TABLE_INIT
Definition: avr32/applications/uc3l-ek-touch-demo/touch_api_at32uc3l.h:269
#define TOUCH_QT_GRP_A
Definition: avr32/applications/uc3l-ek-touch-demo/touch_api_at32uc3l.h:83
void touch_qta_table_init(void)
void touch_qtb_table_init(void)

Referenced by main().

#define TOUCH_RESOLVE_CAL   (0x0200u)
#define TOUCH_RESOLVE_DI   (0x0800u)
#define TOUCH_RESOLVE_FILTERIN   (0x0400u)
#define TOUCH_RESOLVE_POS_RECAL   (0x1000u)
#define TOUCH_ROTOR_SLIDER_POS_CHANGE   (0x0004u)
#define TOUCH_STATUS_CHANGE   (0x0002u)

typedef uint8_t channel_t
typedef uint8_t sensor_id_t
typedef struct tag_sensor_t sensor_t
typedef uint8_t threshold_t
typedef uint16_t touch_acq_status_t
typedef uint8_t touch_bl_t
typedef int16_t touch_delta_t
typedef uint8_t touch_qt_dma_t
typedef uint8_t touch_qt_grp_t
typedef uint16_t touch_time_t

Enumerator
NO_AKS_GROUP 
AKS_GROUP_1 
AKS_GROUP_2 
AKS_GROUP_3 
AKS_GROUP_4 
AKS_GROUP_5 
AKS_GROUP_6 
AKS_GROUP_7 
MAX_AKS_GROUP 
NO_AKS_GROUP 
AKS_GROUP_1 
AKS_GROUP_2 
AKS_GROUP_3 
AKS_GROUP_4 
AKS_GROUP_5 
AKS_GROUP_6 
AKS_GROUP_7 
MAX_AKS_GROUP 
Enumerator
OUT_OF_TOUCH 
IN_TOUCH 
OUT_OF_TOUCH 

Autonomous Touch Status has changed to Out of Touch.

IN_TOUCH 

Autonomous Touch Status has changed to In Touch.

Enumerator
USE_NO_PIN 
USE_PIN_PA12_AS_SMP 
USE_PIN_PA13_AS_SMP 
USE_PIN_PA14_AS_SMP 
USE_PIN_PA17_AS_SMP 
USE_PIN_PA21_AS_SMP 
USE_PIN_PA22_AS_SMP 
USE_PIN_PA17_AS_DIS 
USE_PIN_PB11_AS_VDIV 
USE_PIN_PA15_AS_SYNC 
USE_PIN_PA18_AS_SYNC 
USE_PIN_PA19_AS_SYNC 
USE_PIN_PB08_AS_SYNC 
USE_PIN_PB12_AS_SYNC 
USE_NO_PIN 
USE_PIN_PA12_AS_SMP 
USE_PIN_PA13_AS_SMP 
USE_PIN_PA14_AS_SMP 
USE_PIN_PA17_AS_SMP 
USE_PIN_PA21_AS_SMP 
USE_PIN_PA22_AS_SMP 
USE_PIN_PA17_AS_DIS 
USE_PIN_PB11_AS_VDIV 
USE_PIN_PA15_AS_SYNC 
USE_PIN_PA18_AS_SYNC 
USE_PIN_PA19_AS_SYNC 
USE_PIN_PB08_AS_SYNC 
USE_PIN_PB12_AS_SYNC 
Enumerator
HYST_50 
HYST_25 
HYST_12_5 
HYST_6_25 
MAX_HYST 
HYST_50 
HYST_25 
HYST_12_5 
HYST_6_25 
MAX_HYST 
Enumerator
SP0 
SP1 
SP2 
SP3 
SP4 
SP5 
SP6 
SP7 
SP8 
SP9 
SP10 
SP11 
SP12 
SP13 
SP14 
SP15 
SP16 
SP0 
SP1 
SP2 
SP3 
SP4 
SP5 
SP6 
SP7 
SP8 
SP9 
SP10 
SP11 
SP12 
SP13 
SP14 
SP15 
SP16 
Enumerator
RECAL_100 
RECAL_50 
RECAL_25 
RECAL_12_5 
RECAL_6_25 
MAX_RECAL 
RECAL_100 
RECAL_50 
RECAL_25 
RECAL_12_5 
RECAL_6_25 
MAX_RECAL 
Enumerator
RES_1_BIT 
RES_2_BIT 
RES_3_BIT 
RES_4_BIT 
RES_5_BIT 
RES_6_BIT 
RES_7_BIT 
RES_8_BIT 
MAX_RES 
RES_1_BIT 
RES_2_BIT 
RES_3_BIT 
RES_4_BIT 
RES_5_BIT 
RES_6_BIT 
RES_7_BIT 
RES_8_BIT 
MAX_RES 
Enumerator
SENSOR_TYPE_UNASSIGNED 
SENSOR_TYPE_KEY 
SENSOR_TYPE_ROTOR 
SENSOR_TYPE_SLIDER 
MAX_SENSOR_TYPE 
SENSOR_TYPE_UNASSIGNED 
SENSOR_TYPE_KEY 
SENSOR_TYPE_ROTOR 
SENSOR_TYPE_SLIDER 
MAX_SENSOR_TYPE 
Enumerator
RAW_ACQ_MODE 
NORMAL_ACQ_MODE 
RAW_ACQ_MODE 

When Raw acquisition mode is used, the measure_complete_callback

function is called immediately once a fresh value of Signals are

available. In this mode, the Touch Library does not do any

processing on the Signals. So, the References, Sensor states or

Rotor/Slider position values are not updated in this mode.

NORMAL_ACQ_MODE 

When Nomal acquisition mode is used, the measure_complete_callback

function is called only after the Touch Library completes processing

of the Signal values obtained. The References, Sensor states and

Rotor/Slider position values are updated in this mode.

Enumerator
TOUCH_STATE_NULL 
TOUCH_STATE_INIT 
TOUCH_STATE_READY 
TOUCH_STATE_CALIBRATE 
TOUCH_STATE_BUSY 
TOUCH_STATE_NULL 
TOUCH_STATE_INIT 
TOUCH_STATE_READY 
TOUCH_STATE_CALIBRATE 
TOUCH_STATE_BUSY 
Enumerator
TOUCH_SUCCESS 
TOUCH_ACQ_INCOMPLETE 
TOUCH_INVALID_INPUT_PARAM 
TOUCH_INVALID_LIB_STATE 
TOUCH_INVALID_QM_CONFIG_PARAM 
TOUCH_INVALID_AT_CONFIG_PARAM 
TOUCH_INVALID_QT_CONFIG_PARAM 
TOUCH_INVALID_GENERAL_CONFIG_PARAM 
TOUCH_INVALID_QM_NUM_X_LINES 
TOUCH_INVALID_QM_NUM_Y_LINES 
TOUCH_INVALID_QM_NUM_SENSORS 
TOUCH_INVALID_MAXDEV_VALUE 
TOUCH_INVALID_RECAL_THRESHOLD 
TOUCH_INVALID_CHANNEL_NUM 
TOUCH_INVALID_SENSOR_TYPE 
TOUCH_INVALID_SENSOR_ID 
TOUCH_INVALID_DMA_PARAM 
TOUCH_FAILURE_ANALOG_COMP 
TOUCH_INVALID_RS_NUM 
TOUCH_SUCCESS 

Successful completion of operation.

TOUCH_ACQ_INCOMPLETE 

Touch Library is busy with pending previous Touch measurement.

TOUCH_INVALID_INPUT_PARAM 

Invalid input parameter.

TOUCH_INVALID_LIB_STATE 

Operation not allowed in the current Touch Library state.

TOUCH_INVALID_QM_CONFIG_PARAM 

Invalid QMatrix config input parameter.

TOUCH_INVALID_AT_CONFIG_PARAM 

Invalid Autonomous Touch config input parameter.

TOUCH_INVALID_QT_CONFIG_PARAM 

Invalid QTouch config input parameter.

TOUCH_INVALID_GENERAL_CONFIG_PARAM 

Invalid General config input parameter.

TOUCH_INVALID_QM_NUM_X_LINES 

Mismatch between number of X lines specified as QM_NUM_X_LINES

and number of X lines enabled in QMatrix pin configuration

touch_qm_pin_t x_lines.

TOUCH_INVALID_QM_NUM_Y_LINES 

Mismatch between number of Y lines specified as QM_NUM_Y_LINES

and number of Y lines enabled in QMatrix pin configuration

touch_qm_pin_t y_yk_lines.

TOUCH_INVALID_QM_NUM_SENSORS 

Number of Sensors specified is greater than

(Number of X Lines * Number of Y Lines)

TOUCH_INVALID_MAXDEV_VALUE 

Spread spectrum MAXDEV value should not exceed (2*DIV + 1).

TOUCH_INVALID_RECAL_THRESHOLD 

Invalid Recalibration threshold input value.

TOUCH_INVALID_CHANNEL_NUM 

Channel number parameter exceeded total number of channels configured.

TOUCH_INVALID_SENSOR_TYPE 

Invalid sensor type. Sensor type can NOT be SENSOR_TYPE_UNASSIGNED.

TOUCH_INVALID_SENSOR_ID 

Invalid Sensor number parameter.

TOUCH_INVALID_DMA_PARAM 

DMA Channel numbers are out of range.

TOUCH_FAILURE_ANALOG_COMP 

Analog comparator configuration error. Analog comparator output is not ready.

or Analog comparator has been Enabled before calling the QTouch Library.

TOUCH_INVALID_RS_NUM 

Number of Rotor/Sliders set as 0,

when trying to configure a rotor/slider.

Enumerator
X0 
X1 
X2 
X3 
X4 
X5 
X6 
X7 
X8 
X9 
X10 
X11 
X12 
X13 
X14 
X15 
X16 
X17 
X0 
X1 
X2 
X3 
X4 
X5 
X6 
X7 
X8 

Note: X8 pin must NOT be used as X Line and it is recommended to be used as ACREFN pin for QMatrix.

X9 
X10 
X11 
X12 
X13 
X14 
X15 
X16 
X17 
Enumerator
Y0_YK0 
Y1_YK1 
Y2_YK2 
Y3_YK3 
Y4_YK4 
Y5_YK5 
Y6_YK6 
Y7_YK7 
Y0_YK0 
Y1_YK1 
Y2_YK2 
Y3_YK3 
Y4_YK4 
Y5_YK5 
Y6_YK6 
Y7_YK7 

touch_ret_t touch_at_get_libinfo ( touch_info_t p_touch_info)
touch_ret_t touch_at_sensor_disable ( void  )
touch_ret_t touch_at_sensor_enable ( void(*)(touch_at_status *p_at_status)  touch_at_status_change_interrupt_callback)

Referenced by init_touch(), and touch_api_init().

touch_ret_t touch_at_sensor_get_config ( touch_at_param_t p_at_param)
touch_ret_t touch_at_sensor_init ( touch_config_t p_touch_config)

Referenced by init_touch(), and touch_api_init().

touch_ret_t touch_at_sensor_update_config ( touch_at_param_t p_at_param)
void touch_deinit ( void  )
void touch_event_dispatcher ( void  )

Referenced by main(), and touch_handler().

touch_ret_t touch_qm_channel_update_burstlen ( channel_t  channel_id,
touch_bl_t  qm_burst_length 
)
touch_ret_t touch_qm_get_global_param ( touch_global_param_t p_global_param)
touch_ret_t touch_qm_get_libinfo ( touch_info_t p_touch_info)
void touch_qm_rs_table_init ( void  )
touch_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 
)
touch_ret_t touch_qm_sensor_get_config ( sensor_id_t  sensor_id,
touch_qm_param_t p_touch_sensor_param 
)
touch_ret_t touch_qm_sensor_get_delta ( sensor_id_t  sensor_id,
touch_delta_t p_delta 
)
touch_ret_t touch_qm_sensor_update_config ( sensor_id_t  sensor_id,
touch_qm_param_t p_touch_sensor_param 
)
touch_ret_t touch_qm_sensors_calibrate ( void  )

Referenced by init_touch(), and main().

touch_ret_t touch_qm_sensors_init_with_rs_table ( touch_config_t p_touch_config,
void(*)(void)  rs_table_init 
)
touch_ret_t touch_qm_sensors_start_acquisition ( touch_time_t  current_time_ms,
touch_qm_dma_t p_qm_dma,
touch_acq_mode_t  qm_acq_mode,
void(*)(touch_measure_data_t *p_measure_data)  measure_complete_callback 
)

Referenced by main(), and touch_handler().

touch_ret_t touch_qm_update_global_param ( touch_global_param_t p_global_param)
touch_ret_t touch_qt_get_global_param ( touch_qt_grp_t  touch_qt_grp,
touch_global_param_t p_global_param 
)
touch_ret_t touch_qt_get_libinfo ( touch_qt_grp_t  touch_qt_grp,
touch_info_t p_touch_info 
)
void touch_qt_rs_table_init ( void  )
touch_ret_t touch_qt_sensor_config ( touch_qt_grp_t  touch_qt_grp,
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,
sensor_id_t p_sensor_id 
)
touch_ret_t touch_qt_sensor_disable ( touch_qt_grp_t  touch_qt_grp,
sensor_id_t  sensor_id 
)
touch_ret_t touch_qt_sensor_get_config ( touch_qt_grp_t  touch_qt_grp,
sensor_id_t  sensor_id,
touch_qt_param_t p_touch_sensor_param 
)
touch_ret_t touch_qt_sensor_get_delta ( touch_qt_grp_t  touch_qt_grp,
sensor_id_t  sensor_id,
touch_delta_t p_delta 
)
touch_ret_t touch_qt_sensor_reenable ( touch_qt_grp_t  touch_qt_grp,
sensor_id_t  sensor_id 
)
touch_ret_t touch_qt_sensor_update_config ( touch_qt_grp_t  touch_qt_grp,
sensor_id_t  sensor_id,
touch_qt_param_t p_touch_sensor_param 
)
touch_ret_t touch_qt_sensors_calibrate ( touch_qt_grp_t  touch_qt_grp)

Referenced by main().

touch_ret_t touch_qt_sensors_init_with_rs_table ( touch_qt_grp_t  touch_qt_grp,
touch_config_t p_touch_config,
void(*)(void)  rs_table_init,
void(*)(void)  touch_qt_table_init 
)
touch_ret_t touch_qt_sensors_start_acquisition ( touch_qt_grp_t  touch_qt_grp,
touch_time_t  current_time_ms,
touch_qt_dma_t  qt_dma_ch,
touch_acq_mode_t  qt_acq_mode,
void(*)(touch_measure_data_t *p_measure_data)  measure_complete_callback 
)

Referenced by main().

touch_ret_t touch_qt_update_global_param ( touch_qt_grp_t  touch_qt_grp,
touch_global_param_t p_global_param 
)
void touch_qta_table_init ( void  )
void touch_qtb_table_init ( void  )