Commit Graph

5133 Commits

Author SHA1 Message Date
chemicstry
322cfafed3 Fix adc_v4 compilation 2022-10-07 14:53:03 +03:00
chemicstry
df7174ecb0 Fix internal channel reading on adc_v2 2022-10-07 14:31:55 +03:00
bors[bot]
f8fd6ab208
Merge #1003
1003: all Cargo.toml: Add license to all crate Cargo.toml files r=lulf a=chrysn

This sets the license to "MIT OR Apache-2.0" in a machine readable form on all crates, as it was already in human readable form in the README.md file, and reaffirmed in #1002.

(The statements on all the individual examples might not be strictly essential for the `cargo deny` use case as they are leaf crates, but other tools might use that information).

Co-authored-by: chrysn <chrysn@fsfe.org>
2022-10-07 11:15:14 +00:00
chrysn
6718ca3a94 all Cargo.toml: Add license to all crate Cargo.toml files
Closes: https://github.com/embassy-rs/embassy/issues/1002
2022-10-07 12:41:56 +02:00
chemicstry
9dca368c3d Use RccPeripheral for adc_v2 2022-10-07 13:29:56 +03:00
Dario Nieuwenhuis
d49d1b6b1c ci/doc: build embassy-time too. 2022-10-05 17:08:02 +02:00
bors[bot]
1b9479197d
Merge #1000
1000: Forgot to add space function to immediate publisher r=lulf a=diondokter

Title says it all really. This function was added to the normal publisher, so now also to the immediate publisher

Co-authored-by: Dion Dokter <dion@tweedegolf.com>
2022-10-05 14:05:56 +00:00
Dion Dokter
530182d668 Forgot to add space function to immediate publisher 2022-10-05 15:15:03 +02:00
bors[bot]
94606833aa
Merge #996
996: Add required info to embassy-sync package r=Dirbaio a=lulf

Updates the README.md based on embassy-futures structure.

Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-10-04 14:40:49 +00:00
Ulf Lilleengen
59765590e0 Add required info to embassy-sync package
Updates the README.md based on embassy-futures structure.
2022-10-04 16:38:11 +02:00
Jeremy Fitzhardinge
4fd831e4a8 rp async i2c: raise the tx_empty threshold
Assert "tx_empty" interrupt a little early so there's time to wake up
and start refilling the fifo before it drains. This avoids stalling the
i2c bus if the tx fifo completely drains.
2022-10-03 18:50:03 -07:00
Jeremy Fitzhardinge
cae8499179 rp i2c: clean up tx_abrt handling
Make sure we always wait for the stop bit if there's a reason to -
either because we sent one, or because there was a hardware tx abort.
2022-10-03 01:18:26 -07:00
Dario Nieuwenhuis
f075e62444 Use 1 thread in ci doc building. 2022-10-03 01:59:44 +02:00
Jeremy Fitzhardinge
e8bb8faa23 rp i2c: allow blocking ops on async contexts 2022-10-02 15:09:14 -07:00
Dario Nieuwenhuis
63f5602111
Merge pull request #994 from embassy-rs/ci-docs
Build docs in CI
2022-10-02 23:31:11 +02:00
Dario Nieuwenhuis
753781a263 Build docs in CI 2022-10-02 23:30:12 +02:00
Dario Nieuwenhuis
0d84533bcb Use async spi transaction helper macro. 2022-10-02 21:30:43 +02:00
Dario Nieuwenhuis
c385bbf07d Update embassy, embedded-hal. 2022-10-02 21:28:34 +02:00
bors[bot]
73208d5248
Merge #993
993: rp i2c: blocking example r=Dirbaio a=jsgf

i2c example talking to mcp23017 i2c gpio expander.

Co-authored-by: Jeremy Fitzhardinge <jeremy@goop.org>
2022-10-02 18:58:49 +00:00
Jeremy Fitzhardinge
09afece93d make I2c::write_async take an iterator
There's no other iterator async API right now.
2022-10-01 19:28:27 -07:00
Jeremy Fitzhardinge
1ee4bb22de embassy-rp i2c: async (non-blocking) example
Simple example exercising an mcp23017 GPIO expander, configured on
RP2040 GPIOs 14+15 (i2c1) with 8 inputs and 8 outputs. Input bit 0
controls whether to display a mcp23017 register dump.
2022-10-01 13:43:37 -07:00
Jeremy Fitzhardinge
5e2c52ee5b embassy-rp: async i2c implementation
This is an interrupt-driven async i2c master implementation. It makes as
best use of the RP2040's i2c block's fifos as possible to minimize
interrupts.

