Bootloader, other minor stuff

This commit is contained in:
Will Toohey
2017-03-15 13:47:33 +10:00
parent 1cd98d7a91
commit a437f968bc
5 changed files with 11 additions and 9 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ const USB_Descriptor_Device_t DeviceDescriptor =
// mon.im VID/PID pair, unique!
.VendorID = 0x16D0,
.ProductID = 0x0A6D,
.ReleaseNumber = VERSION_BCD(0,0,1),
// To provide uniqueness
.ReleaseNumber = VERSION_BCD(0,0,2),
.ManufacturerStrIndex = NO_DESCRIPTOR,
.ProductStrIndex = STRING_ID_Product,
+3 -2
View File
@@ -112,7 +112,7 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM InputsReport[] =
HID_RI_USAGE(8, 0x31), /* Y axis */
HID_RI_LOGICAL_MINIMUM(16, 0),
HID_RI_LOGICAL_MAXIMUM(16, JOYSTICK_PPR-1),
HID_RI_PHYSICAL_MINIMUM(16, -1),
HID_RI_PHYSICAL_MINIMUM(16, 0),
HID_RI_PHYSICAL_MAXIMUM(16, 1),
HID_RI_REPORT_COUNT(8, 2), /* 2 axis */
HID_RI_REPORT_SIZE(8, 8),
@@ -186,7 +186,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
// mon.im VID/PID pair, unique!
.VendorID = 0x16D0,
.ProductID = 0x0A6D,
.ReleaseNumber = VERSION_BCD(0,0,1),
// To provide uniqueness
.ReleaseNumber = VERSION_BCD(0,0,3),
.ManufacturerStrIndex = STRING_ID_Manufacturer,
.ProductStrIndex = STRING_ID_Product,
+1 -1
View File
@@ -68,7 +68,7 @@ void led_animate(void) {
case INIT_FLASH:
led_update_breather(FLASH_SPEED);
if(pattern.flash.level == 0) {
led_anim_breathe();
led_anim_follower();
break;
}
break;
+4 -4
View File
@@ -253,7 +253,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
{
if(ReportType != HID_REPORT_ITEM_In || HIDInterfaceInfo != &Inputs_HID_Interface) {
*ReportSize = 0;
return true;
return false;
}
// nothing requested so let's make our own
if(*ReportID == 0) {
@@ -278,7 +278,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
if(!macroUpdated && (sdvxConfig.joystickMode || !switchesChanged)) {
*ReportSize = 0;
return true;
return false;
}
if(!sdvxConfig.joystickMode) {
@@ -302,7 +302,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
if(*ReportID == HID_REPORTID_MouseReport) {
if(x == 0 && y == 0) {
*ReportSize = 0;
return true;
return false;
}
USB_MouseReport_Data_t* MouseReport = (USB_MouseReport_Data_t*)ReportData;
@@ -313,7 +313,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
} else { // joystick
if(x == 0 && y == 0 && !switchesChanged) {
*ReportSize = 0;
return true;
return false;
}
Joystick_Report_t* JoyReport = (Joystick_Report_t*)ReportData;
+1 -1
View File
@@ -68,4 +68,4 @@ flashboot:
$(AVRDUDE) -U flash:w:DFU/BootloaderHID.hex:i
flash: all
cd DFU && python hid_bootloader_loader.py atmega16u2 ../PocketVoltex.hex
cd DFU && python control_bootloader.py atmega16u2 ../PocketVoltex.hex