1*a248dafdSChristopher Ferris /* 2*a248dafdSChristopher Ferris * Copyright (C) 2014 Satoshi Noguchi 3*a248dafdSChristopher Ferris * Copyright (C) 2014 Synaptics Inc 4*a248dafdSChristopher Ferris * 5*a248dafdSChristopher Ferris * Licensed under the Apache License, Version 2.0 (the "License"); 6*a248dafdSChristopher Ferris * you may not use this file except in compliance with the License. 7*a248dafdSChristopher Ferris * You may obtain a copy of the License at 8*a248dafdSChristopher Ferris * 9*a248dafdSChristopher Ferris * http://www.apache.org/licenses/LICENSE-2.0 10*a248dafdSChristopher Ferris * 11*a248dafdSChristopher Ferris * Unless required by applicable law or agreed to in writing, software 12*a248dafdSChristopher Ferris * distributed under the License is distributed on an "AS IS" BASIS, 13*a248dafdSChristopher Ferris * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14*a248dafdSChristopher Ferris * See the License for the specific language governing permissions and 15*a248dafdSChristopher Ferris * limitations under the License. 16*a248dafdSChristopher Ferris */ 17*a248dafdSChristopher Ferris 18*a248dafdSChristopher Ferris #ifndef _F54TEST_H_ 19*a248dafdSChristopher Ferris #define _F54TEST_H_ 20*a248dafdSChristopher Ferris 21*a248dafdSChristopher Ferris #include "rmidevice.h" 22*a248dafdSChristopher Ferris 23*a248dafdSChristopher Ferris #define COMMAND_TIMEOUT_100MS 20 24*a248dafdSChristopher Ferris 25*a248dafdSChristopher Ferris #define COMMAND_GET_REPORT 1 26*a248dafdSChristopher Ferris #define COMMAND_FORCE_CAL 2 27*a248dafdSChristopher Ferris #define COMMAND_FORCE_UPDATE 4 28*a248dafdSChristopher Ferris 29*a248dafdSChristopher Ferris #define REPORT_INDEX_OFFSET 1 30*a248dafdSChristopher Ferris #define REPORT_DATA_OFFSET 3 31*a248dafdSChristopher Ferris 32*a248dafdSChristopher Ferris #define SENSOR_RX_MAPPING_OFFSET 1 33*a248dafdSChristopher Ferris #define SENSOR_TX_MAPPING_OFFSET 2 34*a248dafdSChristopher Ferris 35*a248dafdSChristopher Ferris #define CONTROL_0_SIZE 1 36*a248dafdSChristopher Ferris #define CONTROL_1_SIZE 1 37*a248dafdSChristopher Ferris #define CONTROL_2_SIZE 2 38*a248dafdSChristopher Ferris #define CONTROL_3_SIZE 1 39*a248dafdSChristopher Ferris #define CONTROL_4_6_SIZE 3 40*a248dafdSChristopher Ferris #define CONTROL_7_SIZE 1 41*a248dafdSChristopher Ferris #define CONTROL_8_9_SIZE 3 42*a248dafdSChristopher Ferris #define CONTROL_10_SIZE 1 43*a248dafdSChristopher Ferris #define CONTROL_11_SIZE 2 44*a248dafdSChristopher Ferris #define CONTROL_12_13_SIZE 2 45*a248dafdSChristopher Ferris #define CONTROL_14_SIZE 1 46*a248dafdSChristopher Ferris #define CONTROL_15_SIZE 1 47*a248dafdSChristopher Ferris #define CONTROL_16_SIZE 1 48*a248dafdSChristopher Ferris #define CONTROL_17_SIZE 1 49*a248dafdSChristopher Ferris #define CONTROL_18_SIZE 1 50*a248dafdSChristopher Ferris #define CONTROL_19_SIZE 1 51*a248dafdSChristopher Ferris #define CONTROL_20_SIZE 1 52*a248dafdSChristopher Ferris #define CONTROL_21_SIZE 2 53*a248dafdSChristopher Ferris #define CONTROL_22_26_SIZE 7 54*a248dafdSChristopher Ferris #define CONTROL_27_SIZE 1 55*a248dafdSChristopher Ferris #define CONTROL_28_SIZE 2 56*a248dafdSChristopher Ferris #define CONTROL_29_SIZE 1 57*a248dafdSChristopher Ferris #define CONTROL_30_SIZE 1 58*a248dafdSChristopher Ferris #define CONTROL_31_SIZE 1 59*a248dafdSChristopher Ferris #define CONTROL_32_35_SIZE 8 60*a248dafdSChristopher Ferris #define CONTROL_36_SIZE 1 61*a248dafdSChristopher Ferris #define CONTROL_37_SIZE 1 62*a248dafdSChristopher Ferris #define CONTROL_38_SIZE 1 63*a248dafdSChristopher Ferris #define CONTROL_39_SIZE 1 64*a248dafdSChristopher Ferris #define CONTROL_40_SIZE 1 65*a248dafdSChristopher Ferris #define CONTROL_41_SIZE 1 66*a248dafdSChristopher Ferris #define CONTROL_42_SIZE 2 67*a248dafdSChristopher Ferris #define CONTROL_43_54_SIZE 13 68*a248dafdSChristopher Ferris #define CONTROL_55_56_SIZE 2 69*a248dafdSChristopher Ferris #define CONTROL_57_SIZE 1 70*a248dafdSChristopher Ferris #define CONTROL_58_SIZE 1 71*a248dafdSChristopher Ferris #define CONTROL_59_SIZE 2 72*a248dafdSChristopher Ferris #define CONTROL_60_62_SIZE 3 73*a248dafdSChristopher Ferris #define CONTROL_63_SIZE 1 74*a248dafdSChristopher Ferris #define CONTROL_64_67_SIZE 4 75*a248dafdSChristopher Ferris #define CONTROL_68_73_SIZE 8 76*a248dafdSChristopher Ferris #define CONTROL_74_SIZE 2 77*a248dafdSChristopher Ferris #define CONTROL_75_SIZE 1 78*a248dafdSChristopher Ferris #define CONTROL_76_SIZE 1 79*a248dafdSChristopher Ferris #define CONTROL_77_78_SIZE 2 80*a248dafdSChristopher Ferris #define CONTROL_79_83_SIZE 5 81*a248dafdSChristopher Ferris #define CONTROL_84_85_SIZE 2 82*a248dafdSChristopher Ferris #define CONTROL_86_SIZE 1 83*a248dafdSChristopher Ferris #define CONTROL_87_SIZE 1 84*a248dafdSChristopher Ferris #define CONTROL_88_SIZE 1 85*a248dafdSChristopher Ferris #define CONTROL_89_SIZE 1 86*a248dafdSChristopher Ferris #define CONTROL_90_SIZE 1 87*a248dafdSChristopher Ferris #define CONTROL_91_SIZE 1 88*a248dafdSChristopher Ferris #define CONTROL_92_SIZE 1 89*a248dafdSChristopher Ferris #define CONTROL_93_SIZE 1 90*a248dafdSChristopher Ferris #define CONTROL_94_SIZE 1 91*a248dafdSChristopher Ferris #define CONTROL_95_SIZE 1 92*a248dafdSChristopher Ferris #define CONTROL_96_SIZE 1 93*a248dafdSChristopher Ferris #define CONTROL_97_SIZE 1 94*a248dafdSChristopher Ferris #define CONTROL_98_SIZE 1 95*a248dafdSChristopher Ferris #define CONTROL_99_SIZE 1 96*a248dafdSChristopher Ferris #define CONTROL_100_SIZE 1 97*a248dafdSChristopher Ferris #define CONTROL_101_SIZE 1 98*a248dafdSChristopher Ferris #define CONTROL_102_SIZE 1 99*a248dafdSChristopher Ferris #define CONTROL_103_SIZE 1 100*a248dafdSChristopher Ferris #define CONTROL_104_SIZE 1 101*a248dafdSChristopher Ferris #define CONTROL_105_SIZE 1 102*a248dafdSChristopher Ferris #define CONTROL_106_SIZE 1 103*a248dafdSChristopher Ferris #define CONTROL_107_SIZE 1 104*a248dafdSChristopher Ferris #define CONTROL_108_SIZE 1 105*a248dafdSChristopher Ferris #define CONTROL_109_SIZE 1 106*a248dafdSChristopher Ferris #define CONTROL_110_SIZE 1 107*a248dafdSChristopher Ferris #define CONTROL_111_SIZE 1 108*a248dafdSChristopher Ferris #define CONTROL_112_SIZE 1 109*a248dafdSChristopher Ferris #define CONTROL_113_SIZE 1 110*a248dafdSChristopher Ferris #define CONTROL_114_SIZE 1 111*a248dafdSChristopher Ferris #define CONTROL_115_SIZE 1 112*a248dafdSChristopher Ferris #define CONTROL_116_SIZE 1 113*a248dafdSChristopher Ferris #define CONTROL_117_SIZE 1 114*a248dafdSChristopher Ferris #define CONTROL_118_SIZE 1 115*a248dafdSChristopher Ferris #define CONTROL_119_SIZE 1 116*a248dafdSChristopher Ferris #define CONTROL_120_SIZE 1 117*a248dafdSChristopher Ferris #define CONTROL_121_SIZE 1 118*a248dafdSChristopher Ferris #define CONTROL_122_SIZE 1 119*a248dafdSChristopher Ferris #define CONTROL_123_SIZE 1 120*a248dafdSChristopher Ferris #define CONTROL_124_SIZE 1 121*a248dafdSChristopher Ferris #define CONTROL_125_SIZE 1 122*a248dafdSChristopher Ferris #define CONTROL_126_SIZE 1 123*a248dafdSChristopher Ferris #define CONTROL_127_SIZE 1 124*a248dafdSChristopher Ferris #define CONTROL_128_SIZE 1 125*a248dafdSChristopher Ferris #define CONTROL_129_SIZE 1 126*a248dafdSChristopher Ferris #define CONTROL_130_SIZE 1 127*a248dafdSChristopher Ferris #define CONTROL_131_SIZE 1 128*a248dafdSChristopher Ferris #define CONTROL_132_SIZE 1 129*a248dafdSChristopher Ferris #define CONTROL_133_SIZE 1 130*a248dafdSChristopher Ferris #define CONTROL_134_SIZE 1 131*a248dafdSChristopher Ferris #define CONTROL_135_SIZE 1 132*a248dafdSChristopher Ferris #define CONTROL_136_SIZE 1 133*a248dafdSChristopher Ferris #define CONTROL_137_SIZE 1 134*a248dafdSChristopher Ferris #define CONTROL_138_SIZE 1 135*a248dafdSChristopher Ferris #define CONTROL_139_SIZE 1 136*a248dafdSChristopher Ferris #define CONTROL_140_SIZE 1 137*a248dafdSChristopher Ferris #define CONTROL_141_SIZE 1 138*a248dafdSChristopher Ferris #define CONTROL_142_SIZE 1 139*a248dafdSChristopher Ferris #define CONTROL_143_SIZE 1 140*a248dafdSChristopher Ferris #define CONTROL_144_SIZE 1 141*a248dafdSChristopher Ferris #define CONTROL_145_SIZE 1 142*a248dafdSChristopher Ferris #define CONTROL_146_SIZE 1 143*a248dafdSChristopher Ferris #define CONTROL_147_SIZE 1 144*a248dafdSChristopher Ferris #define CONTROL_148_SIZE 1 145*a248dafdSChristopher Ferris #define CONTROL_149_SIZE 1 146*a248dafdSChristopher Ferris #define CONTROL_150_SIZE 1 147*a248dafdSChristopher Ferris #define CONTROL_151_SIZE 1 148*a248dafdSChristopher Ferris #define CONTROL_152_SIZE 1 149*a248dafdSChristopher Ferris #define CONTROL_153_SIZE 1 150*a248dafdSChristopher Ferris #define CONTROL_154_SIZE 1 151*a248dafdSChristopher Ferris #define CONTROL_155_SIZE 1 152*a248dafdSChristopher Ferris #define CONTROL_156_SIZE 1 153*a248dafdSChristopher Ferris #define CONTROL_157_158_SIZE 2 154*a248dafdSChristopher Ferris #define CONTROL_163_SIZE 1 155*a248dafdSChristopher Ferris #define CONTROL_165_SIZE 1 156*a248dafdSChristopher Ferris #define CONTROL_166_SIZE 1 157*a248dafdSChristopher Ferris #define CONTROL_167_SIZE 1 158*a248dafdSChristopher Ferris #define CONTROL_168_SIZE 1 159*a248dafdSChristopher Ferris #define CONTROL_169_SIZE 1 160*a248dafdSChristopher Ferris #define CONTROL_171_SIZE 1 161*a248dafdSChristopher Ferris #define CONTROL_172_SIZE 1 162*a248dafdSChristopher Ferris #define CONTROL_173_SIZE 1 163*a248dafdSChristopher Ferris #define CONTROL_174_SIZE 1 164*a248dafdSChristopher Ferris #define CONTROL_175_SIZE 1 165*a248dafdSChristopher Ferris #define CONTROL_176_SIZE 1 166*a248dafdSChristopher Ferris #define CONTROL_177_178_SIZE 2 167*a248dafdSChristopher Ferris #define CONTROL_179_SIZE 1 168*a248dafdSChristopher Ferris #define CONTROL_182_SIZE 1 169*a248dafdSChristopher Ferris #define CONTROL_183_SIZE 1 170*a248dafdSChristopher Ferris #define CONTROL_185_SIZE 1 171*a248dafdSChristopher Ferris #define CONTROL_186_SIZE 1 172*a248dafdSChristopher Ferris #define CONTROL_187_SIZE 1 173*a248dafdSChristopher Ferris #define CONTROL_188_SIZE 1 174*a248dafdSChristopher Ferris 175*a248dafdSChristopher Ferris #define HIGH_RESISTANCE_DATA_SIZE 6 176*a248dafdSChristopher Ferris #define FULL_RAW_CAP_MIN_MAX_DATA_SIZE 4 177*a248dafdSChristopher Ferris #define TRX_OPEN_SHORT_DATA_SIZE 15 178*a248dafdSChristopher Ferris #define GUARD_PIN_SHORT_DATA_SIZE 15 179*a248dafdSChristopher Ferris 180*a248dafdSChristopher Ferris enum f54_report_types { 181*a248dafdSChristopher Ferris F54_8BIT_IMAGE = 1, 182*a248dafdSChristopher Ferris F54_16BIT_IMAGE = 2, 183*a248dafdSChristopher Ferris F54_RAW_16BIT_IMAGE = 3, 184*a248dafdSChristopher Ferris F54_HIGH_RESISTANCE = 4, 185*a248dafdSChristopher Ferris F54_TX_TO_TX_SHORTS = 5, 186*a248dafdSChristopher Ferris F54_RX_TO_RX_SHORTS_1 = 7, 187*a248dafdSChristopher Ferris F54_TRUE_BASELINE = 9, 188*a248dafdSChristopher Ferris F54_FULL_RAW_CAP_MIN_MAX = 13, 189*a248dafdSChristopher Ferris F54_RX_OPENS_1 = 14, 190*a248dafdSChristopher Ferris F54_TX_OPENS = 15, 191*a248dafdSChristopher Ferris F54_TX_TO_GND_SHORTS = 16, 192*a248dafdSChristopher Ferris F54_RX_TO_RX_SHORTS_2 = 17, 193*a248dafdSChristopher Ferris F54_RX_OPENS_2 = 18, 194*a248dafdSChristopher Ferris F54_FULL_RAW_CAP = 19, 195*a248dafdSChristopher Ferris F54_FULL_RAW_CAP_NO_RX_COUPLING = 20, 196*a248dafdSChristopher Ferris F54_SENSOR_SPEED = 22, 197*a248dafdSChristopher Ferris F54_ADC_RANGE = 23, 198*a248dafdSChristopher Ferris F54_TRX_OPENS = 24, 199*a248dafdSChristopher Ferris F54_TRX_TO_GND_SHORTS = 25, 200*a248dafdSChristopher Ferris F54_TRX_SHORTS = 26, 201*a248dafdSChristopher Ferris F54_ABS_RAW_CAP = 38, 202*a248dafdSChristopher Ferris F54_ABS_DELTA_CAP = 40, 203*a248dafdSChristopher Ferris F54_GUARD_PIN_SHORT = 50, 204*a248dafdSChristopher Ferris INVALID_REPORT_TYPE = -1, 205*a248dafdSChristopher Ferris }; 206*a248dafdSChristopher Ferris 207*a248dafdSChristopher Ferris struct f54_query { 208*a248dafdSChristopher Ferris union { 209*a248dafdSChristopher Ferris struct { 210*a248dafdSChristopher Ferris /* query 0 */ 211*a248dafdSChristopher Ferris unsigned char num_of_rx_electrodes; 212*a248dafdSChristopher Ferris 213*a248dafdSChristopher Ferris /* query 1 */ 214*a248dafdSChristopher Ferris unsigned char num_of_tx_electrodes; 215*a248dafdSChristopher Ferris 216*a248dafdSChristopher Ferris /* query 2 */ 217*a248dafdSChristopher Ferris unsigned char f54_query2_b0__1:2; 218*a248dafdSChristopher Ferris unsigned char has_baseline:1; 219*a248dafdSChristopher Ferris unsigned char has_image8:1; 220*a248dafdSChristopher Ferris unsigned char f54_query2_b4__5:2; 221*a248dafdSChristopher Ferris unsigned char has_image16:1; 222*a248dafdSChristopher Ferris unsigned char f54_query2_b7:1; 223*a248dafdSChristopher Ferris 224*a248dafdSChristopher Ferris /* queries 3.0 and 3.1 */ 225*a248dafdSChristopher Ferris unsigned short clock_rate; 226*a248dafdSChristopher Ferris 227*a248dafdSChristopher Ferris /* query 4 */ 228*a248dafdSChristopher Ferris unsigned char touch_controller_family; 229*a248dafdSChristopher Ferris 230*a248dafdSChristopher Ferris /* query 5 */ 231*a248dafdSChristopher Ferris unsigned char has_pixel_touch_threshold_adjustment:1; 232*a248dafdSChristopher Ferris unsigned char f54_query5_b1__7:7; 233*a248dafdSChristopher Ferris 234*a248dafdSChristopher Ferris /* query 6 */ 235*a248dafdSChristopher Ferris unsigned char has_sensor_assignment:1; 236*a248dafdSChristopher Ferris unsigned char has_interference_metric:1; 237*a248dafdSChristopher Ferris unsigned char has_sense_frequency_control:1; 238*a248dafdSChristopher Ferris unsigned char has_firmware_noise_mitigation:1; 239*a248dafdSChristopher Ferris unsigned char has_ctrl11:1; 240*a248dafdSChristopher Ferris unsigned char has_two_byte_report_rate:1; 241*a248dafdSChristopher Ferris unsigned char has_one_byte_report_rate:1; 242*a248dafdSChristopher Ferris unsigned char has_relaxation_control:1; 243*a248dafdSChristopher Ferris 244*a248dafdSChristopher Ferris /* query 7 */ 245*a248dafdSChristopher Ferris unsigned char curve_compensation_mode:2; 246*a248dafdSChristopher Ferris unsigned char f54_query7_b2__7:6; 247*a248dafdSChristopher Ferris 248*a248dafdSChristopher Ferris /* query 8 */ 249*a248dafdSChristopher Ferris unsigned char f54_query8_b0:1; 250*a248dafdSChristopher Ferris unsigned char has_iir_filter:1; 251*a248dafdSChristopher Ferris unsigned char has_cmn_removal:1; 252*a248dafdSChristopher Ferris unsigned char has_cmn_maximum:1; 253*a248dafdSChristopher Ferris unsigned char has_touch_hysteresis:1; 254*a248dafdSChristopher Ferris unsigned char has_edge_compensation:1; 255*a248dafdSChristopher Ferris unsigned char has_per_frequency_noise_control:1; 256*a248dafdSChristopher Ferris unsigned char has_enhanced_stretch:1; 257*a248dafdSChristopher Ferris 258*a248dafdSChristopher Ferris /* query 9 */ 259*a248dafdSChristopher Ferris unsigned char has_force_fast_relaxation:1; 260*a248dafdSChristopher Ferris unsigned char has_multi_metric_state_machine:1; 261*a248dafdSChristopher Ferris unsigned char has_signal_clarity:1; 262*a248dafdSChristopher Ferris unsigned char has_variance_metric:1; 263*a248dafdSChristopher Ferris unsigned char has_0d_relaxation_control:1; 264*a248dafdSChristopher Ferris unsigned char has_0d_acquisition_control:1; 265*a248dafdSChristopher Ferris unsigned char has_status:1; 266*a248dafdSChristopher Ferris unsigned char has_slew_metric:1; 267*a248dafdSChristopher Ferris 268*a248dafdSChristopher Ferris /* query 10 */ 269*a248dafdSChristopher Ferris unsigned char has_h_blank:1; 270*a248dafdSChristopher Ferris unsigned char has_v_blank:1; 271*a248dafdSChristopher Ferris unsigned char has_long_h_blank:1; 272*a248dafdSChristopher Ferris unsigned char has_startup_fast_relaxation:1; 273*a248dafdSChristopher Ferris unsigned char has_esd_control:1; 274*a248dafdSChristopher Ferris unsigned char has_noise_mitigation2:1; 275*a248dafdSChristopher Ferris unsigned char has_noise_state:1; 276*a248dafdSChristopher Ferris unsigned char has_energy_ratio_relaxation:1; 277*a248dafdSChristopher Ferris 278*a248dafdSChristopher Ferris /* query 11 */ 279*a248dafdSChristopher Ferris unsigned char has_excessive_noise_reporting:1; 280*a248dafdSChristopher Ferris unsigned char has_slew_option:1; 281*a248dafdSChristopher Ferris unsigned char has_two_overhead_bursts:1; 282*a248dafdSChristopher Ferris unsigned char has_query13:1; 283*a248dafdSChristopher Ferris unsigned char has_one_overhead_burst:1; 284*a248dafdSChristopher Ferris unsigned char f54_query11_b5:1; 285*a248dafdSChristopher Ferris unsigned char has_ctrl88:1; 286*a248dafdSChristopher Ferris unsigned char has_query15:1; 287*a248dafdSChristopher Ferris 288*a248dafdSChristopher Ferris /* query 12 */ 289*a248dafdSChristopher Ferris unsigned char number_of_sensing_frequencies:4; 290*a248dafdSChristopher Ferris unsigned char f54_query12_b4__7:4; 291*a248dafdSChristopher Ferris } __attribute__((packed)); 292*a248dafdSChristopher Ferris unsigned char data[14]; 293*a248dafdSChristopher Ferris }; 294*a248dafdSChristopher Ferris }; 295*a248dafdSChristopher Ferris 296*a248dafdSChristopher Ferris struct f54_query_13 { 297*a248dafdSChristopher Ferris union { 298*a248dafdSChristopher Ferris struct { 299*a248dafdSChristopher Ferris unsigned char has_ctrl86:1; 300*a248dafdSChristopher Ferris unsigned char has_ctrl87:1; 301*a248dafdSChristopher Ferris unsigned char has_ctrl87_sub0:1; 302*a248dafdSChristopher Ferris unsigned char has_ctrl87_sub1:1; 303*a248dafdSChristopher Ferris unsigned char has_ctrl87_sub2:1; 304*a248dafdSChristopher Ferris unsigned char has_cidim:1; 305*a248dafdSChristopher Ferris unsigned char has_noise_mitigation_enhancement:1; 306*a248dafdSChristopher Ferris unsigned char has_rail_im:1; 307*a248dafdSChristopher Ferris } __attribute__((packed)); 308*a248dafdSChristopher Ferris unsigned char data[1]; 309*a248dafdSChristopher Ferris }; 310*a248dafdSChristopher Ferris }; 311*a248dafdSChristopher Ferris 312*a248dafdSChristopher Ferris struct f54_query_15 { 313*a248dafdSChristopher Ferris union { 314*a248dafdSChristopher Ferris struct { 315*a248dafdSChristopher Ferris unsigned char has_ctrl90:1; 316*a248dafdSChristopher Ferris unsigned char has_transmit_strength:1; 317*a248dafdSChristopher Ferris unsigned char has_ctrl87_sub3:1; 318*a248dafdSChristopher Ferris unsigned char has_query16:1; 319*a248dafdSChristopher Ferris unsigned char has_query20:1; 320*a248dafdSChristopher Ferris unsigned char has_query21:1; 321*a248dafdSChristopher Ferris unsigned char has_query22:1; 322*a248dafdSChristopher Ferris unsigned char has_query25:1; 323*a248dafdSChristopher Ferris } __attribute__((packed)); 324*a248dafdSChristopher Ferris unsigned char data[1]; 325*a248dafdSChristopher Ferris }; 326*a248dafdSChristopher Ferris }; 327*a248dafdSChristopher Ferris 328*a248dafdSChristopher Ferris struct f54_query_16 { 329*a248dafdSChristopher Ferris union { 330*a248dafdSChristopher Ferris struct { 331*a248dafdSChristopher Ferris unsigned char has_query17:1; 332*a248dafdSChristopher Ferris unsigned char has_data17:1; 333*a248dafdSChristopher Ferris unsigned char has_ctrl92:1; 334*a248dafdSChristopher Ferris unsigned char has_ctrl93:1; 335*a248dafdSChristopher Ferris unsigned char has_ctrl94_query18:1; 336*a248dafdSChristopher Ferris unsigned char has_ctrl95_query19:1; 337*a248dafdSChristopher Ferris unsigned char has_ctrl99:1; 338*a248dafdSChristopher Ferris unsigned char has_ctrl100:1; 339*a248dafdSChristopher Ferris } __attribute__((packed)); 340*a248dafdSChristopher Ferris unsigned char data[1]; 341*a248dafdSChristopher Ferris }; 342*a248dafdSChristopher Ferris }; 343*a248dafdSChristopher Ferris 344*a248dafdSChristopher Ferris struct f54_query_21 { 345*a248dafdSChristopher Ferris union { 346*a248dafdSChristopher Ferris struct { 347*a248dafdSChristopher Ferris unsigned char has_abs_rx:1; 348*a248dafdSChristopher Ferris unsigned char has_abs_tx:1; 349*a248dafdSChristopher Ferris unsigned char has_ctrl91:1; 350*a248dafdSChristopher Ferris unsigned char has_ctrl96:1; 351*a248dafdSChristopher Ferris unsigned char has_ctrl97:1; 352*a248dafdSChristopher Ferris unsigned char has_ctrl98:1; 353*a248dafdSChristopher Ferris unsigned char has_data19:1; 354*a248dafdSChristopher Ferris unsigned char has_query24_data18:1; 355*a248dafdSChristopher Ferris } __attribute__((packed)); 356*a248dafdSChristopher Ferris unsigned char data[1]; 357*a248dafdSChristopher Ferris }; 358*a248dafdSChristopher Ferris }; 359*a248dafdSChristopher Ferris 360*a248dafdSChristopher Ferris struct f54_query_22 { 361*a248dafdSChristopher Ferris union { 362*a248dafdSChristopher Ferris struct { 363*a248dafdSChristopher Ferris unsigned char has_packed_image:1; 364*a248dafdSChristopher Ferris unsigned char has_ctrl101:1; 365*a248dafdSChristopher Ferris unsigned char has_dynamic_sense_display_ratio:1; 366*a248dafdSChristopher Ferris unsigned char has_query23:1; 367*a248dafdSChristopher Ferris unsigned char has_ctrl103_query26:1; 368*a248dafdSChristopher Ferris unsigned char has_ctrl104:1; 369*a248dafdSChristopher Ferris unsigned char has_ctrl105:1; 370*a248dafdSChristopher Ferris unsigned char has_query28:1; 371*a248dafdSChristopher Ferris } __attribute__((packed)); 372*a248dafdSChristopher Ferris unsigned char data[1]; 373*a248dafdSChristopher Ferris }; 374*a248dafdSChristopher Ferris }; 375*a248dafdSChristopher Ferris 376*a248dafdSChristopher Ferris struct f54_query_23 { 377*a248dafdSChristopher Ferris union { 378*a248dafdSChristopher Ferris struct { 379*a248dafdSChristopher Ferris unsigned char has_ctrl102:1; 380*a248dafdSChristopher Ferris unsigned char has_ctrl102_sub1:1; 381*a248dafdSChristopher Ferris unsigned char has_ctrl102_sub2:1; 382*a248dafdSChristopher Ferris unsigned char has_ctrl102_sub4:1; 383*a248dafdSChristopher Ferris unsigned char has_ctrl102_sub5:1; 384*a248dafdSChristopher Ferris unsigned char has_ctrl102_sub9:1; 385*a248dafdSChristopher Ferris unsigned char has_ctrl102_sub10:1; 386*a248dafdSChristopher Ferris unsigned char has_ctrl102_sub11:1; 387*a248dafdSChristopher Ferris } __attribute__((packed)); 388*a248dafdSChristopher Ferris unsigned char data[1]; 389*a248dafdSChristopher Ferris }; 390*a248dafdSChristopher Ferris }; 391*a248dafdSChristopher Ferris 392*a248dafdSChristopher Ferris struct f54_query_25 { 393*a248dafdSChristopher Ferris union { 394*a248dafdSChristopher Ferris struct { 395*a248dafdSChristopher Ferris unsigned char has_ctrl106:1; 396*a248dafdSChristopher Ferris unsigned char has_ctrl102_sub12:1; 397*a248dafdSChristopher Ferris unsigned char has_ctrl107:1; 398*a248dafdSChristopher Ferris unsigned char has_ctrl108:1; 399*a248dafdSChristopher Ferris unsigned char has_ctrl109:1; 400*a248dafdSChristopher Ferris unsigned char has_data20:1; 401*a248dafdSChristopher Ferris unsigned char f54_query25_b6:1; 402*a248dafdSChristopher Ferris unsigned char has_query27:1; 403*a248dafdSChristopher Ferris } __attribute__((packed)); 404*a248dafdSChristopher Ferris unsigned char data[1]; 405*a248dafdSChristopher Ferris }; 406*a248dafdSChristopher Ferris }; 407*a248dafdSChristopher Ferris 408*a248dafdSChristopher Ferris struct f54_query_27 { 409*a248dafdSChristopher Ferris union { 410*a248dafdSChristopher Ferris struct { 411*a248dafdSChristopher Ferris unsigned char has_ctrl110:1; 412*a248dafdSChristopher Ferris unsigned char has_data21:1; 413*a248dafdSChristopher Ferris unsigned char has_ctrl111:1; 414*a248dafdSChristopher Ferris unsigned char has_ctrl112:1; 415*a248dafdSChristopher Ferris unsigned char has_ctrl113:1; 416*a248dafdSChristopher Ferris unsigned char has_data22:1; 417*a248dafdSChristopher Ferris unsigned char has_ctrl114:1; 418*a248dafdSChristopher Ferris unsigned char has_query29:1; 419*a248dafdSChristopher Ferris } __attribute__((packed)); 420*a248dafdSChristopher Ferris unsigned char data[1]; 421*a248dafdSChristopher Ferris }; 422*a248dafdSChristopher Ferris }; 423*a248dafdSChristopher Ferris 424*a248dafdSChristopher Ferris struct f54_query_29 { 425*a248dafdSChristopher Ferris union { 426*a248dafdSChristopher Ferris struct { 427*a248dafdSChristopher Ferris unsigned char has_ctrl115:1; 428*a248dafdSChristopher Ferris unsigned char has_ground_ring_options:1; 429*a248dafdSChristopher Ferris unsigned char has_lost_bursts_tuning:1; 430*a248dafdSChristopher Ferris unsigned char has_aux_exvcom2_select:1; 431*a248dafdSChristopher Ferris unsigned char has_ctrl116:1; 432*a248dafdSChristopher Ferris unsigned char has_data23:1; 433*a248dafdSChristopher Ferris unsigned char has_ctrl117:1; 434*a248dafdSChristopher Ferris unsigned char has_query30:1; 435*a248dafdSChristopher Ferris } __attribute__((packed)); 436*a248dafdSChristopher Ferris unsigned char data[1]; 437*a248dafdSChristopher Ferris }; 438*a248dafdSChristopher Ferris }; 439*a248dafdSChristopher Ferris 440*a248dafdSChristopher Ferris struct f54_query_30 { 441*a248dafdSChristopher Ferris union { 442*a248dafdSChristopher Ferris struct { 443*a248dafdSChristopher Ferris unsigned char has_ctrl118:1; 444*a248dafdSChristopher Ferris unsigned char has_ctrl119:1; 445*a248dafdSChristopher Ferris unsigned char has_ctrl120:1; 446*a248dafdSChristopher Ferris unsigned char has_ctrl121:1; 447*a248dafdSChristopher Ferris unsigned char has_ctrl122_query31:1; 448*a248dafdSChristopher Ferris unsigned char has_ctrl123:1; 449*a248dafdSChristopher Ferris unsigned char f54_query30_b6:1; 450*a248dafdSChristopher Ferris unsigned char has_query32:1; 451*a248dafdSChristopher Ferris } __attribute__((packed)); 452*a248dafdSChristopher Ferris unsigned char data[1]; 453*a248dafdSChristopher Ferris }; 454*a248dafdSChristopher Ferris }; 455*a248dafdSChristopher Ferris 456*a248dafdSChristopher Ferris struct f54_query_32 { 457*a248dafdSChristopher Ferris union { 458*a248dafdSChristopher Ferris struct { 459*a248dafdSChristopher Ferris unsigned char has_ctrl125:1; 460*a248dafdSChristopher Ferris unsigned char has_ctrl126:1; 461*a248dafdSChristopher Ferris unsigned char has_ctrl127:1; 462*a248dafdSChristopher Ferris unsigned char has_abs_charge_pump_disable:1; 463*a248dafdSChristopher Ferris unsigned char has_query33:1; 464*a248dafdSChristopher Ferris unsigned char has_data24:1; 465*a248dafdSChristopher Ferris unsigned char has_query34:1; 466*a248dafdSChristopher Ferris unsigned char has_query35:1; 467*a248dafdSChristopher Ferris } __attribute__((packed)); 468*a248dafdSChristopher Ferris unsigned char data[1]; 469*a248dafdSChristopher Ferris }; 470*a248dafdSChristopher Ferris }; 471*a248dafdSChristopher Ferris 472*a248dafdSChristopher Ferris struct f54_query_33 { 473*a248dafdSChristopher Ferris union { 474*a248dafdSChristopher Ferris struct { 475*a248dafdSChristopher Ferris unsigned char f54_query33_b0:1; 476*a248dafdSChristopher Ferris unsigned char f54_query33_b1:1; 477*a248dafdSChristopher Ferris unsigned char f54_query33_b2:1; 478*a248dafdSChristopher Ferris unsigned char f54_query33_b3:1; 479*a248dafdSChristopher Ferris unsigned char has_ctrl132:1; 480*a248dafdSChristopher Ferris unsigned char has_ctrl133:1; 481*a248dafdSChristopher Ferris unsigned char has_ctrl134:1; 482*a248dafdSChristopher Ferris unsigned char has_query36:1; 483*a248dafdSChristopher Ferris } __attribute__((packed)); 484*a248dafdSChristopher Ferris unsigned char data[1]; 485*a248dafdSChristopher Ferris }; 486*a248dafdSChristopher Ferris }; 487*a248dafdSChristopher Ferris 488*a248dafdSChristopher Ferris struct f54_query_35 { 489*a248dafdSChristopher Ferris union { 490*a248dafdSChristopher Ferris struct { 491*a248dafdSChristopher Ferris unsigned char has_data25:1; 492*a248dafdSChristopher Ferris unsigned char f54_query35_b1:1; 493*a248dafdSChristopher Ferris unsigned char f54_query35_b2:1; 494*a248dafdSChristopher Ferris unsigned char has_ctrl137:1; 495*a248dafdSChristopher Ferris unsigned char has_ctrl138:1; 496*a248dafdSChristopher Ferris unsigned char has_ctrl139:1; 497*a248dafdSChristopher Ferris unsigned char has_data26:1; 498*a248dafdSChristopher Ferris unsigned char has_ctrl140:1; 499*a248dafdSChristopher Ferris } __attribute__((packed)); 500*a248dafdSChristopher Ferris unsigned char data[1]; 501*a248dafdSChristopher Ferris }; 502*a248dafdSChristopher Ferris }; 503*a248dafdSChristopher Ferris 504*a248dafdSChristopher Ferris struct f54_query_36 { 505*a248dafdSChristopher Ferris union { 506*a248dafdSChristopher Ferris struct { 507*a248dafdSChristopher Ferris unsigned char f54_query36_b0:1; 508*a248dafdSChristopher Ferris unsigned char has_ctrl142:1; 509*a248dafdSChristopher Ferris unsigned char has_query37:1; 510*a248dafdSChristopher Ferris unsigned char has_ctrl143:1; 511*a248dafdSChristopher Ferris unsigned char has_ctrl144:1; 512*a248dafdSChristopher Ferris unsigned char has_ctrl145:1; 513*a248dafdSChristopher Ferris unsigned char has_ctrl146:1; 514*a248dafdSChristopher Ferris unsigned char has_query38:1; 515*a248dafdSChristopher Ferris } __attribute__((packed)); 516*a248dafdSChristopher Ferris unsigned char data[1]; 517*a248dafdSChristopher Ferris }; 518*a248dafdSChristopher Ferris }; 519*a248dafdSChristopher Ferris 520*a248dafdSChristopher Ferris struct f54_query_38 { 521*a248dafdSChristopher Ferris union { 522*a248dafdSChristopher Ferris struct { 523*a248dafdSChristopher Ferris unsigned char has_ctrl147:1; 524*a248dafdSChristopher Ferris unsigned char has_ctrl148:1; 525*a248dafdSChristopher Ferris unsigned char has_ctrl149:1; 526*a248dafdSChristopher Ferris unsigned char has_ctrl150:1; 527*a248dafdSChristopher Ferris unsigned char has_ctrl151:1; 528*a248dafdSChristopher Ferris unsigned char has_ctrl152:1; 529*a248dafdSChristopher Ferris unsigned char has_ctrl153:1; 530*a248dafdSChristopher Ferris unsigned char has_query39:1; 531*a248dafdSChristopher Ferris } __attribute__((packed)); 532*a248dafdSChristopher Ferris unsigned char data[1]; 533*a248dafdSChristopher Ferris }; 534*a248dafdSChristopher Ferris }; 535*a248dafdSChristopher Ferris 536*a248dafdSChristopher Ferris struct f54_query_39 { 537*a248dafdSChristopher Ferris union { 538*a248dafdSChristopher Ferris struct { 539*a248dafdSChristopher Ferris unsigned char has_ctrl154:1; 540*a248dafdSChristopher Ferris unsigned char has_ctrl155:1; 541*a248dafdSChristopher Ferris unsigned char has_ctrl156:1; 542*a248dafdSChristopher Ferris unsigned char has_ctrl160:1; 543*a248dafdSChristopher Ferris unsigned char has_ctrl157_ctrl158:1; 544*a248dafdSChristopher Ferris unsigned char f54_query39_b5__6:2; 545*a248dafdSChristopher Ferris unsigned char has_query40:1; 546*a248dafdSChristopher Ferris } __attribute__((packed)); 547*a248dafdSChristopher Ferris unsigned char data[1]; 548*a248dafdSChristopher Ferris }; 549*a248dafdSChristopher Ferris }; 550*a248dafdSChristopher Ferris 551*a248dafdSChristopher Ferris struct f54_query_40 { 552*a248dafdSChristopher Ferris union { 553*a248dafdSChristopher Ferris struct { 554*a248dafdSChristopher Ferris unsigned char has_ctrl169:1; 555*a248dafdSChristopher Ferris unsigned char has_ctrl163_query41:1; 556*a248dafdSChristopher Ferris unsigned char f54_query40_b2:1; 557*a248dafdSChristopher Ferris unsigned char has_ctrl165_query42:1; 558*a248dafdSChristopher Ferris unsigned char has_ctrl166:1; 559*a248dafdSChristopher Ferris unsigned char has_ctrl167:1; 560*a248dafdSChristopher Ferris unsigned char has_ctrl168:1; 561*a248dafdSChristopher Ferris unsigned char has_query43:1; 562*a248dafdSChristopher Ferris } __attribute__((packed)); 563*a248dafdSChristopher Ferris unsigned char data[1]; 564*a248dafdSChristopher Ferris }; 565*a248dafdSChristopher Ferris }; 566*a248dafdSChristopher Ferris 567*a248dafdSChristopher Ferris struct f54_query_43 { 568*a248dafdSChristopher Ferris union { 569*a248dafdSChristopher Ferris struct { 570*a248dafdSChristopher Ferris unsigned char f54_query43_b0__1:2; 571*a248dafdSChristopher Ferris unsigned char has_ctrl171:1; 572*a248dafdSChristopher Ferris unsigned char has_ctrl172_query44_query45:1; 573*a248dafdSChristopher Ferris unsigned char has_ctrl173:1; 574*a248dafdSChristopher Ferris unsigned char has_ctrl174:1; 575*a248dafdSChristopher Ferris unsigned char has_ctrl175:1; 576*a248dafdSChristopher Ferris unsigned char has_query46:1; 577*a248dafdSChristopher Ferris } __attribute__((packed)); 578*a248dafdSChristopher Ferris unsigned char data[1]; 579*a248dafdSChristopher Ferris }; 580*a248dafdSChristopher Ferris }; 581*a248dafdSChristopher Ferris 582*a248dafdSChristopher Ferris struct f54_query_46 { 583*a248dafdSChristopher Ferris union { 584*a248dafdSChristopher Ferris struct { 585*a248dafdSChristopher Ferris unsigned char has_ctrl176:1; 586*a248dafdSChristopher Ferris unsigned char has_ctrl177_ctrl178:1; 587*a248dafdSChristopher Ferris unsigned char has_ctrl179:1; 588*a248dafdSChristopher Ferris unsigned char f54_query46_b3:1; 589*a248dafdSChristopher Ferris unsigned char has_data27:1; 590*a248dafdSChristopher Ferris unsigned char has_data28:1; 591*a248dafdSChristopher Ferris unsigned char f54_query46_b6:1; 592*a248dafdSChristopher Ferris unsigned char has_query47:1; 593*a248dafdSChristopher Ferris } __attribute__((packed)); 594*a248dafdSChristopher Ferris unsigned char data[1]; 595*a248dafdSChristopher Ferris }; 596*a248dafdSChristopher Ferris }; 597*a248dafdSChristopher Ferris 598*a248dafdSChristopher Ferris struct f54_query_47 { 599*a248dafdSChristopher Ferris union { 600*a248dafdSChristopher Ferris struct { 601*a248dafdSChristopher Ferris unsigned char f54_query47_b0:1; 602*a248dafdSChristopher Ferris unsigned char has_ctrl182:1; 603*a248dafdSChristopher Ferris unsigned char has_ctrl183:1; 604*a248dafdSChristopher Ferris unsigned char f54_query47_b3:1; 605*a248dafdSChristopher Ferris unsigned char has_ctrl185:1; 606*a248dafdSChristopher Ferris unsigned char has_ctrl186:1; 607*a248dafdSChristopher Ferris unsigned char has_ctrl187:1; 608*a248dafdSChristopher Ferris unsigned char has_query49:1; 609*a248dafdSChristopher Ferris } __attribute__((packed)); 610*a248dafdSChristopher Ferris unsigned char data[1]; 611*a248dafdSChristopher Ferris }; 612*a248dafdSChristopher Ferris }; 613*a248dafdSChristopher Ferris 614*a248dafdSChristopher Ferris struct f54_query_49 { 615*a248dafdSChristopher Ferris union { 616*a248dafdSChristopher Ferris struct { 617*a248dafdSChristopher Ferris unsigned char f54_query49_b0__1:2; 618*a248dafdSChristopher Ferris unsigned char has_ctrl188:1; 619*a248dafdSChristopher Ferris unsigned char has_data31:1; 620*a248dafdSChristopher Ferris unsigned char f54_query49_b4__6:3; 621*a248dafdSChristopher Ferris unsigned char has_query50:1; 622*a248dafdSChristopher Ferris } __attribute__((packed)); 623*a248dafdSChristopher Ferris unsigned char data[1]; 624*a248dafdSChristopher Ferris }; 625*a248dafdSChristopher Ferris }; 626*a248dafdSChristopher Ferris 627*a248dafdSChristopher Ferris struct f54_query_50 { 628*a248dafdSChristopher Ferris union { 629*a248dafdSChristopher Ferris struct { 630*a248dafdSChristopher Ferris unsigned char f54_query50_b0__6:7; 631*a248dafdSChristopher Ferris unsigned char has_query51:1; 632*a248dafdSChristopher Ferris } __attribute__((packed)); 633*a248dafdSChristopher Ferris unsigned char data[1]; 634*a248dafdSChristopher Ferris }; 635*a248dafdSChristopher Ferris }; 636*a248dafdSChristopher Ferris 637*a248dafdSChristopher Ferris struct f54_query_51 { 638*a248dafdSChristopher Ferris union { 639*a248dafdSChristopher Ferris struct { 640*a248dafdSChristopher Ferris unsigned char f54_query51_b0__4:5; 641*a248dafdSChristopher Ferris unsigned char has_query53_query54_ctrl198:1; 642*a248dafdSChristopher Ferris unsigned char has_ctrl199:1; 643*a248dafdSChristopher Ferris unsigned char has_query55:1; 644*a248dafdSChristopher Ferris } __attribute__((packed)); 645*a248dafdSChristopher Ferris unsigned char data[1]; 646*a248dafdSChristopher Ferris }; 647*a248dafdSChristopher Ferris }; 648*a248dafdSChristopher Ferris 649*a248dafdSChristopher Ferris struct f54_query_55 { 650*a248dafdSChristopher Ferris union { 651*a248dafdSChristopher Ferris struct { 652*a248dafdSChristopher Ferris unsigned char has_query56:1; 653*a248dafdSChristopher Ferris unsigned char has_data33_data34:1; 654*a248dafdSChristopher Ferris unsigned char has_alt_report_rate:1; 655*a248dafdSChristopher Ferris unsigned char has_ctrl200:1; 656*a248dafdSChristopher Ferris unsigned char has_ctrl201_ctrl202:1; 657*a248dafdSChristopher Ferris unsigned char has_ctrl203:1; 658*a248dafdSChristopher Ferris unsigned char has_ctrl204:1; 659*a248dafdSChristopher Ferris unsigned char has_query57:1; 660*a248dafdSChristopher Ferris } __attribute__((packed)); 661*a248dafdSChristopher Ferris unsigned char data[1]; 662*a248dafdSChristopher Ferris }; 663*a248dafdSChristopher Ferris }; 664*a248dafdSChristopher Ferris 665*a248dafdSChristopher Ferris struct f54_query_57 { 666*a248dafdSChristopher Ferris union { 667*a248dafdSChristopher Ferris struct { 668*a248dafdSChristopher Ferris unsigned char has_ctrl205:1; 669*a248dafdSChristopher Ferris unsigned char has_ctrl206:1; 670*a248dafdSChristopher Ferris unsigned char has_usb_bulk_read:1; 671*a248dafdSChristopher Ferris unsigned char has_ctrl207:1; 672*a248dafdSChristopher Ferris unsigned char has_ctrl208:1; 673*a248dafdSChristopher Ferris unsigned char has_ctrl209:1; 674*a248dafdSChristopher Ferris unsigned char has_ctrl210:1; 675*a248dafdSChristopher Ferris unsigned char has_query58:1; 676*a248dafdSChristopher Ferris } __attribute__((packed)); 677*a248dafdSChristopher Ferris unsigned char data[1]; 678*a248dafdSChristopher Ferris }; 679*a248dafdSChristopher Ferris }; 680*a248dafdSChristopher Ferris 681*a248dafdSChristopher Ferris struct f54_query_58 { 682*a248dafdSChristopher Ferris union { 683*a248dafdSChristopher Ferris struct { 684*a248dafdSChristopher Ferris unsigned char has_query59:1; 685*a248dafdSChristopher Ferris unsigned char has_query60:1; 686*a248dafdSChristopher Ferris unsigned char has_ctrl211:1; 687*a248dafdSChristopher Ferris unsigned char has_ctrl212:1; 688*a248dafdSChristopher Ferris unsigned char has_hybrid_abs_tx_axis_filtering:1; 689*a248dafdSChristopher Ferris unsigned char has_hybrid_abs_tx_interpolation:1; 690*a248dafdSChristopher Ferris unsigned char has_ctrl213:1; 691*a248dafdSChristopher Ferris unsigned char has_query61:1; 692*a248dafdSChristopher Ferris } __attribute__((packed)); 693*a248dafdSChristopher Ferris unsigned char data[1]; 694*a248dafdSChristopher Ferris }; 695*a248dafdSChristopher Ferris }; 696*a248dafdSChristopher Ferris 697*a248dafdSChristopher Ferris struct f54_query_61 { 698*a248dafdSChristopher Ferris union { 699*a248dafdSChristopher Ferris struct { 700*a248dafdSChristopher Ferris unsigned char has_ctrl214:1; 701*a248dafdSChristopher Ferris unsigned char has_ctrl215_query62_query63:1; 702*a248dafdSChristopher Ferris unsigned char f54_query_61_b2:1; 703*a248dafdSChristopher Ferris unsigned char has_ctrl216:1; 704*a248dafdSChristopher Ferris unsigned char has_ctrl217:1; 705*a248dafdSChristopher Ferris unsigned char has_misc_host_ctrl:1; 706*a248dafdSChristopher Ferris unsigned char hybrid_abs_buttons:1; 707*a248dafdSChristopher Ferris unsigned char has_query64:1; 708*a248dafdSChristopher Ferris } __attribute__((packed)); 709*a248dafdSChristopher Ferris unsigned char data[1]; 710*a248dafdSChristopher Ferris }; 711*a248dafdSChristopher Ferris }; 712*a248dafdSChristopher Ferris 713*a248dafdSChristopher Ferris struct f54_query_64 { 714*a248dafdSChristopher Ferris union { 715*a248dafdSChristopher Ferris struct { 716*a248dafdSChristopher Ferris unsigned char has_ctrl101_sub1:1; 717*a248dafdSChristopher Ferris unsigned char has_ctrl220:1; 718*a248dafdSChristopher Ferris unsigned char has_ctrl221:1; 719*a248dafdSChristopher Ferris unsigned char has_ctrl222:1; 720*a248dafdSChristopher Ferris unsigned char has_ctrl219_sub1:1; 721*a248dafdSChristopher Ferris unsigned char has_ctrl103_sub3:1; 722*a248dafdSChristopher Ferris unsigned char has_ctrl224_ctrl226_ctrl227:1; 723*a248dafdSChristopher Ferris unsigned char has_query65:1; 724*a248dafdSChristopher Ferris } __attribute__((packed)); 725*a248dafdSChristopher Ferris unsigned char data[1]; 726*a248dafdSChristopher Ferris }; 727*a248dafdSChristopher Ferris }; 728*a248dafdSChristopher Ferris 729*a248dafdSChristopher Ferris struct f54_query_65 { 730*a248dafdSChristopher Ferris union { 731*a248dafdSChristopher Ferris struct { 732*a248dafdSChristopher Ferris unsigned char f54_query_65_b0__1:2; 733*a248dafdSChristopher Ferris unsigned char has_ctrl101_sub2:1; 734*a248dafdSChristopher Ferris unsigned char f54_query_65_b3__4:2; 735*a248dafdSChristopher Ferris unsigned char has_query66_ctrl231:1; 736*a248dafdSChristopher Ferris unsigned char has_ctrl232:1; 737*a248dafdSChristopher Ferris unsigned char has_query67:1; 738*a248dafdSChristopher Ferris } __attribute__((packed)); 739*a248dafdSChristopher Ferris unsigned char data[1]; 740*a248dafdSChristopher Ferris }; 741*a248dafdSChristopher Ferris }; 742*a248dafdSChristopher Ferris 743*a248dafdSChristopher Ferris struct f54_query_67 { 744*a248dafdSChristopher Ferris union { 745*a248dafdSChristopher Ferris struct { 746*a248dafdSChristopher Ferris unsigned char has_abs_doze_spatial_filter_en:1; 747*a248dafdSChristopher Ferris unsigned char has_abs_doze_avg_filter_enhancement_en:1; 748*a248dafdSChristopher Ferris unsigned char has_single_display_pulse:1; 749*a248dafdSChristopher Ferris unsigned char f54_query_67_b3__4:2; 750*a248dafdSChristopher Ferris unsigned char has_ctrl235_ctrl236:1; 751*a248dafdSChristopher Ferris unsigned char f54_query_67_b6:1; 752*a248dafdSChristopher Ferris unsigned char has_query68:1; 753*a248dafdSChristopher Ferris } __attribute__((packed)); 754*a248dafdSChristopher Ferris unsigned char data[1]; 755*a248dafdSChristopher Ferris }; 756*a248dafdSChristopher Ferris }; 757*a248dafdSChristopher Ferris 758*a248dafdSChristopher Ferris struct f54_query_68 { 759*a248dafdSChristopher Ferris union { 760*a248dafdSChristopher Ferris struct { 761*a248dafdSChristopher Ferris unsigned char f54_query_68_b0:1; 762*a248dafdSChristopher Ferris unsigned char has_ctrl238:1; 763*a248dafdSChristopher Ferris unsigned char has_ctrl238_sub1:1; 764*a248dafdSChristopher Ferris unsigned char has_ctrl238_sub2:1; 765*a248dafdSChristopher Ferris unsigned char has_ctrl239:1; 766*a248dafdSChristopher Ferris unsigned char has_freq_filter_bw_ext:1; 767*a248dafdSChristopher Ferris unsigned char is_tddi_hic:1; 768*a248dafdSChristopher Ferris unsigned char has_query69:1; 769*a248dafdSChristopher Ferris } __attribute__((packed)); 770*a248dafdSChristopher Ferris unsigned char data[1]; 771*a248dafdSChristopher Ferris }; 772*a248dafdSChristopher Ferris }; 773*a248dafdSChristopher Ferris 774*a248dafdSChristopher Ferris struct f54_query_69 { 775*a248dafdSChristopher Ferris union { 776*a248dafdSChristopher Ferris struct { 777*a248dafdSChristopher Ferris unsigned char has_ctrl240_sub0:1; 778*a248dafdSChristopher Ferris unsigned char has_ctrl240_sub1_sub2:1; 779*a248dafdSChristopher Ferris unsigned char has_ctrl240_sub3:1; 780*a248dafdSChristopher Ferris unsigned char has_ctrl240_sub4:1; 781*a248dafdSChristopher Ferris unsigned char f54_query_69_b4__7:4; 782*a248dafdSChristopher Ferris } __attribute__((packed)); 783*a248dafdSChristopher Ferris unsigned char data[1]; 784*a248dafdSChristopher Ferris }; 785*a248dafdSChristopher Ferris }; 786*a248dafdSChristopher Ferris 787*a248dafdSChristopher Ferris struct f54_data_31 { 788*a248dafdSChristopher Ferris union { 789*a248dafdSChristopher Ferris struct { 790*a248dafdSChristopher Ferris unsigned char is_calibration_crc:1; 791*a248dafdSChristopher Ferris unsigned char calibration_crc:1; 792*a248dafdSChristopher Ferris unsigned char short_test_row_number:5; 793*a248dafdSChristopher Ferris } __attribute__((packed)); 794*a248dafdSChristopher Ferris struct { 795*a248dafdSChristopher Ferris unsigned char data[1]; 796*a248dafdSChristopher Ferris unsigned short address; 797*a248dafdSChristopher Ferris } __attribute__((packed)); 798*a248dafdSChristopher Ferris }; 799*a248dafdSChristopher Ferris }; 800*a248dafdSChristopher Ferris 801*a248dafdSChristopher Ferris struct f54_control_7 { 802*a248dafdSChristopher Ferris union { 803*a248dafdSChristopher Ferris struct { 804*a248dafdSChristopher Ferris unsigned char cbc_cap:3; 805*a248dafdSChristopher Ferris unsigned char cbc_polarity:1; 806*a248dafdSChristopher Ferris unsigned char cbc_tx_carrier_selection:1; 807*a248dafdSChristopher Ferris unsigned char f54_ctrl7_b5__7:3; 808*a248dafdSChristopher Ferris } __attribute__((packed)); 809*a248dafdSChristopher Ferris struct { 810*a248dafdSChristopher Ferris unsigned char data[1]; 811*a248dafdSChristopher Ferris unsigned short address; 812*a248dafdSChristopher Ferris } __attribute__((packed)); 813*a248dafdSChristopher Ferris }; 814*a248dafdSChristopher Ferris }; 815*a248dafdSChristopher Ferris 816*a248dafdSChristopher Ferris struct f54_control_41 { 817*a248dafdSChristopher Ferris union { 818*a248dafdSChristopher Ferris struct { 819*a248dafdSChristopher Ferris unsigned char no_signal_clarity:1; 820*a248dafdSChristopher Ferris unsigned char f54_ctrl41_b1__7:7; 821*a248dafdSChristopher Ferris } __attribute__((packed)); 822*a248dafdSChristopher Ferris struct { 823*a248dafdSChristopher Ferris unsigned char data[1]; 824*a248dafdSChristopher Ferris unsigned short address; 825*a248dafdSChristopher Ferris } __attribute__((packed)); 826*a248dafdSChristopher Ferris }; 827*a248dafdSChristopher Ferris }; 828*a248dafdSChristopher Ferris 829*a248dafdSChristopher Ferris struct f54_control_57 { 830*a248dafdSChristopher Ferris union { 831*a248dafdSChristopher Ferris struct { 832*a248dafdSChristopher Ferris unsigned char cbc_cap:3; 833*a248dafdSChristopher Ferris unsigned char cbc_polarity:1; 834*a248dafdSChristopher Ferris unsigned char cbc_tx_carrier_selection:1; 835*a248dafdSChristopher Ferris unsigned char f54_ctrl57_b5__7:3; 836*a248dafdSChristopher Ferris } __attribute__((packed)); 837*a248dafdSChristopher Ferris struct { 838*a248dafdSChristopher Ferris unsigned char data[1]; 839*a248dafdSChristopher Ferris unsigned short address; 840*a248dafdSChristopher Ferris } __attribute__((packed)); 841*a248dafdSChristopher Ferris }; 842*a248dafdSChristopher Ferris }; 843*a248dafdSChristopher Ferris 844*a248dafdSChristopher Ferris struct f54_control_88 { 845*a248dafdSChristopher Ferris union { 846*a248dafdSChristopher Ferris struct { 847*a248dafdSChristopher Ferris unsigned char tx_low_reference_polarity:1; 848*a248dafdSChristopher Ferris unsigned char tx_high_reference_polarity:1; 849*a248dafdSChristopher Ferris unsigned char abs_low_reference_polarity:1; 850*a248dafdSChristopher Ferris unsigned char abs_polarity:1; 851*a248dafdSChristopher Ferris unsigned char cbc_polarity:1; 852*a248dafdSChristopher Ferris unsigned char cbc_tx_carrier_selection:1; 853*a248dafdSChristopher Ferris unsigned char charge_pump_enable:1; 854*a248dafdSChristopher Ferris unsigned char cbc_abs_auto_servo:1; 855*a248dafdSChristopher Ferris } __attribute__((packed)); 856*a248dafdSChristopher Ferris struct { 857*a248dafdSChristopher Ferris unsigned char data[1]; 858*a248dafdSChristopher Ferris unsigned short address; 859*a248dafdSChristopher Ferris } __attribute__((packed)); 860*a248dafdSChristopher Ferris }; 861*a248dafdSChristopher Ferris }; 862*a248dafdSChristopher Ferris 863*a248dafdSChristopher Ferris struct f54_control_110 { 864*a248dafdSChristopher Ferris union { 865*a248dafdSChristopher Ferris struct { 866*a248dafdSChristopher Ferris unsigned char active_stylus_rx_feedback_cap; 867*a248dafdSChristopher Ferris unsigned char active_stylus_rx_feedback_cap_reference; 868*a248dafdSChristopher Ferris unsigned char active_stylus_low_reference; 869*a248dafdSChristopher Ferris unsigned char active_stylus_high_reference; 870*a248dafdSChristopher Ferris unsigned char active_stylus_gain_control; 871*a248dafdSChristopher Ferris unsigned char active_stylus_gain_control_reference; 872*a248dafdSChristopher Ferris unsigned char active_stylus_timing_mode; 873*a248dafdSChristopher Ferris unsigned char active_stylus_discovery_bursts; 874*a248dafdSChristopher Ferris unsigned char active_stylus_detection_bursts; 875*a248dafdSChristopher Ferris unsigned char active_stylus_discovery_noise_multiplier; 876*a248dafdSChristopher Ferris unsigned char active_stylus_detection_envelope_min; 877*a248dafdSChristopher Ferris unsigned char active_stylus_detection_envelope_max; 878*a248dafdSChristopher Ferris unsigned char active_stylus_lose_count; 879*a248dafdSChristopher Ferris } __attribute__((packed)); 880*a248dafdSChristopher Ferris struct { 881*a248dafdSChristopher Ferris unsigned char data[13]; 882*a248dafdSChristopher Ferris unsigned short address; 883*a248dafdSChristopher Ferris } __attribute__((packed)); 884*a248dafdSChristopher Ferris }; 885*a248dafdSChristopher Ferris }; 886*a248dafdSChristopher Ferris 887*a248dafdSChristopher Ferris struct f54_control_149 { 888*a248dafdSChristopher Ferris union { 889*a248dafdSChristopher Ferris struct { 890*a248dafdSChristopher Ferris unsigned char trans_cbc_global_cap_enable:1; 891*a248dafdSChristopher Ferris unsigned char f54_ctrl49_b1__7:7; 892*a248dafdSChristopher Ferris } __attribute__((packed)); 893*a248dafdSChristopher Ferris struct { 894*a248dafdSChristopher Ferris unsigned char data[1]; 895*a248dafdSChristopher Ferris unsigned short address; 896*a248dafdSChristopher Ferris } __attribute__((packed)); 897*a248dafdSChristopher Ferris }; 898*a248dafdSChristopher Ferris }; 899*a248dafdSChristopher Ferris 900*a248dafdSChristopher Ferris struct f54_control_188 { 901*a248dafdSChristopher Ferris union { 902*a248dafdSChristopher Ferris struct { 903*a248dafdSChristopher Ferris unsigned char start_calibration:1; 904*a248dafdSChristopher Ferris unsigned char start_is_calibration:1; 905*a248dafdSChristopher Ferris unsigned char frequency:2; 906*a248dafdSChristopher Ferris unsigned char start_production_test:1; 907*a248dafdSChristopher Ferris unsigned char short_test_calibration:1; 908*a248dafdSChristopher Ferris unsigned char f54_ctrl188_b7:1; 909*a248dafdSChristopher Ferris } __attribute__((packed)); 910*a248dafdSChristopher Ferris struct { 911*a248dafdSChristopher Ferris unsigned char data[1]; 912*a248dafdSChristopher Ferris unsigned short address; 913*a248dafdSChristopher Ferris } __attribute__((packed)); 914*a248dafdSChristopher Ferris }; 915*a248dafdSChristopher Ferris }; 916*a248dafdSChristopher Ferris 917*a248dafdSChristopher Ferris struct f54_control { 918*a248dafdSChristopher Ferris struct f54_control_7 reg_7; 919*a248dafdSChristopher Ferris struct f54_control_41 reg_41; 920*a248dafdSChristopher Ferris struct f54_control_57 reg_57; 921*a248dafdSChristopher Ferris struct f54_control_88 reg_88; 922*a248dafdSChristopher Ferris struct f54_control_110 reg_110; 923*a248dafdSChristopher Ferris struct f54_control_149 reg_149; 924*a248dafdSChristopher Ferris struct f54_control_188 reg_188; 925*a248dafdSChristopher Ferris }; 926*a248dafdSChristopher Ferris 927*a248dafdSChristopher Ferris 928*a248dafdSChristopher Ferris struct f55_query { 929*a248dafdSChristopher Ferris union { 930*a248dafdSChristopher Ferris struct { 931*a248dafdSChristopher Ferris /* query 0 */ 932*a248dafdSChristopher Ferris unsigned char num_of_rx_electrodes; 933*a248dafdSChristopher Ferris 934*a248dafdSChristopher Ferris /* query 1 */ 935*a248dafdSChristopher Ferris unsigned char num_of_tx_electrodes; 936*a248dafdSChristopher Ferris 937*a248dafdSChristopher Ferris /* query 2 */ 938*a248dafdSChristopher Ferris unsigned char has_sensor_assignment:1; 939*a248dafdSChristopher Ferris unsigned char has_edge_compensation:1; 940*a248dafdSChristopher Ferris unsigned char curve_compensation_mode:2; 941*a248dafdSChristopher Ferris unsigned char has_ctrl6:1; 942*a248dafdSChristopher Ferris unsigned char has_alternate_transmitter_assignment:1; 943*a248dafdSChristopher Ferris unsigned char has_single_layer_multi_touch:1; 944*a248dafdSChristopher Ferris unsigned char has_query5:1; 945*a248dafdSChristopher Ferris } __attribute__((packed)); 946*a248dafdSChristopher Ferris unsigned char data[3]; 947*a248dafdSChristopher Ferris }; 948*a248dafdSChristopher Ferris }; 949*a248dafdSChristopher Ferris 950*a248dafdSChristopher Ferris class Display; 951*a248dafdSChristopher Ferris 952*a248dafdSChristopher Ferris class F54Test 953*a248dafdSChristopher Ferris { 954*a248dafdSChristopher Ferris public: F54Test(RMIDevice & device,Display & display)955*a248dafdSChristopher Ferris F54Test(RMIDevice & device, Display & display) 956*a248dafdSChristopher Ferris : m_device(device), 957*a248dafdSChristopher Ferris m_reportType(INVALID_REPORT_TYPE), 958*a248dafdSChristopher Ferris m_txAssignment(NULL), 959*a248dafdSChristopher Ferris m_rxAssignment(NULL), 960*a248dafdSChristopher Ferris m_reportBufferSize(0), 961*a248dafdSChristopher Ferris m_reportData(NULL), 962*a248dafdSChristopher Ferris m_display(display) 963*a248dafdSChristopher Ferris {} 964*a248dafdSChristopher Ferris ~F54Test(); 965*a248dafdSChristopher Ferris int Prepare(f54_report_types reportType); 966*a248dafdSChristopher Ferris int Run(); 967*a248dafdSChristopher Ferris 968*a248dafdSChristopher Ferris private: 969*a248dafdSChristopher Ferris int FindTestFunctions(); 970*a248dafdSChristopher Ferris int ReadF54Queries(); 971*a248dafdSChristopher Ferris int ReadF55Queries(); 972*a248dafdSChristopher Ferris int SetupF54Controls(); 973*a248dafdSChristopher Ferris int SetF54ReportType(f54_report_types report_type); 974*a248dafdSChristopher Ferris int SetF54ReportSize(f54_report_types report_type); 975*a248dafdSChristopher Ferris int SetF54Interrupt(); 976*a248dafdSChristopher Ferris int DoF54Command(unsigned char command); 977*a248dafdSChristopher Ferris int WaitForF54CommandCompletion(); 978*a248dafdSChristopher Ferris int ReadF54Report(); 979*a248dafdSChristopher Ferris int ShowF54Report(); 980*a248dafdSChristopher Ferris int DoPreparation(); 981*a248dafdSChristopher Ferris 982*a248dafdSChristopher Ferris private: 983*a248dafdSChristopher Ferris RMIDevice & m_device; 984*a248dafdSChristopher Ferris 985*a248dafdSChristopher Ferris RMIFunction m_f01; 986*a248dafdSChristopher Ferris RMIFunction m_f54; 987*a248dafdSChristopher Ferris RMIFunction m_f55; 988*a248dafdSChristopher Ferris 989*a248dafdSChristopher Ferris f54_query m_f54Query; 990*a248dafdSChristopher Ferris f54_query_13 m_f54Query_13; 991*a248dafdSChristopher Ferris f54_query_15 m_f54Query_15; 992*a248dafdSChristopher Ferris f54_query_16 m_f54Query_16; 993*a248dafdSChristopher Ferris f54_query_21 m_f54Query_21; 994*a248dafdSChristopher Ferris f54_query_22 m_f54Query_22; 995*a248dafdSChristopher Ferris f54_query_23 m_f54Query_23; 996*a248dafdSChristopher Ferris f54_query_25 m_f54Query_25; 997*a248dafdSChristopher Ferris f54_query_27 m_f54Query_27; 998*a248dafdSChristopher Ferris f54_query_29 m_f54Query_29; 999*a248dafdSChristopher Ferris f54_query_30 m_f54Query_30; 1000*a248dafdSChristopher Ferris f54_query_32 m_f54Query_32; 1001*a248dafdSChristopher Ferris f54_query_33 m_f54Query_33; 1002*a248dafdSChristopher Ferris f54_query_35 m_f54Query_35; 1003*a248dafdSChristopher Ferris f54_query_36 m_f54Query_36; 1004*a248dafdSChristopher Ferris f54_query_38 m_f54Query_38; 1005*a248dafdSChristopher Ferris f54_query_39 m_f54Query_39; 1006*a248dafdSChristopher Ferris f54_query_40 m_f54Query_40; 1007*a248dafdSChristopher Ferris f54_query_43 m_f54Query_43; 1008*a248dafdSChristopher Ferris f54_query_46 m_f54Query_46; 1009*a248dafdSChristopher Ferris f54_query_47 m_f54Query_47; 1010*a248dafdSChristopher Ferris f54_query_49 m_f54Query_49; 1011*a248dafdSChristopher Ferris f54_query_50 m_f54Query_50; 1012*a248dafdSChristopher Ferris f54_query_51 m_f54Query_51; 1013*a248dafdSChristopher Ferris f54_query_55 m_f54Query_55; 1014*a248dafdSChristopher Ferris f54_query_57 m_f54Query_57; 1015*a248dafdSChristopher Ferris f54_query_58 m_f54Query_58; 1016*a248dafdSChristopher Ferris f54_query_61 m_f54Query_61; 1017*a248dafdSChristopher Ferris f54_query_64 m_f54Query_64; 1018*a248dafdSChristopher Ferris f54_query_65 m_f54Query_65; 1019*a248dafdSChristopher Ferris f54_query_67 m_f54Query_67; 1020*a248dafdSChristopher Ferris f54_query_68 m_f54Query_68; 1021*a248dafdSChristopher Ferris f54_query_69 m_f54Query_69; 1022*a248dafdSChristopher Ferris 1023*a248dafdSChristopher Ferris f54_control m_f54Control; 1024*a248dafdSChristopher Ferris f54_data_31 m_f54Data_31; 1025*a248dafdSChristopher Ferris f55_query m_f55Query; 1026*a248dafdSChristopher Ferris 1027*a248dafdSChristopher Ferris f54_report_types m_reportType; 1028*a248dafdSChristopher Ferris unsigned int m_reportSize; 1029*a248dafdSChristopher Ferris 1030*a248dafdSChristopher Ferris unsigned char *m_txAssignment; 1031*a248dafdSChristopher Ferris unsigned char *m_rxAssignment; 1032*a248dafdSChristopher Ferris unsigned char m_txAssigned; 1033*a248dafdSChristopher Ferris unsigned char m_rxAssigned; 1034*a248dafdSChristopher Ferris 1035*a248dafdSChristopher Ferris unsigned int m_reportBufferSize; 1036*a248dafdSChristopher Ferris unsigned char *m_reportData; 1037*a248dafdSChristopher Ferris 1038*a248dafdSChristopher Ferris Display & m_display; 1039*a248dafdSChristopher Ferris }; 1040*a248dafdSChristopher Ferris 1041*a248dafdSChristopher Ferris #endif // _F54TEST_H_ 1042