It implements embedded_hal_async::i2c for easy interop.
WIP async impl
2022-10-01 13:43:37 -07:00
Jeremy Fitzhardinge
72b645b0c9 rp i2c: make blocking only for Mode=Blocking 2022-10-01 13:26:13 -07:00
Jeremy Fitzhardinge
8d38eacae4 rp i2c: remove vestiges of DMA 2022-10-01 13:26:13 -07:00
Jeremy Fitzhardinge
90d392205f embassy-rp: inline I2c::regs
It just returns a literal constant, so there's no reason not to always inline it.
2022-10-01 13:26:13 -07:00
Jeremy Fitzhardinge
c96581879c update embedded-hal api
Also pin to alpha.9 since its a breaking change
2022-10-01 01:34:45 -07:00
Jeremy Fitzhardinge
d5abd32da2 rename to i2c_blocking 2022-10-01 01:29:10 -07:00
Jeremy Fitzhardinge
9f77dbf5ae rp i2c: blocking example
i2c example talking to mcp23017 i2c gpio expander.
2022-10-01 01:29:10 -07:00
bors[bot]
aabc02506b
Merge #992
992: (embassy-stm32): remove flash lock/unlock public API from stm32 flash r=lulf a=MathiasKoch

Instead, perform the unlocking and locking automatically on erase and write operations.

This makes the `embedded-storage` abstraction actually useable in libraries, while still keeping the flash peripheral locked the majority of the time.

Co-authored-by: Mathias <mk@blackbird.online>
2022-09-30 11:32:27 +00:00
Mathias
62c0b18f10 Merge branch 'master' of https://github.com/embassy-rs/embassy into embassy-stm32/rtc 2022-09-30 06:15:12 +02:00
bors[bot]
99284b8304
Merge #981
981: (embassy-stm32): add E-H1 uart blocking & nb implementation r=MathiasKoch a=MathiasKoch



Co-authored-by: Mathias <mk@blackbird.online>
2022-09-30 04:14:52 +00:00
Mathias
a283c47557 Implement embedded-hal-nb for uart 2022-09-30 06:04:19 +02:00
Mathias
a7fdeac560 Remove flash lock/unlock public API from stm32 flash, and perform the unlocking and locking automatically on erase and write operations 2022-09-30 06:00:46 +02:00
Mathias
88a3c360e8 Merge branch 'master' of https://github.com/embassy-rs/embassy into embassy-stm32/uart-eh1 2022-09-30 05:23:59 +02:00
bors[bot]
1d6f5493e7
Merge #991
991: usb: remove all "Direction as u8" casts. r=Dirbaio a=Dirbaio

Alternative fix for #989 , see comment there for rationale.

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-09-29 13:53:22 +00:00
Dario Nieuwenhuis
dab1762709 usb: remove all "Direction as u8" casts. 2022-09-29 15:52:23 +02:00
bors[bot]
ebf5a92ab2
Merge #990
990: Small pubsub improvements r=Dirbaio a=diondokter

- Futures in pub & sub are now awaited instead of returned
- Added functions for reading how many messages are available

This helps people get better compiler diagnostics. For example, I forgot to call await on a future and the compiler didn't complain.
This also helps with making some decisions based on the state of the channels.

Co-authored-by: Dion Dokter <dion@tweedegolf.com>
2022-09-29 13:28:56 +00:00
Dion Dokter
874384826d Went back to named futures but now with must_use 2022-09-29 15:15:10 +02:00
Dion Dokter
f4ebc36b63 Futures in pub & sub are now awaited instead of returned for better user compiler diagnostics.
Added functions for reading how many messages are available
2022-09-29 14:24:42 +02:00
Mathias
38faae26e5 Merge branch 'master' of https://github.com/embassy-rs/embassy into embassy-stm32/uart-flowcontrol 2022-09-29 12:58:38 +02:00
Mathias
a77e2c3512 Merge branch 'master' of https://github.com/embassy-rs/embassy into embassy-stm32/uart-eh1 2022-09-29 12:58:01 +02:00
bors[bot]
8b9f4ad259
Merge #988
988: Update embedded-hal versions and explicitly pin r=lulf a=lulf

Pinning to ensure CI don't accidentally break.

Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-09-29 09:29:33 +00:00
Ulf Lilleengen
72c2e985bb Update embedded-hal versions and explicitly pin 2022-09-29 11:27:46 +02:00
Mathias
7152031229 Add flash ram helpers 2022-09-29 10:03:49 +02:00
Mathias
7ee7109508 Rebase on master 2022-09-29 10:00:13 +02:00
Mathias
f9c62d4f1d Add flowcontrol to UART 2022-09-29 09:12:17 +02:00
Mathias
dc90006982 Remove code duplication on nb_read 2022-09-29 07:58:11 +02:00
Mathias
a83560c6b1 Implement RTC peripheral for all stm32 families with rtc 2022-09-29 07:49:32 +02:00
Chuck Davis
bb84d7a0ae
Merge branch 'embassy-rs:master' into master 2022-09-28 14:33:03 -05:00
ceekdee
526e90d3f3 Update some outstanding questions 2022-09-28 14:27:34 -05:00