@@ -1237,6 +1237,131 @@ const __u8 uclogic_rdesc_xppen_artist_22r_pro_frame_arr[] = {
12371237const size_t uclogic_rdesc_xppen_artist_22r_pro_frame_size =
12381238 sizeof (uclogic_rdesc_xppen_artist_22r_pro_frame_arr );
12391239
1240+ /* Fixed report descriptor template for XP-PEN 24 Pro reports
1241+ * Mostly identical to uclogic_rdesc_ugee_v2_pen_template_arr except that the X coordinate has to be
1242+ * 32-bits instead of 16-bits.
1243+ */
1244+ const __u8 uclogic_rdesc_xppen_artist_24_pro_pen_template_arr [] = {
1245+ 0x05 , 0x0d , /* Usage Page (Digitizers), */
1246+ 0x09 , 0x01 , /* Usage (Digitizer), */
1247+ 0xa1 , 0x01 , /* Collection (Application), */
1248+ 0x85 , 0x02 , /* Report ID (2), */
1249+ 0x09 , 0x20 , /* Usage (Stylus), */
1250+ 0xa1 , 0x00 , /* Collection (Physical), */
1251+ 0x09 , 0x42 , /* Usage (Tip Switch), */
1252+ 0x09 , 0x44 , /* Usage (Barrel Switch), */
1253+ 0x09 , 0x46 , /* Usage (Tablet Pick), */
1254+ 0x75 , 0x01 , /* Report Size (1), */
1255+ 0x95 , 0x03 , /* Report Count (3), */
1256+ 0x14 , /* Logical Minimum (0), */
1257+ 0x25 , 0x01 , /* Logical Maximum (1), */
1258+ 0x81 , 0x02 , /* Input (Variable), */
1259+ 0x95 , 0x02 , /* Report Count (2), */
1260+ 0x81 , 0x03 , /* Input (Constant, Variable), */
1261+ 0x09 , 0x32 , /* Usage (In Range), */
1262+ 0x95 , 0x01 , /* Report Count (1), */
1263+ 0x81 , 0x02 , /* Input (Variable), */
1264+ 0x95 , 0x02 , /* Report Count (2), */
1265+ 0x81 , 0x03 , /* Input (Constant, Variable), */
1266+ 0x75 , 0x10 , /* Report Size (16), */
1267+ 0x95 , 0x01 , /* Report Count (1), */
1268+ 0x35 , 0x00 , /* Physical Minimum (0), */
1269+ 0xa4 , /* Push, */
1270+ 0x05 , 0x01 , /* Usage Page (Desktop), */
1271+ 0x09 , 0x30 , /* Usage (X), */
1272+ 0x65 , 0x13 , /* Unit (Inch), */
1273+ 0x55 , 0x0d , /* Unit Exponent (-3), */
1274+ 0x27 , UCLOGIC_RDESC_PEN_PH (X_LM ),
1275+ /* Logical Maximum (PLACEHOLDER), */
1276+ 0x47 , UCLOGIC_RDESC_PEN_PH (X_PM ),
1277+ /* Physical Maximum (PLACEHOLDER), */
1278+ 0x75 , 0x20 , /* Report Size (32), */
1279+ 0x81 , 0x02 , /* Input (Variable), */
1280+ 0x75 , 0x10 , /* Report Size (16), */
1281+ 0x09 , 0x31 , /* Usage (Y), */
1282+ 0x27 , UCLOGIC_RDESC_PEN_PH (Y_LM ),
1283+ /* Logical Maximum (PLACEHOLDER), */
1284+ 0x47 , UCLOGIC_RDESC_PEN_PH (Y_PM ),
1285+ /* Physical Maximum (PLACEHOLDER), */
1286+ 0x81 , 0x02 , /* Input (Variable), */
1287+ 0xb4 , /* Pop, */
1288+ 0x09 , 0x30 , /* Usage (Tip Pressure), */
1289+ 0x45 , 0x00 , /* Physical Maximum (0), */
1290+ 0x27 , UCLOGIC_RDESC_PEN_PH (PRESSURE_LM ),
1291+ /* Logical Maximum (PLACEHOLDER), */
1292+ 0x75 , 0x0D , /* Report Size (13), */
1293+ 0x95 , 0x01 , /* Report Count (1), */
1294+ 0x81 , 0x02 , /* Input (Variable), */
1295+ 0x75 , 0x01 , /* Report Size (1), */
1296+ 0x95 , 0x03 , /* Report Count (3), */
1297+ 0x81 , 0x01 , /* Input (Constant), */
1298+ 0x09 , 0x3d , /* Usage (X Tilt), */
1299+ 0x35 , 0xC3 , /* Physical Minimum (-61), */
1300+ 0x45 , 0x3C , /* Physical Maximum (60), */
1301+ 0x15 , 0xC3 , /* Logical Minimum (-61), */
1302+ 0x25 , 0x3C , /* Logical Maximum (60), */
1303+ 0x75 , 0x08 , /* Report Size (8), */
1304+ 0x95 , 0x01 , /* Report Count (1), */
1305+ 0x81 , 0x02 , /* Input (Variable), */
1306+ 0x09 , 0x3e , /* Usage (Y Tilt), */
1307+ 0x35 , 0xC3 , /* Physical Minimum (-61), */
1308+ 0x45 , 0x3C , /* Physical Maximum (60), */
1309+ 0x15 , 0xC3 , /* Logical Minimum (-61), */
1310+ 0x25 , 0x3C , /* Logical Maximum (60), */
1311+ 0x81 , 0x02 , /* Input (Variable), */
1312+ 0xc0 , /* End Collection, */
1313+ 0xc0 , /* End Collection */
1314+ };
1315+ const size_t uclogic_rdesc_xppen_artist_24_pro_pen_template_size =
1316+ sizeof (uclogic_rdesc_xppen_artist_24_pro_pen_template_arr );
1317+
1318+ /* Fixed report descriptor for XP-Pen Arist 24 Pro frame */
1319+ const __u8 uclogic_rdesc_xppen_artist_24_pro_frame_arr [] = {
1320+ 0x05 , 0x01 , /* Usage Page (Desktop), */
1321+ 0x09 , 0x07 , /* Usage (Keypad), */
1322+ 0xA1 , 0x01 , /* Collection (Application), */
1323+ 0x85 , UCLOGIC_RDESC_V1_FRAME_ID ,
1324+ /* Report ID (Virtual report), */
1325+ 0x05 , 0x0D , /* Usage Page (Digitizer), */
1326+ 0x09 , 0x39 , /* Usage (Tablet Function Keys), */
1327+ 0xA0 , /* Collection (Physical), */
1328+ 0x14 , /* Logical Minimum (0), */
1329+ 0x25 , 0x01 , /* Logical Maximum (1), */
1330+ 0x75 , 0x01 , /* Report Size (1), */
1331+ 0x95 , 0x08 , /* Report Count (8), */
1332+ 0x81 , 0x01 , /* Input (Constant), */
1333+ 0x05 , 0x09 , /* Usage Page (Button), */
1334+ 0x19 , 0x01 , /* Usage Minimum (01h), */
1335+ 0x29 , 0x14 , /* Usage Maximum (14h), */
1336+ 0x95 , 0x14 , /* Report Count (20), */
1337+ 0x81 , 0x02 , /* Input (Variable), */
1338+ 0x95 , 0x14 , /* Report Count (20), */
1339+ 0x81 , 0x01 , /* Input (Constant), */
1340+ 0x05 , 0x01 , /* Usage Page (Desktop), */
1341+ 0x09 , 0x38 , /* Usage (Wheel), */
1342+ 0x75 , 0x08 , /* Report Size (8), */
1343+ 0x95 , 0x01 , /* Report Count (1), */
1344+ 0x15 , 0xFF , /* Logical Minimum (-1), */
1345+ 0x25 , 0x08 , /* Logical Maximum (8), */
1346+ 0x81 , 0x06 , /* Input (Variable, Relative), */
1347+ 0x05 , 0x0C , /* Usage Page (Consumer Devices), */
1348+ 0x0A , 0x38 , 0x02 , /* Usage (AC PAN), */
1349+ 0x95 , 0x01 , /* Report Count (1), */
1350+ 0x81 , 0x06 , /* Input (Variable, Relative), */
1351+ 0x26 , 0xFF , 0x00 , /* Logical Maximum (255), */
1352+ 0x75 , 0x08 , /* Report Size (8), */
1353+ 0x95 , 0x01 , /* Report Count (1), */
1354+ 0x81 , 0x02 , /* Input (Variable), */
1355+ 0x75 , 0x01 , /* Report Size (1), */
1356+ 0x95 , 16 , /* Report Count (16), */
1357+ 0x81 , 0x01 , /* Input (Constant), */
1358+ 0xC0 , /* End Collection */
1359+ 0xC0 , /* End Collection */
1360+ };
1361+
1362+ const size_t uclogic_rdesc_xppen_artist_24_pro_frame_size =
1363+ sizeof (uclogic_rdesc_xppen_artist_24_pro_frame_arr );
1364+
12401365/**
12411366 * uclogic_rdesc_template_apply() - apply report descriptor parameters to a
12421367 * report descriptor template, creating a report descriptor. Copies the
0 commit comments