Skip to content

Commit 3630d38

Browse files
committed
uclogic: Compress params format string
Shorten the format string for printing out UC-Logic interface parameters so that it fits into a single log message.
1 parent 432be83 commit 3630d38

1 file changed

Lines changed: 51 additions & 39 deletions

File tree

hid-uclogic-params.h

Lines changed: 51 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -203,45 +203,57 @@ extern int uclogic_params_init(struct uclogic_params *params,
203203

204204
/* Tablet interface parameters *printf format string */
205205
#define UCLOGIC_PARAMS_FMT_STR \
206-
".invalid = %s\n" \
207-
".desc_ptr = %p\n" \
208-
".desc_size = %u\n" \
209-
".pen.desc_ptr = %p\n" \
210-
".pen.desc_size = %u\n" \
211-
".pen.id = %u\n" \
212-
".pen.subreport_list[0] = {0x%02hhx, %hhu}\n" \
213-
".pen.subreport_list[1] = {0x%02hhx, %hhu}\n" \
214-
".pen.subreport_list[2] = {0x%02hhx, %hhu}\n" \
215-
".pen.inrange = %s\n" \
216-
".pen.fragmented_hires = %s\n" \
217-
".pen.tilt_y_flipped = %s\n" \
218-
".frame_list[0].desc_ptr = %p\n" \
219-
".frame_list[0].desc_size = %u\n" \
220-
".frame_list[0].id = %u\n" \
221-
".frame_list[0].suffix = %s\n" \
222-
".frame_list[0].re_lsb = %u\n" \
223-
".frame_list[0].dev_id_byte = %u\n" \
224-
".frame_list[0].touch_ring_byte = %u\n" \
225-
".frame_list[0].touch_ring_max = %hhd\n" \
226-
".frame_list[0].touch_ring_flip_at = %hhd\n" \
227-
".frame_list[1].desc_ptr = %p\n" \
228-
".frame_list[1].desc_size = %u\n" \
229-
".frame_list[1].id = %u\n" \
230-
".frame_list[1].suffix = %s\n" \
231-
".frame_list[1].re_lsb = %u\n" \
232-
".frame_list[1].dev_id_byte = %u\n" \
233-
".frame_list[1].touch_ring_byte = %u\n" \
234-
".frame_list[1].touch_ring_max = %hhd\n" \
235-
".frame_list[1].touch_ring_flip_at = %hhd\n" \
236-
".frame_list[2].desc_ptr = %p\n" \
237-
".frame_list[2].desc_size = %u\n" \
238-
".frame_list[2].id = %u\n" \
239-
".frame_list[2].suffix = %s\n" \
240-
".frame_list[2].re_lsb = %u\n" \
241-
".frame_list[2].dev_id_byte = %u\n" \
242-
".frame_list[2].touch_ring_byte = %u\n" \
243-
".frame_list[2].touch_ring_max = %hhd\n" \
244-
".frame_list[2].touch_ring_flip_at = %hhd\n"
206+
".invalid = %s\n" \
207+
".desc_ptr = %p\n" \
208+
".desc_size = %u\n" \
209+
".pen = {\n" \
210+
"\t.desc_ptr = %p\n" \
211+
"\t.desc_size = %u\n" \
212+
"\t.id = %u\n" \
213+
"\t.subreport_list = {\n" \
214+
"\t\t{0x%02hhx, %hhu},\n" \
215+
"\t\t{0x%02hhx, %hhu},\n" \
216+
"\t\t{0x%02hhx, %hhu},\n" \
217+
"\t}\n" \
218+
"\t.inrange = %s\n" \
219+
"\t.fragmented_hires = %s\n" \
220+
"\t.tilt_y_flipped = %s\n" \
221+
"}\n" \
222+
".frame_list = {\n" \
223+
"\t{\n" \
224+
"\t\t.desc_ptr = %p\n" \
225+
"\t\t.desc_size = %u\n" \
226+
"\t\t.id = %u\n" \
227+
"\t\t.suffix = %s\n" \
228+
"\t\t.re_lsb = %u\n" \
229+
"\t\t.dev_id_byte = %u\n" \
230+
"\t\t.touch_ring_byte = %u\n" \
231+
"\t\t.touch_ring_max = %hhd\n" \
232+
"\t\t.touch_ring_flip_at = %hhd\n" \
233+
"\t},\n" \
234+
"\t{\n" \
235+
"\t\t.desc_ptr = %p\n" \
236+
"\t\t.desc_size = %u\n" \
237+
"\t\t.id = %u\n" \
238+
"\t\t.suffix = %s\n" \
239+
"\t\t.re_lsb = %u\n" \
240+
"\t\t.dev_id_byte = %u\n" \
241+
"\t\t.touch_ring_byte = %u\n" \
242+
"\t\t.touch_ring_max = %hhd\n" \
243+
"\t\t.touch_ring_flip_at = %hhd\n" \
244+
"\t},\n" \
245+
"\t{\n" \
246+
"\t\t.desc_ptr = %p\n" \
247+
"\t\t.desc_size = %u\n" \
248+
"\t\t.id = %u\n" \
249+
"\t\t.suffix = %s\n" \
250+
"\t\t.re_lsb = %u\n" \
251+
"\t\t.dev_id_byte = %u\n" \
252+
"\t\t.touch_ring_byte = %u\n" \
253+
"\t\t.touch_ring_max = %hhd\n" \
254+
"\t\t.touch_ring_flip_at = %hhd\n" \
255+
"\t},\n" \
256+
"}\n"
245257

246258
/* Tablet interface parameters *printf format arguments */
247259
#define UCLOGIC_PARAMS_FMT_ARGS(_params) \

0 commit comments

Comments
 (0)