hid-uclogic-params.h (1324c5ac76bf7dccdac0fb128d0a675e1ee21b39) | hid-uclogic-params.h (606dadc1878f2fdeaa6e435c9c83f58a01387a7d) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * HID driver for UC-Logic devices not fully compliant with HID standard 4 * - tablet initialization and parameter retrieval 5 * 6 * Copyright (c) 2018 Nikolai Kondrashov 7 */ 8 --- 125 unchanged lines hidden (view full) --- 134 */ 135 __u8 *desc_ptr; 136 /* 137 * Size of the common part of the replacement report descriptor. 138 * Only valid, if "desc_ptr" is not NULL. 139 */ 140 unsigned int desc_size; 141 /* | 1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * HID driver for UC-Logic devices not fully compliant with HID standard 4 * - tablet initialization and parameter retrieval 5 * 6 * Copyright (c) 2018 Nikolai Kondrashov 7 */ 8 --- 125 unchanged lines hidden (view full) --- 134 */ 135 __u8 *desc_ptr; 136 /* 137 * Size of the common part of the replacement report descriptor. 138 * Only valid, if "desc_ptr" is not NULL. 139 */ 140 unsigned int desc_size; 141 /* |
142 * True, if pen usage in report descriptor is invalid, when present. | 142 * Pen parameters and optional report descriptor part. |
143 * Only valid, if "invalid" is false. 144 */ | 143 * Only valid, if "invalid" is false. 144 */ |
145 bool pen_unused; 146 /* 147 * Pen parameters and optional report descriptor part. 148 * Only valid if "pen_unused" is valid and false. 149 */ | |
150 struct uclogic_params_pen pen; 151 /* 152 * Frame control parameters and optional report descriptor part. 153 * Only valid, if "invalid" is false. 154 */ 155 struct uclogic_params_frame frame; 156 /* 157 * Bitmask matching frame controls "sub-report" flag in the second --- 8 unchanged lines hidden (view full) --- 166extern int uclogic_params_init(struct uclogic_params *params, 167 struct hid_device *hdev); 168 169/* Tablet interface parameters *printf format string */ 170#define UCLOGIC_PARAMS_FMT_STR \ 171 ".invalid = %s\n" \ 172 ".desc_ptr = %p\n" \ 173 ".desc_size = %u\n" \ | 145 struct uclogic_params_pen pen; 146 /* 147 * Frame control parameters and optional report descriptor part. 148 * Only valid, if "invalid" is false. 149 */ 150 struct uclogic_params_frame frame; 151 /* 152 * Bitmask matching frame controls "sub-report" flag in the second --- 8 unchanged lines hidden (view full) --- 161extern int uclogic_params_init(struct uclogic_params *params, 162 struct hid_device *hdev); 163 164/* Tablet interface parameters *printf format string */ 165#define UCLOGIC_PARAMS_FMT_STR \ 166 ".invalid = %s\n" \ 167 ".desc_ptr = %p\n" \ 168 ".desc_size = %u\n" \ |
174 ".pen_unused = %s\n" \ | |
175 ".pen.desc_ptr = %p\n" \ 176 ".pen.desc_size = %u\n" \ 177 ".pen.id = %u\n" \ 178 ".pen.inrange = %s\n" \ 179 ".pen.fragmented_hires = %s\n" \ 180 ".pen.tilt_y_flipped = %s\n" \ 181 ".frame.desc_ptr = %p\n" \ 182 ".frame.desc_size = %u\n" \ 183 ".frame.id = %u\n" \ 184 ".frame.re_lsb = %u\n" \ 185 ".frame.dev_id_byte = %u\n" \ 186 ".pen_frame_flag = 0x%02x\n" 187 188/* Tablet interface parameters *printf format arguments */ 189#define UCLOGIC_PARAMS_FMT_ARGS(_params) \ 190 ((_params)->invalid ? "true" : "false"), \ 191 (_params)->desc_ptr, \ 192 (_params)->desc_size, \ | 169 ".pen.desc_ptr = %p\n" \ 170 ".pen.desc_size = %u\n" \ 171 ".pen.id = %u\n" \ 172 ".pen.inrange = %s\n" \ 173 ".pen.fragmented_hires = %s\n" \ 174 ".pen.tilt_y_flipped = %s\n" \ 175 ".frame.desc_ptr = %p\n" \ 176 ".frame.desc_size = %u\n" \ 177 ".frame.id = %u\n" \ 178 ".frame.re_lsb = %u\n" \ 179 ".frame.dev_id_byte = %u\n" \ 180 ".pen_frame_flag = 0x%02x\n" 181 182/* Tablet interface parameters *printf format arguments */ 183#define UCLOGIC_PARAMS_FMT_ARGS(_params) \ 184 ((_params)->invalid ? "true" : "false"), \ 185 (_params)->desc_ptr, \ 186 (_params)->desc_size, \ |
193 ((_params)->pen_unused ? "true" : "false"), \ | |
194 (_params)->pen.desc_ptr, \ 195 (_params)->pen.desc_size, \ 196 (_params)->pen.id, \ 197 uclogic_params_pen_inrange_to_str((_params)->pen.inrange), \ 198 ((_params)->pen.fragmented_hires ? "true" : "false"), \ 199 ((_params)->pen.tilt_y_flipped ? "true" : "false"), \ 200 (_params)->frame.desc_ptr, \ 201 (_params)->frame.desc_size, \ --- 14 unchanged lines hidden --- | 187 (_params)->pen.desc_ptr, \ 188 (_params)->pen.desc_size, \ 189 (_params)->pen.id, \ 190 uclogic_params_pen_inrange_to_str((_params)->pen.inrange), \ 191 ((_params)->pen.fragmented_hires ? "true" : "false"), \ 192 ((_params)->pen.tilt_y_flipped ? "true" : "false"), \ 193 (_params)->frame.desc_ptr, \ 194 (_params)->frame.desc_size, \ --- 14 unchanged lines hidden --- |