This file contains the QDebug public API that can be used to transfer data from a Touch Device to QTouch Studio using the QT600 USB Bridge.
Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.
#include "touch_api_at32uc3l.h"
Functions | |
Public functions. | |
void | QDebug_Init (void) |
This API initializes QDebug interface, including the low level hardware interface (SPI, TWI, USART etc). More... | |
void | QDebug_ProcessCommands (void) |
Command handler for the data received from QTouch Studio. More... | |
void | QDebug_SendData (uint16_t qt_lib_flags) |
Send data to QTouch Studio based on the subscription. More... | |
void | QDebug_SetSubscriptions (uint16_t once, uint16_t change, uint16_t allways) |
Set subscription values. More... | |
Private functions. | |
void | Set_Global_Config (void) |
Extract the data packet from QTouch Studio and set global config. More... | |
void | Set_Channel_Config (void) |
Extract the data packet from QTouch Studio and set channel config. More... | |
void | Set_Subscriptions (void) |
Set Data Subscription values. More... | |
void | Set_Measurement_Period (void) |
Extract the data packet from QTouch Studio and set measurement period. More... | |
void | Set_QM_Burst_Lengths (void) |
Extract the data packet from QTouch Studio and set QMatrix burst lengths. More... | |
void | Set_QT_User_Data (uint8_t *pdata) |
Extracts user data from QTouch Studio to touch mcu memory. More... | |
void | Transmit_Dummy (void) |
Transmits a dummy packet if no other subscriptions are set. More... | |
void | Transmit_Sign_On (void) |
Transmits the sign on packet to QTouch Studio. More... | |
void | Transmit_Global_Config (void) |
Transmits the global config struct to QTouch Studio. More... | |
void | Transmit_Sensor_Config (void) |
Transmits the channel config struct to QTouch Studio. More... | |
void | Transmit_Signals (void) |
Transmits the measurement values for each channel to QTouch Studio. More... | |
void | Transmit_Ref (void) |
Transmits the channel reference values to QTouch Studio. More... | |
void | Transmit_Delta (void) |
Transmits the channel delta values to QTouch Studio. More... | |
void | Transmit_State (void) |
Transmits the state values to QTouch Studio. More... | |
void | Transmit_Burst_Lengths (void) |
Transmits the QMatrix burst length values to QTouch Studio. More... | |
void | Transmit_Time_Stamps (void) |
Transmits the application execution timestamp values to QTouch Studio. More... | |
void | Transmit_QT_User_Data (uint8_t *pdata, uint16_t c) |
Transmits user data to QTouch Studio. More... | |
Variables | |
touch_measure_data_t * | p_qm_measure_data |
touch_measure_data_t * | p_qta_measure_data |
touch_measure_data_t * | p_qtb_measure_data |
#define QDEBUG_GET_GLOBAL_PARAM_FUNC touch_at_sensor_get_config |
Referenced by Set_Global_Config(), Transmit_Global_Config(), and Transmit_Sensor_Config().
#define QDEBUG_GET_LIBINFO_FUNC touch_at_get_libinfo |
Referenced by QDebug_Init().
#define QDEBUG_GET_SENSOR_CONFIG_FUNC touch_at_sensor_get_config |
Referenced by Set_Channel_Config().
#define QDEBUG_LIBINFO at_libinfo |
Referenced by QDebug_Init(), and Transmit_Sign_On().
#define QDEBUG_NUM_CHANNELS (1u) |
Referenced by Transmit_Ref(), Transmit_Sign_On(), Transmit_Signals(), and Transmit_State().
#define QDEBUG_NUM_ROTORS_SLIDERS (0u) |
Referenced by Transmit_State().
#define QDEBUG_NUM_SENSOR_STATE_BYTES (1u) |
Referenced by Transmit_State().
#define QDEBUG_NUM_SENSORS (1u) |
Referenced by Transmit_Delta(), and Transmit_Sensor_Config().
#define QDEBUG_REFERENCES_PTR ((volatile uint16_t *)(0xFFFF686Eu)) |
Referenced by Transmit_Delta(), and Transmit_Ref().
#define QDEBUG_SIGNALS_PTR ((volatile uint16_t *)(0xFFFF6872u)) |
Referenced by Transmit_Delta(), and Transmit_Signals().
#define QDEBUG_UPDATE_GLOBAL_PARAM_FUNC touch_at_sensor_update_config |
Referenced by Set_Global_Config().
#define QDEBUG_UPDATE_SENSOR_CONFIG_FUNC touch_at_sensor_update_config |
Referenced by Set_Channel_Config().
#define QT_CMD_DUMMY 0x10 |
Referenced by QDebug_ProcessCommands().
#define QT_CMD_SET_CH_CONFIG 0x13 |
Referenced by QDebug_ProcessCommands().
#define QT_CMD_SET_GLOBAL_CONFIG 0x12 |
Referenced by QDebug_ProcessCommands().
#define QT_CMD_SET_MEASUREMENT_PERIOD 0x14 |
#define QT_CMD_SET_QM_BURST_LENGTHS 0x15 |
Referenced by QDebug_ProcessCommands().
#define QT_CMD_SET_SUBS 0x11 |
Referenced by QDebug_ProcessCommands().
#define QT_DELTAS 0x26 |
Referenced by Transmit_Delta().
#define QT_DUMMY 0x20 |
Referenced by Transmit_Dummy().
#define QT_GLOBAL_CONFIG 0x22 |
Referenced by Transmit_Global_Config().
#define QT_REFERENCES 0x25 |
Referenced by Transmit_Ref().
#define QT_SENSOR_CONFIG 0x23 |
Referenced by Transmit_Sensor_Config().
#define QT_SIGN_ON 0x21 |
Referenced by Transmit_Sign_On().
#define QT_SIGNALS 0x24 |
Referenced by Transmit_Signals().
#define QT_STATES 0x27 |
Referenced by Transmit_State().
#define SUBS_DELTA 5 |
Referenced by QDebug_SendData().
#define SUBS_GLOBAL_CONFIG 1 |
Referenced by QDebug_SendData().
#define SUBS_REF 4 |
Referenced by QDebug_SendData().
#define SUBS_SENSOR_CONFIG 2 |
Referenced by QDebug_SendData().
#define SUBS_SIGN_ON 0 |
Referenced by QDebug_SendData().
#define SUBS_SIGNALS 3 |
Referenced by QDebug_SendData().
#define SUBS_STATES 6 |
Referenced by QDebug_SendData().
void QDebug_Init | ( | void | ) |
This API initializes QDebug interface, including the low level hardware interface (SPI, TWI, USART etc).
References QDEBUG_GET_LIBINFO_FUNC, QDEBUG_LIBINFO, SPI_Master_Init(), and TOUCH_SUCCESS.
Referenced by main().
void QDebug_ProcessCommands | ( | void | ) |
Command handler for the data received from QTouch Studio.
References QT_CMD_DUMMY, QT_CMD_SET_CH_CONFIG, QT_CMD_SET_GLOBAL_CONFIG, QT_CMD_SET_QM_BURST_LENGTHS, QT_CMD_SET_SUBS, Set_Channel_Config(), Set_Global_Config(), Set_Measurement_Period(), Set_QM_Burst_Lengths(), and Set_Subscriptions().
Referenced by main().
void QDebug_SendData | ( | uint16_t | qt_lib_flags | ) |
Send data to QTouch Studio based on the subscription.
qt_lib_flags:Change | flag from measure_sensors. |
References delivery, qgLibraryChanges, qgSubsAllways, qgSubsChange, qgSubsOnce, SUBS_DELTA, SUBS_GLOBAL_CONFIG, SUBS_REF, SUBS_SENSOR_CONFIG, SUBS_SIGN_ON, SUBS_SIGNALS, SUBS_STATES, TOUCH_CHANNEL_REF_CHANGE, TOUCH_ROTOR_SLIDER_POS_CHANGE, TOUCH_STATUS_CHANGE, Transmit_Delta(), transmit_dummy, Transmit_Dummy(), Transmit_Global_Config(), Transmit_Ref(), Transmit_Sensor_Config(), Transmit_Sign_On(), Transmit_Signals(), and Transmit_State().
Referenced by main().
void QDebug_SetSubscriptions | ( | uint16_t | once, |
uint16_t | change, | ||
uint16_t | allways | ||
) |
Set subscription values.
References qgSubsAllways, qgSubsChange, and qgSubsOnce.
Referenced by Set_Subscriptions().
void Set_Channel_Config | ( | void | ) |
Extract the data packet from QTouch Studio and set channel config.
References tag_touch_qt_param_t::aks_group, tag_touch_qt_param_t::detect_hysteresis, tag_touch_qt_param_t::detect_threshold, QDEBUG_GET_SENSOR_CONFIG_FUNC, QDEBUG_UPDATE_SENSOR_CONFIG_FUNC, tag_touch_at_param_t::sense, TOUCH_SUCCESS, and UNUSED.
Referenced by QDebug_ProcessCommands().
void Set_Global_Config | ( | void | ) |
Extract the data packet from QTouch Studio and set global config.
References tag_touch_global_param_t::di, tag_touch_global_param_t::drift_hold_time, tag_touch_at_param_t::filter, tag_touch_global_param_t::max_on_duration, tag_touch_at_param_t::ndrift, tag_touch_global_param_t::neg_drift_rate, tag_touch_at_param_t::pdrift, tag_touch_global_param_t::pos_drift_rate, tag_touch_global_param_t::pos_recal_delay, tag_touch_at_param_t::pthr, QDEBUG_GET_GLOBAL_PARAM_FUNC, QDEBUG_UPDATE_GLOBAL_PARAM_FUNC, tag_touch_global_param_t::recal_threshold, TOUCH_SUCCESS, and UNUSED.
Referenced by QDebug_ProcessCommands().
void Set_Measurement_Period | ( | void | ) |
Extract the data packet from QTouch Studio and set measurement period.
References measurement_period_ms, and UNUSED.
Referenced by QDebug_ProcessCommands().
void Set_QM_Burst_Lengths | ( | void | ) |
Extract the data packet from QTouch Studio and set QMatrix burst lengths.
Referenced by QDebug_ProcessCommands().
void Set_QT_User_Data | ( | uint8_t * | pdata | ) |
Extracts user data from QTouch Studio to touch mcu memory.
pdata,: | data pointer. |
Extracts user data from QTouch Studio to touch mcu memory.
Extracts user data from QTouch Studio to touch mcu memory.
pdata,: | data pointer. |
void Set_Subscriptions | ( | void | ) |
Set Data Subscription values.
References QDebug_SetSubscriptions().
Referenced by QDebug_ProcessCommands().
void Transmit_Burst_Lengths | ( | void | ) |
Transmits the QMatrix burst length values to QTouch Studio.
void Transmit_Delta | ( | void | ) |
Transmits the channel delta values to QTouch Studio.
References QDEBUG_NUM_SENSORS, QDEBUG_REFERENCES_PTR, QDEBUG_SIGNALS_PTR, QT_DELTAS, and UNUSED.
Referenced by QDebug_SendData().
void Transmit_Dummy | ( | void | ) |
Transmits a dummy packet if no other subscriptions are set.
References QT_DUMMY.
Referenced by QDebug_SendData().
void Transmit_Global_Config | ( | void | ) |
Transmits the global config struct to QTouch Studio.
References tag_touch_global_param_t::di, tag_touch_global_param_t::drift_hold_time, tag_touch_at_param_t::filter, tag_touch_global_param_t::max_on_duration, measurement_period_ms, tag_touch_at_param_t::ndrift, tag_touch_global_param_t::neg_drift_rate, tag_touch_at_param_t::pdrift, tag_touch_global_param_t::pos_drift_rate, tag_touch_global_param_t::pos_recal_delay, tag_touch_at_param_t::pthr, QDEBUG_GET_GLOBAL_PARAM_FUNC, QT_GLOBAL_CONFIG, tag_touch_global_param_t::recal_threshold, TOUCH_SUCCESS, and UNUSED.
Referenced by QDebug_SendData().
void Transmit_QT_User_Data | ( | uint8_t * | pdata, |
uint16_t | c | ||
) |
Transmits user data to QTouch Studio.
pdata,: | data pointer. |
c,: | length of data in bytes. |
void Transmit_Ref | ( | void | ) |
Transmits the channel reference values to QTouch Studio.
References QDEBUG_NUM_CHANNELS, QDEBUG_REFERENCES_PTR, and QT_REFERENCES.
Referenced by QDebug_SendData().
void Transmit_Sensor_Config | ( | void | ) |
Transmits the channel config struct to QTouch Studio.
References QDEBUG_GET_GLOBAL_PARAM_FUNC, QDEBUG_NUM_SENSORS, QT_SENSOR_CONFIG, tag_touch_at_param_t::sense, and TOUCH_SUCCESS.
Referenced by QDebug_SendData().
void Transmit_Sign_On | ( | void | ) |
Transmits the sign on packet to QTouch Studio.
References delivery, INTERFACE, PROJECT_ID, QDEBUG_LIBINFO, QDEBUG_NUM_CHANNELS, and QT_SIGN_ON.
Referenced by QDebug_SendData().
void Transmit_Signals | ( | void | ) |
Transmits the measurement values for each channel to QTouch Studio.
References QDEBUG_NUM_CHANNELS, QDEBUG_SIGNALS_PTR, and QT_SIGNALS.
Referenced by QDebug_SendData().
void Transmit_State | ( | void | ) |
Transmits the state values to QTouch Studio.
References autonomous_qtouch_in_touch, QDEBUG_NUM_CHANNELS, QDEBUG_NUM_ROTORS_SLIDERS, QDEBUG_NUM_SENSOR_STATE_BYTES, and QT_STATES.
Referenced by QDebug_SendData().
void Transmit_Time_Stamps | ( | void | ) |
Transmits the application execution timestamp values to QTouch Studio.
Transmits the application execution timestamp values to QTouch Studio.
Transmits the application execution timestamp values to QTouch Studio.
References timestamp1_hword, timestamp1_lword, timestamp2_hword, timestamp2_lword, timestamp3_hword, and timestamp3_lword.
touch_measure_data_t* p_qm_measure_data |
QMatrix measured data pointer.
touch_measure_data_t* p_qta_measure_data |
touch_measure_data_t* p_qtb_measure_data |