aboutsummaryrefslogtreecommitdiff
path: root/embassy-hal-common
Commit message (Collapse)AuthorAgeFilesLines
* Rename embassy-hal-common to embassy-hal-internal, document it's for ↵Dario Nieuwenhuis2023-07-2811-2314/+0
| | | | internal use only. (#1700)
* hal-common: require DerefMut for peripherals, not just Deref.Dario Nieuwenhuis2023-07-021-1/+1
| | | | | | | | | | | | | | | Otherwise you can create multiple drivers on the same singleton like this: ```rust let mut input = Input::new(&pin, Pull::None); let mut output = Output::new(&pin, Level::Low, Speed::Low); input.is_high(); output.set_high(); input.is_high(); output.set_high(); ``` Thanks @pennae for reporting.
* Remove embassy-cortex-m crate, move stuff to embassy-hal-common.Dario Nieuwenhuis2023-06-094-0/+894
|
* Fix tests.Dario Nieuwenhuis2023-05-291-2/+0
|
* Fix some typosDirk Stolle2023-05-081-2/+2
|
* stm32: remove TIMX singleton when used on timer driverxoviat2023-04-161-1/+24
| | | | fixes #1316.
* common/peripheral: do not require mut in PeripheralRef clone_unchecked.Dario Nieuwenhuis2023-04-112-7/+7
|
* Add must_use to OnDropRasmus Melchior Jacobsen2023-03-171-0/+2
|
* hal-common/atomic_ring_buffer: add push_bufs() push_slices()Patrick Oppenlander2023-03-021-0/+147
| | | | | This allows a writer to access all of the free space in the buffer, even when it's wrapping around.
* common: allow atomic ringbuf to fill up to N instead of just N-1.Dario Nieuwenhuis2023-03-021-29/+69
| | | | | | This allows the ringbuf to be filled up to `N` instead of just `N-1`, using some fun tricks on the indices. The advantage is better performance: Before, the first write would fill N-1 bytes, The second would write just the 1 byte left before wrapping, then N-2. Then 2, then N-3, and so on. This would result in more smaller chunks, so worse perf. This problem is gone now.
* PeripheralRef docs improvements.Dario Nieuwenhuis2023-02-031-9/+10
|
* nrf: docs.Dario Nieuwenhuis2023-02-011-0/+6
|
* rp: Fix BufferedUart drop codeTimo Kröger2023-01-041-0/+4
| | | | Only unregister the interrupt handler when both parts are inactive
* hal-common/atomic_ring_buffer: Add push_slice, pop_slice.Dario Nieuwenhuis2022-12-191-0/+16
|
* hal-common/atomic_ring_buffer: fix crashes when len=0Dario Nieuwenhuis2022-12-191-2/+22
|
* rp/uart: use lockfree ringbuffer.Dario Nieuwenhuis2022-11-252-0/+332
| | | | This gets rid of another PeripheralMutex usage.
* all Cargo.toml: Add license to all crate Cargo.toml fileschrysn2022-10-071-0/+1
| | | | Closes: https://github.com/embassy-rs/embassy/issues/1002
* Fix typo in peripheral.rsDaniel Bevenius2022-09-081-1/+1
|
* hal-common: Remove unused depDario Nieuwenhuis2022-08-181-1/+0
|
* Split embassy crate into embassy-executor, embassy-util.Dario Nieuwenhuis2022-07-292-13/+2
|
* nrf: replace PhantomData usages with PeripheralRef.Dario Nieuwenhuis2022-07-231-0/+30
|
* Remove PeripheralRef::into_inner()Dario Nieuwenhuis2022-07-231-4/+0
|
* Add docs to PeripheralRef::map_into.Dario Nieuwenhuis2022-07-231-0/+6
|
* Rename Unborrowed -> PeripheralRef, Unborrow -> PeripheralDario Nieuwenhuis2022-07-234-91/+150
|
* Update embassy-stm32Dario Nieuwenhuis2022-07-231-0/+10
|
* Rename unsafe_impl_unborrow to impl_unborrowDario Nieuwenhuis2022-07-231-2/+2
|
* wipDario Nieuwenhuis2022-07-232-65/+18
|
* Reuse unsafe_impl_unborrow in other macros.Dario Nieuwenhuis2022-07-231-10/+1
|
* WIP: Make unborrow safe to useGrant Miller2022-07-233-17/+80
|
* Change steal() from trait to inherent fns.Dario Nieuwenhuis2022-07-221-8/+16
|
* Remove unused std_peripherals.Dario Nieuwenhuis2022-07-221-39/+0
|
* Remove the authors field from Cargo.tomlsDario Nieuwenhuis2022-06-181-1/+0
| | | | | | | | | | | It currently contains whoever was first to write some code for the crate, even if many more people have contributed to it later. The field is "sort of" deprecated, it was made optional recently: https://rust-lang.github.io/rfcs/3052-optional-authors-field.html Due the the reasons listed there I believe removing it is better than setting it to generic fluff like "The Embassy contributors".
* Update to 2021 edition. (#820)Dario Nieuwenhuis2022-06-181-1/+1
|
* Run rustfmt.Dario Nieuwenhuis2022-06-122-3/+2
|
* Add embassy-cortex-m crate.Dario Nieuwenhuis2022-06-125-709/+64
| | | | | | - Move Interrupt and InterruptExecutor from `embassy` to `embassy-cortex-m`. - Move Unborrow from `embassy` to `embassy-hal-common` (nothing in `embassy` requires it anymore) - Move PeripheralMutex from `embassy-hal-common` to `embassy-cortex-m`.
* common/PeripheralMutex: remove unsafe API. (#802)Dario Nieuwenhuis2022-06-091-24/+2
| | | | | | Following the project's decision that "leak unsafe" APIs are not marked as "unsafe", update PeripheralMutex to accept non-'static state without unsafe. Fixes #801
* Remove embassy_hal_common::usb.Dario Nieuwenhuis2022-05-045-952/+0
| | | | | | | | | | | The replacement is `embassy-usb`. There's a WIP driver for stm32 USBD in #709, there's no WIP driver for stm32 USB_OTG. This means we're left without USB_OTG support for now. Reason for removing is I'm going to soon remove `embassy::io`, and USB uses it. I don't want to spend time maintaining "dead" code that is going to be removed. Volunteers welcome, either to update old USB to the new IO, or write a USB_OTG driver fo the new USB.
* Update rust nightly, embedded-hal 1.0, embedded-hal-async.Dario Nieuwenhuis2022-03-111-1/+1
|
* common/serial/usb: fix hang when write buffer gets full and then the bus resets.Dario Nieuwenhuis2022-03-071-0/+2
| | | | Fixes #654
* common/usb/serial: add some trace logging.Dario Nieuwenhuis2022-03-071-5/+25
|
* Fix typo in defuse doc commentDaniel Bevenius2022-01-141-1/+1
|
* usb feature gateJacob Rosenthal2021-12-121-1/+1
|
* Provides AsyncWrite with flushhuntc2021-12-102-0/+22
| | | | As per Tokio and others, this commit provides a `poll_flush` method on `AsyncWrite` so that a best-effort attempt at wakening once all bytes are flushed can be made.
* Update to defmt 3.0ish.Bob McWhirter2021-11-151-6/+1
| | | | Lots of gitrevs deps.
* Clippy fixesDario Nieuwenhuis2021-10-181-0/+1
|
* embassy: Refactor module structure to remove kitchen-sink `util`.Dario Nieuwenhuis2021-09-113-1/+53
|
* Update lots of depsDario Nieuwenhuis2021-09-111-4/+4
|
* Cargo fmtUlf Lilleengen2021-09-021-1/+1
|
* Add HAL for SubGhz peripheral for STM32 WL seriesUlf Lilleengen2021-09-023-0/+130
| | | | | | | | | Based on the HAL from stm32wl, the peripheral driver has been modified to fit into embassy, using the embassy APIs, providing operation of the radio peripheral. The initial version does not offer any async APIs, but the example shows how the radio IRQ can be used to perform async TX of the radio.
* Add IRQ-driven buffered USART implementation for STM32 v2 usart (#356)Ulf Lilleengen2021-08-161-0/+45
| | | | | | | | | | * Add IRQ-driven buffered USART implementation for STM32 v2 usart * Implementation based on nRF UARTE, but simplified to not use DMA to avoid complex interaction between DMA and USART. * Implementation of AsyncBufRead and AsyncWrite traits * Some unit tests to ring buffer * Update polyfill version * Update sub module to get usart IRQ fix