hid-uclogic-params.h (597473720f4dc69749542bfcfed4a927a43d935e) | hid-uclogic-params.h (1324c5ac76bf7dccdac0fb128d0a675e1ee21b39) |
---|---|
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 --- 48 unchanged lines hidden (view full) --- 57 /* Type of in-range reporting, only valid if "id" is not zero */ 58 enum uclogic_params_pen_inrange inrange; 59 /* 60 * True, if reports include fragmented high resolution coords, with 61 * high-order X and then Y bytes following the pressure field. 62 * Only valid if "id" is not zero. 63 */ 64 bool fragmented_hires; | 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 --- 48 unchanged lines hidden (view full) --- 57 /* Type of in-range reporting, only valid if "id" is not zero */ 58 enum uclogic_params_pen_inrange inrange; 59 /* 60 * True, if reports include fragmented high resolution coords, with 61 * high-order X and then Y bytes following the pressure field. 62 * Only valid if "id" is not zero. 63 */ 64 bool fragmented_hires; |
65 /* 66 * True if the pen reports tilt in bytes at offset 10 (X) and 11 (Y), 67 * and the Y tilt direction is flipped. 68 * Only valid if "id" is not zero. 69 */ 70 bool tilt_y_flipped; |
|
65}; 66 67/* 68 * Parameters of frame control inputs of a tablet interface. 69 * 70 * Must use declarative (descriptive) language, not imperative, to simplify 71 * understanding and maintain consistency. 72 * --- 93 unchanged lines hidden (view full) --- 166 ".desc_ptr = %p\n" \ 167 ".desc_size = %u\n" \ 168 ".pen_unused = %s\n" \ 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" \ | 71}; 72 73/* 74 * Parameters of frame control inputs of a tablet interface. 75 * 76 * Must use declarative (descriptive) language, not imperative, to simplify 77 * understanding and maintain consistency. 78 * --- 93 unchanged lines hidden (view full) --- 172 ".desc_ptr = %p\n" \ 173 ".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" \ |
|
174 ".frame.desc_ptr = %p\n" \ 175 ".frame.desc_size = %u\n" \ 176 ".frame.id = %u\n" \ 177 ".frame.re_lsb = %u\n" \ 178 ".frame.dev_id_byte = %u\n" \ 179 ".pen_frame_flag = 0x%02x\n" 180 181/* Tablet interface parameters *printf format arguments */ 182#define UCLOGIC_PARAMS_FMT_ARGS(_params) \ 183 ((_params)->invalid ? "true" : "false"), \ 184 (_params)->desc_ptr, \ 185 (_params)->desc_size, \ 186 ((_params)->pen_unused ? "true" : "false"), \ 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"), \ | 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, \ 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"), \ |
|
192 (_params)->frame.desc_ptr, \ 193 (_params)->frame.desc_size, \ 194 (_params)->frame.id, \ 195 (_params)->frame.re_lsb, \ 196 (_params)->frame.dev_id_byte, \ 197 (_params)->pen_frame_flag 198 199/* Get a replacement report descriptor for a tablet's interface. */ 200extern int uclogic_params_get_desc(const struct uclogic_params *params, 201 __u8 **pdesc, 202 unsigned int *psize); 203 204/* Free resources used by tablet interface's parameters */ 205extern void uclogic_params_cleanup(struct uclogic_params *params); 206 207#endif /* _HID_UCLOGIC_PARAMS_H */ | 200 (_params)->frame.desc_ptr, \ 201 (_params)->frame.desc_size, \ 202 (_params)->frame.id, \ 203 (_params)->frame.re_lsb, \ 204 (_params)->frame.dev_id_byte, \ 205 (_params)->pen_frame_flag 206 207/* Get a replacement report descriptor for a tablet's interface. */ 208extern int uclogic_params_get_desc(const struct uclogic_params *params, 209 __u8 **pdesc, 210 unsigned int *psize); 211 212/* Free resources used by tablet interface's parameters */ 213extern void uclogic_params_cleanup(struct uclogic_params *params); 214 215#endif /* _HID_UCLOGIC_PARAMS_H */ |