diff --git a/firmware/src/device.rs b/firmware/src/device.rs index d94e131..5fe86a5 100644 --- a/firmware/src/device.rs +++ b/firmware/src/device.rs @@ -16,33 +16,33 @@ use usbd_human_interface_device::{ // Generated using Waratah #[rustfmt::skip] pub const CUSTOM_DESCRIPTOR: &[u8] = &[ - 0x05, 0x01, // UsagePage(Generic Desktop[0x0001]) - 0x09, 0x04, // UsageId(Joystick[0x0004]) - 0xA1, 0x01, // Collection(Application) - 0x09, 0x01, // UsageId(Pointer[0x0001]) - 0xA1, 0x00, // Collection(Physical) - 0x09, 0x30, // UsageId(X[0x0030]) - 0x09, 0x32, // UsageId(Z[0x0032]) - 0x15, 0x00, // LogicalMinimum(0) - 0x27, 0xFF, 0xFF, 0x00, 0x00, // LogicalMaximum(65,535) - 0x95, 0x02, // ReportCount(2) - 0x75, 0x10, // ReportSize(16) - 0x81, 0x02, // Input(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, BitField) - 0xC0, // EndCollection() - 0x05, 0x09, // UsagePage(Button[0x0009]) - 0x19, 0x01, // UsageIdMin(Button 1[0x0001]) - 0x29, 0x10, // UsageIdMax(Button 16[0x0010]) - 0x25, 0x01, // LogicalMaximum(1) - 0x95, 0x10, // ReportCount(16) - 0x75, 0x01, // ReportSize(1) - 0x81, 0x02, // Input(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, BitField) - 0x05, 0x0E, // UsagePage(Haptics[0x000E]) - 0x09, 0x21, // UsageId(Manual Trigger[0x0021]) - 0x26, 0xFF, 0x00, // LogicalMaximum(255) - 0x95, 0x01, // ReportCount(1) - 0x75, 0x08, // ReportSize(8) - 0x91, 0x02, // Output(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField) - 0xC0, // EndCollection() + 0x05, 0x01, // UsagePage(Generic Desktop[0x0001]) + 0x09, 0x04, // UsageId(Joystick[0x0004]) + 0xA1, 0x01, // Collection(Application) + 0x09, 0x01, // UsageId(Pointer[0x0001]) + 0xA1, 0x00, // Collection(Physical) + 0x09, 0x30, // UsageId(X[0x0030]) + 0x09, 0x32, // UsageId(Z[0x0032]) + 0x15, 0x00, // LogicalMinimum(0) + 0x26, 0xFF, 0x0F, // LogicalMaximum(4,095) + 0x95, 0x02, // ReportCount(2) + 0x75, 0x10, // ReportSize(16) + 0x81, 0x02, // Input(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, BitField) + 0xC0, // EndCollection() + 0x05, 0x09, // UsagePage(Button[0x0009]) + 0x19, 0x01, // UsageIdMin(Button 1[0x0001]) + 0x29, 0x10, // UsageIdMax(Button 16[0x0010]) + 0x25, 0x01, // LogicalMaximum(1) + 0x95, 0x10, // ReportCount(16) + 0x75, 0x01, // ReportSize(1) + 0x81, 0x02, // Input(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, BitField) + 0x05, 0x0E, // UsagePage(Haptics[0x000E]) + 0x09, 0x21, // UsageId(Manual Trigger[0x0021]) + 0x26, 0xFF, 0x00, // LogicalMaximum(255) + 0x95, 0x01, // ReportCount(1) + 0x75, 0x08, // ReportSize(8) + 0x91, 0x02, // Output(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, NonVolatile, BitField) + 0xC0, // EndCollection() ]; #[derive(Clone, Copy, Debug, Eq, PartialEq, Default, PackedStruct)] diff --git a/firmware/src/main.rs b/firmware/src/main.rs index c5d88d8..89e2823 100644 --- a/firmware/src/main.rs +++ b/firmware/src/main.rs @@ -137,8 +137,8 @@ fn get_report(pins: &mut MyPins, adc1: &mut adc::Adc) -> CustomInputR CustomInputReport { - x: retX.into(), - y: retY.into(), + x: integLT.into(), + y: floodLT.into(), buttons, } }