Skip to content

Commit 7b7e662

Browse files
committed
uclogic: Support two frame devices
1 parent 75fcbb8 commit 7b7e662

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

hid-uclogic-params.h

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ struct uclogic_params {
194194
* The list of frame control parameters and optional report descriptor
195195
* parts. Only valid, if "invalid" is false.
196196
*/
197-
struct uclogic_params_frame frame_list[1];
197+
struct uclogic_params_frame frame_list[2];
198198
};
199199

200200
/* Initialize a tablet interface and discover its parameters */
@@ -222,7 +222,16 @@ extern int uclogic_params_init(struct uclogic_params *params,
222222
".frame_list[0].dev_id_byte = %u\n" \
223223
".frame_list[0].touch_ring_byte = %u\n" \
224224
".frame_list[0].touch_ring_max = %hhd\n" \
225-
".frame_list[0].touch_ring_flip_at = %hhd\n"
225+
".frame_list[0].touch_ring_flip_at = %hhd\n" \
226+
".frame_list[1].desc_ptr = %p\n" \
227+
".frame_list[1].desc_size = %u\n" \
228+
".frame_list[1].id = %u\n" \
229+
".frame_list[1].suffix = %s\n" \
230+
".frame_list[1].re_lsb = %u\n" \
231+
".frame_list[1].dev_id_byte = %u\n" \
232+
".frame_list[1].touch_ring_byte = %u\n" \
233+
".frame_list[1].touch_ring_max = %hhd\n" \
234+
".frame_list[1].touch_ring_flip_at = %hhd\n"
226235

227236
/* Tablet interface parameters *printf format arguments */
228237
#define UCLOGIC_PARAMS_FMT_ARGS(_params) \
@@ -247,7 +256,16 @@ extern int uclogic_params_init(struct uclogic_params *params,
247256
(_params)->frame_list[0].dev_id_byte, \
248257
(_params)->frame_list[0].touch_ring_byte, \
249258
(_params)->frame_list[0].touch_ring_max, \
250-
(_params)->frame_list[0].touch_ring_flip_at
259+
(_params)->frame_list[0].touch_ring_flip_at, \
260+
(_params)->frame_list[1].desc_ptr, \
261+
(_params)->frame_list[1].desc_size, \
262+
(_params)->frame_list[1].id, \
263+
(_params)->frame_list[1].suffix, \
264+
(_params)->frame_list[1].re_lsb, \
265+
(_params)->frame_list[1].dev_id_byte, \
266+
(_params)->frame_list[1].touch_ring_byte, \
267+
(_params)->frame_list[1].touch_ring_max, \
268+
(_params)->frame_list[1].touch_ring_flip_at
251269

252270
/* Get a replacement report descriptor for a tablet's interface. */
253271
extern int uclogic_params_get_desc(const struct uclogic_params *params,

0 commit comments

Comments
 (0)