embassy/embassy-hal-internal
Dario Nieuwenhuis e8474426d8 hal-internal: remove impl DerefMut for PeripheralRef.
if you have `PeripheralRef<'a, AnyPIn>` for pin A, and `AnyPin` (owned) for pin B, you can `mem::swap` them.
so, getting access forever to pin A, just by "sacrificing" pin B

this defeats the point of PeripheralRef, which is if you got a `PeripheralRef<'a, T>` then you're only allowed to use the peripheral for `'a`.

Also some drivers rely on the fact only one instance of a singleton exists for soundness, so this is a soundness fix for those.
2024-02-20 01:02:15 +01:00
..
src hal-internal: remove impl DerefMut for PeripheralRef. 2024-02-20 01:02:15 +01:00
build.rs Rename embassy-hal-common to embassy-hal-internal, document it's for internal use only. (#1700) 2023-07-28 13:23:22 +02:00
Cargo.toml Fix invalid "async" crates.io category. 2024-01-12 00:39:01 +01:00
README.md Centralize license and MSRV boilerplate into the repo readme. 2024-01-11 18:18:35 +01:00

embassy-hal-internal

An Embassy project.

Internal implementation details for Embassy HALs. DO NOT USE DIRECTLY. Embassy HALs (embassy-nrf, embassy-stm32, embassy-rp) already reexport everything you need to use them effectively.