Commit graph

19 commits

Author SHA1 Message Date
Dario Nieuwenhuis
4d9115b3fb Update stable to Rust 1.79. 2024-06-13 20:40:04 +02:00
Jan Špaček
bfb380e8ca Copy build_common.rs into each crate, to make cargo publish happy 2024-05-31 08:07:51 +02:00
Jan Špaček
368893c9cb Emit cargo:rustc-check-cfg instructions from build.rs 2024-05-30 18:28:29 +02:00
tact1m4n3
5b2535c8a2 fix(embassy-rp): fix drop implementation of BufferedUartRx and BufferedUartTx 2024-05-17 21:51:45 +03:00
Dario Nieuwenhuis
43d51884e2 hal-internal: fix failing test due to not initializing ringbuf. 2024-05-12 23:40:32 +02:00
Dario Nieuwenhuis
b13ad7e80b Fix PeripheralRef soundness issue allowing &T.
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`.
2024-05-07 23:26:15 +02:00
Dario Nieuwenhuis
4aa4ea99c2 use private_bounds for sealed traits. 2024-03-23 01:45:19 +01:00
Dario Nieuwenhuis
3d842dac85 fmt: disable "unused" warnings. 2024-03-20 14:53:19 +01:00
Dario Nieuwenhuis
1f17fdf84e nrf/buffered_uart: refactor so rx/tx halves are independent. 2024-02-21 22:13:35 +01:00
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
Dario Nieuwenhuis
4c23f197b3 Fix invalid "async" crates.io category. 2024-01-12 00:39:01 +01:00
Dario Nieuwenhuis
b452a6bcf6 Centralize license and MSRV boilerplate into the repo readme. 2024-01-11 18:18:35 +01:00
Ulf Lilleengen
02b7a833d9 docs: document all public apis of embedded-hal-internal
* Make some fields and functions non-public where possible.
* Enable doc warnings for missing public API docs.
2023-12-08 22:37:39 +01:00
Ulf Lilleengen
636958ff70 fix: correct name in readme 2023-10-12 20:54:38 +02:00
Ulf Lilleengen
7f6fe93f55 fix: remove unused ringbuffer code 2023-10-12 20:54:26 +02:00
Dario Nieuwenhuis
97ca0e77bf stm32: avoid creating many tiny critical sections in init.
Saves 292 bytes on stm32f0 bilnky with max optimizations (from 3132 to 2840).
2023-10-12 16:20:34 +02:00
Dario Nieuwenhuis
5e613d9abb Sync all fmt.rs files. 2023-08-30 01:37:18 +02:00
Grant Miller
d49f40dd5c embassy-stm32: Misc clippy fixes 2023-08-06 15:00:39 -05:00
Dario Nieuwenhuis
036e6ae30c
Rename embassy-hal-common to embassy-hal-internal, document it's for internal use only. (#1700) 2023-07-28 13:23:22 +02:00