See https://github.com/rtic-rs/cortex-m-rtic/blob/master/book/en/src/by-example/tips_monotonic_impl.md for background information.