esp-rs / esp32-hal

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

Use standardized mutex #30

Closed arjanmels closed 4 years ago

arjanmels commented 4 years ago

We should use standardized Mutex. Currently combination if interrupt free section and spinlock is used.

I think we should align to: https://github.com/rust-embedded/wg/blob/master/rfcs/0377-mutex-trait.md (for tracking: https://github.com/rust-embedded/wg/issues/395). However it seems that it is not fully crystallized yet. (The syntax that requires to take a mutex reference to lock, is a bit weird.)

arjanmels commented 4 years ago

As discussed in #31 we will follow the developments in rust-embedded on this. After #31 is merged this issue can be closed.

arjanmels commented 4 years ago

31 is merged