@@ -652,12 +652,12 @@ const size_t uclogic_rdesc_v2_pen_template_size =
652652 sizeof (uclogic_rdesc_v2_pen_template_arr );
653653
654654/**
655- * Expand to the contents of a generic frame report descriptor.
655+ * Expand to the contents of a generic frame buttons report descriptor.
656656 *
657657 * @_id: The report ID to use.
658658 * @_size: Size of the report to pad to, including report ID, bytes.
659659 */
660- #define UCLOGIC_RDESC_FRAME_BYTES (_id , _size ) \
660+ #define UCLOGIC_RDESC_FRAME_BUTTONS_BYTES (_id , _size ) \
661661 0x05, 0x01, /* Usage Page (Desktop), */ \
662662 0x09 , 0x07 , /* Usage (Keypad), */ \
663663 0xA1 , 0x01 , /* Collection (Application), */ \
@@ -700,17 +700,66 @@ const size_t uclogic_rdesc_v2_pen_template_size =
700700
701701/* Fixed report descriptor for (tweaked) v1 frame reports */
702702const __u8 uclogic_rdesc_v1_frame_arr [] = {
703- UCLOGIC_RDESC_FRAME_BYTES (UCLOGIC_RDESC_V1_FRAME_ID , 8 )
703+ UCLOGIC_RDESC_FRAME_BUTTONS_BYTES (UCLOGIC_RDESC_V1_FRAME_ID , 8 )
704704};
705705const size_t uclogic_rdesc_v1_frame_size =
706706 sizeof (uclogic_rdesc_v1_frame_arr );
707707
708- /* Fixed report descriptor for (tweaked) v2 frame reports */
709- const __u8 uclogic_rdesc_v2_frame_arr [] = {
710- UCLOGIC_RDESC_FRAME_BYTES (UCLOGIC_RDESC_V2_FRAME_ID , 12 )
708+ /* Fixed report descriptor for (tweaked) v2 frame button reports */
709+ const __u8 uclogic_rdesc_v2_frame_buttons_arr [] = {
710+ UCLOGIC_RDESC_FRAME_BUTTONS_BYTES (UCLOGIC_RDESC_V2_FRAME_BUTTONS_ID ,
711+ 12 )
711712};
712- const size_t uclogic_rdesc_v2_frame_size =
713- sizeof (uclogic_rdesc_v2_frame_arr );
713+ const size_t uclogic_rdesc_v2_frame_buttons_size =
714+ sizeof (uclogic_rdesc_v2_frame_buttons_arr );
715+
716+ /* Fixed report descriptor for (tweaked) v2 frame dial reports */
717+ const __u8 uclogic_rdesc_v2_frame_dial_arr [] = {
718+ 0x05 , 0x01 , /* Usage Page (Desktop), */
719+ 0x09 , 0x07 , /* Usage (Keypad), */
720+ 0xA1 , 0x01 , /* Collection (Application), */
721+ 0x85 , UCLOGIC_RDESC_V2_FRAME_DIAL_ID ,
722+ /* Report ID (DIAL_ID), */
723+ 0x14 , /* Logical Minimum (0), */
724+ 0x05 , 0x0D , /* Usage Page (Digitizer), */
725+ 0x09 , 0x39 , /* Usage (Tablet Function Keys), */
726+ 0xA0 , /* Collection (Physical), */
727+ 0x25 , 0x01 , /* Logical Maximum (1), */
728+ 0x75 , 0x01 , /* Report Size (1), */
729+ 0x05 , 0x09 , /* Usage Page (Button), */
730+ 0x09 , 0x01 , /* Usage (01h), */
731+ 0x95 , 0x01 , /* Report Count (1), */
732+ 0x81 , 0x02 , /* Input (Variable), */
733+ 0x95 , 0x07 , /* Report Count (7), */
734+ 0x81 , 0x01 , /* Input (Constant), */
735+ 0x75 , 0x08 , /* Report Size (8), */
736+ 0x95 , 0x02 , /* Report Count (2), */
737+ 0x81 , 0x01 , /* Input (Constant), */
738+ 0x05 , 0x0D , /* Usage Page (Digitizer), */
739+ 0x0A , 0xFF , 0xFF , /* Usage (FFFFh), */
740+ 0x26 , 0xFF , 0x00 , /* Logical Maximum (255), */
741+ 0x95 , 0x01 , /* Report Count (1), */
742+ 0x81 , 0x02 , /* Input (Variable), */
743+ 0x05 , 0x01 , /* Usage Page (Desktop), */
744+ 0x09 , 0x38 , /* Usage (Wheel), */
745+ 0x95 , 0x01 , /* Report Count (1), */
746+ 0x15 , 0x00 , /* Logical Minimum (0), */
747+ 0x25 , 0x0B , /* Logical Maximum (11), */
748+ 0x81 , 0x02 , /* Input (Variable), */
749+ 0x09 , 0x30 , /* Usage (X), */
750+ 0x09 , 0x31 , /* Usage (Y), */
751+ 0x14 , /* Logical Minimum (0), */
752+ 0x25 , 0x01 , /* Logical Maximum (1), */
753+ 0x75 , 0x01 , /* Report Size (1), */
754+ 0x95 , 0x02 , /* Report Count (2), */
755+ 0x81 , 0x02 , /* Input (Variable), */
756+ 0x95 , 0x2E , /* Report Count (46), */
757+ 0x81 , 0x01 , /* Input (Constant), */
758+ 0xC0 , /* End Collection, */
759+ 0xC0 /* End Collection */
760+ };
761+ const size_t uclogic_rdesc_v2_frame_dial_size =
762+ sizeof (uclogic_rdesc_v2_frame_dial_arr );
714763
715764/* Fixed report descriptor for Ugee EX07 frame */
716765const __u8 uclogic_rdesc_ugee_ex07_frame_arr [] = {
0 commit comments