aboutsummaryrefslogtreecommitdiff
path: root/embassy-hal-internal/src/peripheral.rs
Commit message (Collapse)AuthorAgeFilesLines
* rp: add missing `Debug` and `defmt::Format` `derive`s for ADCRalph Ursprung2025-05-151-0/+2
| | | | | this doesn't cover every `struct` & co. in `embassy-rp`, but at least it adds those needed for `Adc` and `adc::Channel`.
* Remove Peripheral trait, rename PeripheralRef->Peri.Dario Nieuwenhuis2025-03-271-120/+31
|
* Fix PeripheralRef soundness issue allowing &T.Dario Nieuwenhuis2024-05-071-3/+12
| | | | | | Fix soundness issue introduced in a previous soundness fix https://github.com/embassy-rs/embassy/pull/2602 . PeripheralRef must not implement DerefMut itself, but the blanket impl must still require DerefMut. Otherwise you can create two instances of a driver on the same uart by using `&my_uart`.
* hal-internal: remove impl DerefMut for PeripheralRef.Dario Nieuwenhuis2024-02-201-9/+2
| | | | | | | | | 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.
* docs: document all public apis of embedded-hal-internalUlf Lilleengen2023-12-081-0/+1
| | | | | * Make some fields and functions non-public where possible. * Enable doc warnings for missing public API docs.
* Rename embassy-hal-common to embassy-hal-internal, document it's for ↵Dario Nieuwenhuis2023-07-281-0/+174
internal use only. (#1700)