agausmann / atmega-usbd

Rust usb-device support for ATmega chips
BSD Zero Clause License
27 stars 10 forks source link

Update to avr-device 0.4 #8

Closed KenN7 closed 1 year ago

KenN7 commented 1 year ago

Hi,

Once avr-device is updated to 0.4, there are some fixes to apply to make the lib work. Tested on arduino pro micro.

agausmann commented 1 year ago

Thanks for the contribution!

I have just one note - it looks like the CriticalSection API changed, instead of using &'cs CriticalSection it is now passed around as CriticalSection<'cs>. Instead of adding & and * operators to conform the values to the parameter types. I would recommend changing the parameters themselves to a plain CriticalSection.

The affected functions are all private, part of the implementation details of this crate, so it shouldn't cause any breakage for library users.