Skip to content

Update usb-device to v0.3 #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update usb-device to v0.3 #17

wants to merge 1 commit into from

Conversation

liff
Copy link

@liff liff commented Dec 18, 2023

The 0.3 version of usb-device comes with some incompatible changes, so a minor amount of migration is required. An update of usbd-hid is required for the same reason.

@@ -40,7 +40,9 @@ use atmega_usbd::{SuspendNotifier, UsbBus};
use avr_device::{asm::sleep, interrupt};
use usb_device::{
class_prelude::UsbBusAllocator,
descriptor::lang_id::LangID::EN,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be just descriptor::lang_id::LangID else rust complains of LangID not being a module

@@ -78,9 +80,12 @@ fn main() -> ! {
};

let hid_class = HIDClass::new(usb_bus, KeyboardReport::desc(), 1);
let usb_device = UsbDeviceBuilder::new(usb_bus, UsbVidPid(0x1209, 0x0001))
let strings = StringDescriptors::new(EN)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consequently this should be let strings = StringDescriptors::new(LangID::EN)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants