Commit Graph

250 Commits

Author SHA1 Message Date
Mathias
1d49b3444f Add DMA read + write functions 2022-08-18 21:09:50 +02:00
Mathias
a7d6bc7ba5 Merge branch 'master' of https://github.com/embassy-rs/embassy into embassy-rp/dma 2022-08-18 21:08:57 +02:00
bors[bot]
aefa5275a2
Merge #910
910: (embassy-rp): Implement remaining logic for blocking UART r=lulf a=MathiasKoch

async read/write is still `todo!()`, awaiting DMA implementation.

Co-authored-by: Mathias <mk@blackbird.online>
2022-08-18 18:36:27 +00:00
Mathias
9c9b7b1a66 Remove unneeded NoDma struct 2022-08-18 20:34:55 +02:00
Mathias
55a63a5417 Attempt to implement future for DMA transfer 2022-08-18 20:30:50 +02:00
Mathias
3bbfc11f45 Stop active DMA transfer on drop 2022-08-18 20:30:24 +02:00
Mathias
d35a1c9790 Preliminary DMA support for RP2040 2022-08-18 19:39:13 +02:00
Mathias
0f74f870b0 Fix rp uart example 2022-08-18 14:01:37 +02:00
Mathias
d52c7ded49 Implement remaining logic for blocking UART. async is still todo, awaiting DMA 2022-08-18 10:23:29 +02:00
Dario Nieuwenhuis
5daa173ce4 Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
Dario Nieuwenhuis
fc6e1e06b3 Remove HAL initialization from #[embassy::main] macro. 2022-08-17 22:16:46 +02:00
Dario Nieuwenhuis
67edea4168 Update to critical-section 1.0, atomic-polyfill 1.0 2022-08-17 19:01:56 +02:00
Dario Nieuwenhuis
6c10fa44d0 rp/gpio: fix wait_for_* when multiple pins are in use. 2022-08-08 00:22:08 +02:00
Dario Nieuwenhuis
89e2e25d6f rp/gpio: remove unused lifetimes. 2022-08-07 23:25:50 +02:00
Dario Nieuwenhuis
a0f1b0ee01 Split embassy crate into embassy-executor, embassy-util. 2022-07-29 23:40:36 +02:00
Dario Nieuwenhuis
f02ba35482 Remove PeripheralRef::into_inner() 2022-07-23 14:27:45 +02:00
Dario Nieuwenhuis
4901c34d9c Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral 2022-07-23 14:00:19 +02:00
Dario Nieuwenhuis
8a9d2f59af Update embassy-stm32 2022-07-23 02:40:13 +02:00
Dario Nieuwenhuis
be6408e202 Rename unsafe_impl_unborrow to impl_unborrow 2022-07-23 01:33:22 +02:00
Grant Miller
bff0ad9286 Update embassy-rp 2022-07-23 01:33:22 +02:00
Daniel Bevenius
e757b1882e Add inline attribute to embassy-rp async functions
This commit adds the inline attribute to the recently added async gpio
functions. This is to enable cross-crate inlining and to be consistent
with the other functions implemented for Input and Flex.
2022-07-22 07:24:14 +02:00
Jan Niehusmann
aff840cf30 Fix build of embassy-rp on stable channel 2022-07-21 20:14:45 +00:00
Daniel Bevenius
8979959dd1 Add embedded_hal_async support for embassy-rp
This commit adds support for embedded-hal-async to the Embassy
Raspberry PI crate.
2022-07-14 13:52:22 +02:00
chemicstry
53e40860c1 Move all gpio logic to Flex 2022-07-13 02:45:37 +03:00
chemicstry
a335589f34 Change get_set_level to get_output_level 2022-07-13 02:25:09 +03:00
chemicstry
57002875d6 Add convenience GPIO functions to RP 2022-07-13 02:22:46 +03:00
bors[bot]
5f43c1d37e
Merge #850
850: Shared buses with SetConfig r=Dirbaio a=kalkyl

Addresses issue #830 

Co-authored-by: Henrik Alsér <henrik@mindbite.se>
2022-07-10 00:03:44 +00:00
Henrik Alsér
baae64d911 Add embassy-embedded-hal nightly feature 2022-07-09 23:41:02 +02:00
Dario Nieuwenhuis
5cc5961c94 rp/gpio: add Flex. 2022-07-09 02:14:30 +02:00
Henrik Alsér
85e67d94ad impl SetConfig for rp2040 SPI 2022-07-09 00:32:55 +02:00
Dario Nieuwenhuis
948bb93dc2 docs: Add $COMMIT to git srclinks. 2022-06-26 23:55:38 +02:00
Dario Nieuwenhuis
1f746e0939 Remove the authors field from Cargo.tomls
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".
2022-06-18 02:16:40 +02:00
Dario Nieuwenhuis
88e36a70bd
Update to 2021 edition. (#820) 2022-06-18 02:15:48 +02:00
Dario Nieuwenhuis
a8703b7598 Run rustfmt. 2022-06-12 22:22:31 +02:00
Dario Nieuwenhuis
5085100df2 Add embassy-cortex-m crate.
- 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`.
2022-06-12 21:45:38 +02:00
Dario Nieuwenhuis
6320e30adf Update embedded-hal-async to 0.1.0-alpha.1 2022-05-29 22:34:08 +02:00
Daniel Bevenius
027ab3371e Impl OutputPin/StatefulOutputPin/ToggleableOutputPin
This commit implements embedded_hal_02::digital::v2 OutputPin,
StatefulOutputPin, and ToggleableOutputPin for embassy-rp.
2022-05-21 10:11:12 +02:00
Daniel Bevenius
c8461709e3 Add open-drain support for embassy-rp
This commit adds open-drain support for embassy-rp by adding a new type
named embassy_rp::gpio::OutputOpenDrain.
2022-05-21 10:11:06 +02:00
Daniel Bevenius
4b0dca1802 Add new lines between SIO methods
The commit adds new lines between the SIO functions which at least for
me improves readability and is consistent with the other methods in the
trait.
2022-05-19 13:45:40 +02:00
Dario Nieuwenhuis
dd7a34fdc8
Merge pull request #773 from danbev/embassy-rp-ouput-drop
Impl drop for embassy-rp gpio Output
2022-05-19 07:13:13 +02:00
Daniel Bevenius
99c2defa76 squash! Impl ToggleableOutputPin for embassy-rp Output
Use value_xor as suggested in pull request feedback.
2022-05-19 06:07:14 +02:00
Daniel Bevenius
da97944322 Impl ToggleableOutputPin for embassy-rp Output 2022-05-19 05:33:42 +02:00
Daniel Bevenius
a3e0fcef0b Impl drop for embassy-rp gpio Output
This commit implements drop for embassy-rp gpio Output which is
currently a todo.
2022-05-17 08:43:03 +02:00
Daniel Bevenius
0bb428dcc0 squash! Implement Output::is_set_low for embassy-rp
Add check for the bit of the current pin.
2022-05-11 18:33:13 +02:00
Daniel Bevenius
6d4a49bca8 Implement Output::is_set_low for embassy-rp
This commit implements a suggestion for the method is_set_low which is
currently a 'todo', by reading last value written to GPIO_OUT.
2022-05-11 16:23:31 +02:00
Daniel Bevenius
1b2a10007b Update re-export comment in embassy-rp/Cargo.toml 2022-05-09 16:56:28 +02:00
Dario Nieuwenhuis
3251a21fb7 Switch to crates.io embedded-hal, embedded-hal-async.
This temporarily removes support for the async UART trait, since it's
not yet in embedded-hal-async.
2022-04-22 19:58:24 +02:00
Matous Hybl
eb6910fa86 Reexport unborrow macro in HALs 2022-04-07 12:57:02 +02:00
Dario Nieuwenhuis
aee19185b7 Add more docserver metadata. 2022-04-05 21:05:09 +02:00
Dario Nieuwenhuis
9bad9365dc Update rust nightly, embedded-hal 1.0, embedded-hal-async. 2022-03-11 00:38:07 +01:00
Dario Nieuwenhuis
d9aec181a4 rp: impl eh1.0 blocking traits 2022-02-15 17:29:05 +01:00
bors[bot]
f2eb438905
Merge #615
615: rp: remove OptionalPin r=Dirbaio a=Dirbaio

Mirror of https://github.com/embassy-rs/embassy/pull/605 for rp2040

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-02-12 00:46:40 +00:00
Dario Nieuwenhuis
0c9b1abb67 rp: remove OptionalPin 2022-02-12 01:34:41 +01:00
Dario Nieuwenhuis
20e14b8edb embassy, embassy-nrf: add nightly Cargo feature to gate nightly-only features. 2022-02-12 01:16:31 +01:00
Dario Nieuwenhuis
6c925b2342 blocking_mutex: refactor to work on stable. No GATs, and can be constructed in const. 2022-02-12 01:16:31 +01:00
Dario Nieuwenhuis
a8bd3ab952 Add missing + 'd on unborrows. 2022-02-10 16:06:42 +01:00
Ulf Lilleengen
985c11fad5 Update rust-toolchain 2021-12-16 11:34:20 +01:00
Bob McWhirter
c2da498263 Update to defmt 3.0ish.
Lots of gitrevs deps.
2021-11-15 11:09:08 -05:00
Ulf Lilleengen
205a223af3 Update versions of critical-section and atomic-polyfill 2021-11-02 18:52:03 +01:00
Ulf Lilleengen
99a94f1d50 Update version of critical-section 2021-09-13 17:05:17 +02:00
Ulf Lilleengen
e24528051b Add WASM support for executor
* Adds an executor for WASM runtimes based on wasm_bindgen.
* Add time driver based on JS time handling.
* Add example that can run in browser locally.
* Update to critical-section version that supports 'std' flag
2021-09-13 16:42:39 +02:00
Dario Nieuwenhuis
ead987245d embassy: Refactor module structure to remove kitchen-sink util. 2021-09-11 02:35:35 +02:00
Dario Nieuwenhuis
f2623e7e9b Update lots of deps 2021-09-11 01:35:23 +02:00
Dario Nieuwenhuis
a76526add6 rp: remove use of never type 2021-09-03 17:17:02 +02:00
Dario Nieuwenhuis
de016e8456 Remove trait_alias, allow(incomplete_features).
trait_alias seems unused. no idea why it's there.
2021-09-03 17:00:58 +02:00
Dario Nieuwenhuis
7c0990ad1e time: allow storing state inside the driver struct. 2021-08-25 21:06:27 +02:00
Dario Nieuwenhuis
d3aeb45fb3 Update cortex-m-rt to v0.7 for stm32, rp. 2021-08-19 00:56:11 +02:00
Dario Nieuwenhuis
0ea6a2d890 time: replace dyn clock/alarm with a global Driver trait 2021-08-05 19:14:09 +02:00
Dario Nieuwenhuis
7bfb763e09 Rename embassy-extras to embassy-hal-common 2021-07-29 13:44:51 +02:00
Dario Nieuwenhuis
da33b3a4d2 rp/spi: disable+enable when setting frequency 2021-07-20 09:43:06 +02:00
Dario Nieuwenhuis
dbff5cc232 rp/spi: properly drain the rx buffer while writing 2021-07-20 09:42:52 +02:00
Dario Nieuwenhuis
f916fe5476 all hals: reexport PAC if unstable-pac feature is set. 2021-07-14 22:19:04 +02:00
Dario Nieuwenhuis
1a4c13cf26 rp/spi: add set_frequency 2021-07-12 03:45:57 +02:00
Dario Nieuwenhuis
7547c8d8d6 rp/timer: add 2021-07-12 03:45:57 +02:00
Dario Nieuwenhuis
35a76c364a embassy/time: make optional via Cargo feature 2021-07-12 03:45:48 +02:00
Dario Nieuwenhuis
17e31eb903 rp/spi: sane prescaler calculation 2021-07-11 23:47:33 +02:00
Rukai
56d0c5ffe1 Fix warnings in std and rp 2021-07-04 12:46:04 +10:00
Dario Nieuwenhuis
5fae5d20c0 rp/clocks: don't disrupt PLLs if already running.
This makes it possible to run under https://github.com/majbthrd/pico-debug
2021-06-30 23:46:00 +02:00
Dario Nieuwenhuis
53c236fde8 rp/spi: add configurable pha/pol 2021-06-30 23:46:00 +02:00
Dario Nieuwenhuis
f073bdfe43 rp/spi: add Transfer 2021-06-30 23:46:00 +02:00
Dario Nieuwenhuis
749f4838d5 rp/gpio: add optional pins 2021-06-30 22:43:15 +02:00
Dario Nieuwenhuis
88bc2972f6 rp/spi: add write-only spi driver 2021-06-25 06:24:14 +02:00
Dario Nieuwenhuis
9cf1d5b29c rp/clocks: fix wrong PLL setup 2021-06-25 06:24:14 +02:00
Dario Nieuwenhuis
c7c897bb72 rp/gpio: add infallible inherent methods 2021-06-25 06:24:14 +02:00
Dario Nieuwenhuis
5a6384d199 rp: clock setup 2021-06-25 03:38:21 +02:00
Dario Nieuwenhuis
3be49d3e79 fmt: Add dunmy use to avoid "unused variable" errors when no log is enabled. 2021-06-07 03:21:37 +02:00
Dario Nieuwenhuis
ef1ebefec0 fmt: use absolute paths 2021-06-07 03:15:05 +02:00
Dario Nieuwenhuis
e7dc5c0939 fmt: make all macros macro_rules so scoping is consistent. 2021-06-07 00:16:39 +02:00
Dario Nieuwenhuis
b5cdd296dd
Merge pull request #195 from embassy-rs/unborrow-mk2
Unborrow fixes
2021-05-20 04:14:38 +02:00
Rukai
2363a019e2 Fix all warnings on embassy-rp and embassy-rp-examples and
embassy-std-examples
2021-05-20 08:32:26 +10:00
Dario Nieuwenhuis
105c8504b6 Mark Unborrow as unsafe to implement 2021-05-19 23:29:33 +02:00
Dario Nieuwenhuis
f7858631d8 stm32: fix build, add ci 2021-05-17 03:16:58 +02:00
Dario Nieuwenhuis
0310e4d458 Add init fn. Initializes hw and returns Peripherals. 2021-05-17 00:57:37 +02:00
Ulf Lilleengen
3b86e85770 Bump version of critical-section to 0.2.1 2021-05-13 18:17:50 +02:00
Dario Nieuwenhuis
e0809ab0fb Switch to use PrioritX enums. 2021-05-11 01:34:24 +02:00
Dario Nieuwenhuis
7fa0e57172 Use critical_section crate 2021-05-11 01:15:30 +02:00
Dario Nieuwenhuis
97ca54fa66 Rename PeripheralBorrow to Unborrow 2021-04-14 19:59:52 +02:00
Dario Nieuwenhuis
d938b95430 rp: add precompiled boot2 to avoid depending on gcc 2021-03-29 22:28:36 +02:00
Dario Nieuwenhuis
403b308279 rp/gpio: implement Input 2021-03-29 21:35:25 +02:00
Dario Nieuwenhuis
2cd3bdc90c rp: add initial version 2021-03-29 21:35:25 +02:00