#include "touch_api.h"
#include "QDebug.h"
#include "QDebugTransport.h"
#include "QDebugSettings.h"
#include "eeprom_access.h"
Functions | |
void | QDebug_Init (void) |
This API initializes QDebug interface. 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... | |
void | Set_Channel_Config (void) |
Extract the data packet from QTouch Studio and set channel config. More... | |
void | Set_Global_Config (void) |
Extract the data packet from QTouch Studio and set global config. More... | |
void | Set_QT_User_Data (uint8_t *pdata) |
Extracts user data from QTouch Studio to touch mcu memory. More... | |
void | Set_Subscriptions (void) |
Set Data Subscription values. More... | |
void | Transmit_Delta (void) |
Transmits the channel delta values to QTouch Studio. More... | |
void | Transmit_Dummy (void) |
Transmits a dummy packet if no other subscriptions are set. More... | |
void | Transmit_Global_Config (void) |
Transmits the global config struct to QTouch Studio. More... | |
void | Transmit_QT_User_Data (uint8_t *pdata, uint16_t c) |
Transmits user data to QTouch Studio. More... | |
void | Transmit_Ref (void) |
Transmits the channel reference values to QTouch Studio. More... | |
void | Transmit_Sensor_Config (void) |
Transmits the channel config struct to QTouch Studio. More... | |
void | Transmit_Sign_On (void) |
Transmits the sign on packet to QTouch Studio. More... | |
void | Transmit_Signals (void) |
Transmits the measurement values for each channel to QTouch Studio. More... | |
void | Transmit_State (void) |
Transmits the state values to QTouch Studio. More... | |
void | Transmit_Time_Stamps (void) |
Transmits the application execution timestamp values to QTouch Studio. More... | |
Variables | |
static uint16_t | delivery = 0 |
Subscriptions. More... | |
qt_lib_siginfo_t | lib_siginfo |
uint8_t | num_sensors |
static uint16_t | qgLibraryChanges = 0 |
uint8_t | qgRefschanged |
These must somehow be updated from the library. More... | |
uint8_t | qgStateschanged |
static uint16_t | qgSubsAllways = 0 |
static uint16_t | qgSubsChange = 0 |
static uint16_t | qgSubsOnce = 0 |
uint16_t | timestamp1_hword |
Time stamp information. More... | |
uint16_t | timestamp1_lword |
uint16_t | timestamp2_hword |
uint16_t | timestamp2_lword |
uint16_t | timestamp3_hword |
uint16_t | timestamp3_lword |
void QDebug_Init | ( | void | ) |
This API initializes QDebug interface.
This API initializes QDebug interface, including the low level hardware interface (SPI, TWI, USART etc).
References BitBangSPI_Master_Init(), Init_Buffers(), qt_lib_sig_info_t::library_version, qt_get_library_sig(), read_info_from_eeprom(), read_settings_from_eeprom(), write_global_settings_to_eeprom(), write_info_to_eeprom(), and write_sensor_settings_to_eeprom().
void QDebug_ProcessCommands | ( | void | ) |
Command handler for the data received from QTouch Studio.
References GetChar(), QT_CMD_DUMMY, QT_CMD_SET_CH_CONFIG, QT_CMD_SET_GLOBAL_CONFIG, QT_CMD_SET_QM_BURST_LENGTHS, QT_CMD_SET_SUBS, QT_CMD_SET_USER_DATA, Receive_Message(), RX_Buffer, RX_index, Set_Channel_Config(), Set_Global_Config(), Set_QT_User_Data(), and Set_Subscriptions().
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, QTLIB_CHANNEL_REF_CHANGE, QTLIB_ROTOR_SLIDER_POS_CHANGE, QTLIB_STATUS_CHANGE, SequenceH, SUBS_DELTA, SUBS_GLOBAL_CONFIG, SUBS_REF, SUBS_SENSOR_CONFIG, SUBS_SIGN_ON, SUBS_SIGNALS, SUBS_STATES, Transmit_Delta(), Transmit_Dummy(), Transmit_Global_Config(), Transmit_Ref(), Transmit_Sensor_Config(), Transmit_Sign_On(), Transmit_Signals(), and Transmit_State().
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 GetChar(), sensors, and write_sensor_settings_to_eeprom().
Referenced by QDebug_ProcessCommands().
void Set_Global_Config | ( | void | ) |
Extract the data packet from QTouch Studio and set global config.
References GetChar(), qt_config_data, tag_qt_touch_lib_config_data_t::qt_di, tag_qt_touch_lib_config_data_t::qt_drift_hold_time, tag_qt_touch_lib_config_data_t::qt_max_on_duration, qt_measurement_period_msec, tag_qt_touch_lib_config_data_t::qt_neg_drift_rate, tag_qt_touch_lib_config_data_t::qt_pos_drift_rate, tag_qt_touch_lib_config_data_t::qt_pos_recal_delay, tag_qt_touch_lib_config_data_t::qt_recal_threshold, and write_global_settings_to_eeprom().
Referenced by QDebug_ProcessCommands().
void Set_QT_User_Data | ( | uint8_t * | pdata | ) |
Extracts user data from QTouch Studio to touch mcu memory.
data | pointer |
References PutChar(), RX_Buffer, and Send_Message().
Referenced by QDebug_ProcessCommands().
void Set_Subscriptions | ( | void | ) |
Set Data Subscription values.
References GetChar(), and QDebug_SetSubscriptions().
Referenced by QDebug_ProcessCommands().
void Transmit_Delta | ( | void | ) |
Transmits the channel delta values to QTouch Studio.
References num_sensors, PutChar(), QT_DELTAS, qt_get_sensor_delta(), and Send_Message().
Referenced by QDebug_SendData().
void Transmit_Dummy | ( | void | ) |
Transmits a dummy packet if no other subscriptions are set.
References PutChar(), QT_DUMMY, and Send_Message().
Referenced by QDebug_SendData().
void Transmit_Global_Config | ( | void | ) |
Transmits the global config struct to QTouch Studio.
References PutChar(), PutInt(), qt_config_data, tag_qt_touch_lib_config_data_t::qt_di, tag_qt_touch_lib_config_data_t::qt_drift_hold_time, QT_GLOBAL_CONFIG, tag_qt_touch_lib_config_data_t::qt_max_on_duration, qt_measurement_period_msec, tag_qt_touch_lib_config_data_t::qt_neg_drift_rate, tag_qt_touch_lib_config_data_t::qt_pos_drift_rate, tag_qt_touch_lib_config_data_t::qt_pos_recal_delay, tag_qt_touch_lib_config_data_t::qt_recal_threshold, Send_Message(), and TICKS_PER_MS.
Referenced by QDebug_SendData().
void Transmit_QT_User_Data | ( | uint8_t * | pdata, |
uint16_t | c | ||
) |
Transmits user data to QTouch Studio.
data | pointer, length of data in bytes |
References PutChar(), and Send_Message().
void Transmit_Ref | ( | void | ) |
Transmits the channel reference values to QTouch Studio.
References tag_qt_touch_lib_measure_data_t::channel_references, PutChar(), qt_measure_data, QT_REFERENCES, and Send_Message().
Referenced by QDebug_SendData().
void Transmit_Sensor_Config | ( | void | ) |
Transmits the channel config struct to QTouch Studio.
References PutChar(), QT_SENSOR_CONFIG, Send_Message(), and sensors.
Referenced by QDebug_SendData().
void Transmit_Sign_On | ( | void | ) |
Transmits the sign on packet to QTouch Studio.
References delivery, INTERFACE, qt_lib_sig_info_t::lib_sig_lword, qt_lib_sig_info_t::library_version, PROJECT_ID, PutChar(), PutInt(), QT_SIGN_ON, and Send_Message().
Referenced by QDebug_SendData().
void Transmit_Signals | ( | void | ) |
Transmits the measurement values for each channel to QTouch Studio.
References tag_qt_touch_lib_measure_data_t::channel_signals, PutChar(), qt_measure_data, QT_SIGNALS, and Send_Message().
Referenced by QDebug_SendData().
void Transmit_State | ( | void | ) |
Transmits the state values to QTouch Studio.
References PutChar(), QT_MAX_NUM_ROTORS_SLIDERS, qt_measure_data, QT_NUM_SENSOR_STATE_BYTES, QT_STATES, tag_qt_touch_lib_measure_data_t::qt_touch_status, tag_qt_touch_status_t::rotor_slider_values, Send_Message(), and tag_qt_touch_status_t::sensor_states.
Referenced by QDebug_SendData().
void Transmit_Time_Stamps | ( | void | ) |
Transmits the application execution timestamp values to QTouch Studio.
References PutInt(), Send_Message(), timestamp1_hword, timestamp1_lword, timestamp2_hword, timestamp2_lword, timestamp3_hword, and timestamp3_lword.
|
static |
Subscriptions.
Referenced by QDebug_SendData(), and Transmit_Sign_On().
qt_lib_siginfo_t lib_siginfo |
uint8_t num_sensors |
|
static |
Referenced by QDebug_SendData().
uint8_t qgRefschanged |
These must somehow be updated from the library.
uint8_t qgStateschanged |
|
static |
Referenced by QDebug_SendData(), and QDebug_SetSubscriptions().
|
static |
Referenced by QDebug_SendData(), and QDebug_SetSubscriptions().
|
static |
Referenced by QDebug_SendData(), and QDebug_SetSubscriptions().
uint16_t timestamp1_hword |
Time stamp information.
Referenced by Transmit_Time_Stamps().
uint16_t timestamp1_lword |
Referenced by Transmit_Time_Stamps().
uint16_t timestamp2_hword |
Referenced by Transmit_Time_Stamps().
uint16_t timestamp2_lword |
Referenced by Transmit_Time_Stamps().
uint16_t timestamp3_hword |
Referenced by Transmit_Time_Stamps().
uint16_t timestamp3_lword |
Referenced by Transmit_Time_Stamps().