esp-rs / esp32-hal

A hardware abstraction layer for the esp32 written in Rust.
Apache License 2.0
192 stars 28 forks source link

Added Mutexes implemented in xtensa-lx6 to prelude & started using in timers example #31

Closed arjanmels closed 4 years ago

arjanmels commented 4 years ago

Starting point to use standardized Mutex implementation. This depends on: https://github.com/esp-rs/xtensa-lx6/pull/3.

Should be expanded to be used everywhere inside esp32-hal. However the underlying trait is not yet fully stabilized.

arjanmels commented 4 years ago

Changed to WIP, to wait on the changes in xtensa-lx6 and then use the new traits in all the code.

arjanmels commented 4 years ago

@MabezDev Ok this now updates all usages of interrupt::free and spin::Mutex. It builds on and therefore includes #34. Propose to review and merge this one to cover both.

arjanmels commented 4 years ago

@MabezDev I rebased to current master. For me ready to merge. You still had two request for change, what do you think with my input?

BTW it needs xtensa-lx6 crate 0.2.0 and xtensa-lx6-rt crate 0.3.0

MabezDev commented 4 years ago

I've just released the new versions of lx6-rt and lx6, this should be good to merge once this is updated :)

Sorry this took a while, busy week!

arjanmels commented 4 years ago

No worries, it is a side activity for all of us.

I already anticipated the change so the versions are already at 0.2.0 and 0.3.0.