avr-rust / ruduino

Reusable components for the Arduino Uno.
Apache License 2.0
702 stars 50 forks source link

RFC: Add API to suspend/restore interrupts ... #44

Closed mbuesch closed 1 year ago

mbuesch commented 2 years ago

... similar to the current without_interrupts() helper.

What do you think about this?

I renamed the existing disable/enable API to with_irqs_disabled(). The new API for suspend/restore is with_irqs_suspended(). The old without_interrupts remains as deprecated alias.

I'm not so sure about the naming. Suggestions for better naming are welcome. :)

This is completely untested. Just for discussion.

stappersg commented 2 years ago

This merge request now needs git rebase.

(Sorry for not (yet??) contributing to the requested discussion.)

stappersg commented 2 years ago

This merge request now needs git rebase.

(Sorry for not (yet??) contributing to the requested discussion.)