Commit Graph

52 Commits

Author SHA1 Message Date
Ulf Lilleengen
3811c0a401 Add adapter for implementing async traits for blocking types
This allows writing drivers relying on async traits, while still
functioning with implementations that already implement the embedded-hal
traits.

Add examples to stm32l4 for using this feature.
2021-12-17 12:54:51 +01:00
Ulf Lilleengen
2bbd1ddb8a Remove unneeded rustfmt::skip 2021-12-16 11:37:53 +01:00
Wilfried Chauveau
eac604accd
Fix missing lifetime bounds 2021-11-21 10:10:28 +00:00
Bob McWhirter
c2da498263 Update to defmt 3.0ish.
Lots of gitrevs deps.
2021-11-15 11:09:08 -05:00
Wilfried Chauveau
2d475b80d9
Add IntoIterator trait bound on Future trait's parameter
The parameter is also renamed from `U` to `V` to avoid confusion with the
type parameter `U` from the `write_iter` function that follows.
2021-10-29 20:37:00 +01:00
Wilfried Chauveau
4d75035098
Add the embassy_traits::i2c::WriteIter trait
This trait makes the parallel with `embedded_hal::i2c::WriteIter`.

It allows to fetch bytes to write from an Iterator rather than requiring
an allocation for an array.

It is provided as an extra Trait to avoid breaking existing implementations
of `embassy_traits::i2c::I2c`.
2021-10-29 12:34:49 +01:00
Dario Nieuwenhuis
a2e7c24e00 Clippy fixes 2021-10-18 01:05:29 +02:00
Dario Nieuwenhuis
f2623e7e9b Update lots of deps 2021-09-11 01:35:23 +02:00
Dario Nieuwenhuis
11d2b0cdc1 Remove more unused features. 2021-09-03 17:13:54 +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
Bob McWhirter
37ceae908b Rename Random impl to Rng.
Create Random struct providing next_x(range) for all T:Rng.
2021-09-01 09:39:33 -04:00
Bob McWhirter
7fa3b27cac Move random utils to another trait. 2021-08-30 09:55:29 -04:00
Bob McWhirter
d525f51940 Add a convenience next(range) to Rng. 2021-08-27 16:10:01 -04:00
Dario Nieuwenhuis
07d4b196f7 Update nightly, remove removed features. 2021-08-04 19:48:14 +02:00
Bob McWhirter
473a83a937 Adjust how we deal with read/write being different length.
Including some docs about it.
Removing the Rx-enablement for write-only operations.
2021-07-23 13:22:39 -04:00
Bob McWhirter
3f379e06b0 Begin reworking SPI to add DMA for stm32. 2021-07-23 13:22:39 -04:00
Bob McWhirter
a345dd9e2b More formatting! 2021-07-23 13:22:39 -04:00
Bob McWhirter
22901938ce Split up the SPI trait into several with shared Error associated type. 2021-07-23 13:22:39 -04:00
Folkert
857ac3386b nrf async twim 2021-06-04 17:31:35 +02:00
Dario Nieuwenhuis
f7858631d8 stm32: fix build, add ci 2021-05-17 03:16:58 +02:00
Thales Fragoso
a130499c9a Get rid of some warnings 2021-05-14 23:42:12 -03:00
Rukai
6c3299c82f Fix build on the latest nightly 2021-05-10 00:36:23 +02:00
Bob McWhirter
e8537ca9c2 Implement async RNG, including rand_core sync traits. 2021-05-06 14:35:46 -04:00
Bob McWhirter
dc919c236d Add an RNG trait. 2021-04-26 09:43:19 -04:00
Dario Nieuwenhuis
5ee87cf25d Remove Pin from Flash trait 2021-04-14 17:04:40 +02:00
Dario Nieuwenhuis
d336a4b38a Remove Pin from Delay trait 2021-04-14 17:04:40 +02:00
Dario Nieuwenhuis
f292647066 Remove Pin from I2c 2021-04-14 17:04:40 +02:00
Dario Nieuwenhuis
c15411d1bd Remove Pin from SPI 2021-04-14 17:04:40 +02:00
Dario Nieuwenhuis
8b1ffb2cb7 Remove Pin from GPIO traits 2021-04-14 17:04:40 +02:00
Dario Nieuwenhuis
59ccc45f28 Remove pin from Uart 2021-04-14 17:04:40 +02:00
xoviat
6f0fb6cab1 remove qei trait 2021-04-02 13:52:31 -05:00
Dario Nieuwenhuis
df42c38492 nrf/uarte: update to new api 2021-03-29 00:58:58 +02:00
Dario Nieuwenhuis
ec7309962a nrf/qspi: update to new api 2021-03-29 00:58:57 +02:00
xoviat
08990b2f6d
Merge pull request #103 from theunkn0wn1/doc/time
Document remainder of embassy::time
2021-03-24 07:26:48 -05:00
xoviat
3c9d5b61bb traits: add idle trait 2021-03-23 21:04:18 -05:00
Joshua Salzedo
8fbe83ac26
Added remainder of the docs for embassy::time's public interface. 2021-03-21 18:30:03 -07:00
Dario Nieuwenhuis
3de2d5c5bd Implement FullDuplex for nrf spim 2021-03-18 01:27:30 +01:00
Dario Nieuwenhuis
5bd705caa5
Merge branch 'master' into spi-trait 2021-03-17 03:06:04 +01:00
Dario Nieuwenhuis
6ed1a87138 Update features for latest nightly. 2021-03-17 02:48:16 +01:00
Dario Nieuwenhuis
3fcecd076b Rename i2c trait 2021-03-15 00:22:17 +01:00
xoviat
a4bee1c1d2 update docs 2021-03-14 17:41:59 -05:00
xoviat
6cebd27cc1 add embedded-hal 2021-03-11 16:28:21 -06:00
xoviat
fa807d2f08 add qei trait and implementation 2021-03-11 16:25:38 -06:00
xoviat
5df6e57949 update docs 2021-03-08 14:00:31 -06:00
xoviat
f2ab4c4ec0 add spi trait 2021-03-08 12:35:55 -06:00
xoviat
9497d6c68a add write_read 2021-03-05 21:30:39 -06:00
xoviat
7a46e66298 revise i2c trait 2021-03-05 21:19:56 -06:00
xoviat
a3a36517bd update i2c trait 2021-03-03 09:29:18 -06:00
xoviat
492f7aeea6 add i2c trait 2021-03-02 15:09:47 -06:00
Dario Nieuwenhuis
d4f2c6cf00 Remove cargo namespaced-features 2021-03-02 21:15:12 +01:00