Rahix / avr-device

Register access crate for AVR microcontrollers
Apache License 2.0
168 stars 67 forks source link

Update the bare-metal crate to 1.0.0 #108

Closed mbuesch closed 1 year ago

mbuesch commented 1 year ago

The new crate version generates much cleaner code on AVR due to #[inline] annotations.

This is an API break, because the CriticalSection + Mutex mechanism changes from exterior reference lifetime to interior reference lifetime management.

Also bare-metal seems to be working on a simplified API for Mutex<RefCell>. That is not included in 1.0.0, yet. But I think we should make the API breaking change now along with all other API breaking changes.

This PR is meant to be re-based after #104 is merged.

mbuesch commented 1 year ago

Yeah, I know. We should probably migrate to the critical-section crate. But upgrading bare-metal first is a step towards it. It makes the API a bit more critical-section-like and it really improves the generated code a lot.

Rahix commented 1 year ago

Rebase when you have time, then I'll merge this ASAP :)

mbuesch commented 1 year ago

Done.