Closed mbuesch closed 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.
Rebase when you have time, then I'll merge this ASAP :)
Done.
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.