Commit Graph

54 Commits

Author SHA1 Message Date
cdfd128185 Merge #545
545: Add adapter for implementing async traits for blocking types r=lulf a=lulf

This allows writing drivers relying on async traits, while still
functioning with implementations that already implement the embedded-hal
traits.

Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-01-03 14:17:21 +00:00
e1545066e5 Some API documentation fixes in traits 2021-12-19 08:49:19 +01:00
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
2bbd1ddb8a Remove unneeded rustfmt::skip 2021-12-16 11:37:53 +01:00
eac604accd Fix missing lifetime bounds 2021-11-21 10:10:28 +00:00
c2da498263 Update to defmt 3.0ish.
Lots of gitrevs deps.
2021-11-15 11:09:08 -05:00
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
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
a2e7c24e00 Clippy fixes 2021-10-18 01:05:29 +02:00
f2623e7e9b Update lots of deps 2021-09-11 01:35:23 +02:00
11d2b0cdc1 Remove more unused features. 2021-09-03 17:13:54 +02:00
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
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
7fa3b27cac Move random utils to another trait. 2021-08-30 09:55:29 -04:00
d525f51940 Add a convenience next(range) to Rng. 2021-08-27 16:10:01 -04:00
07d4b196f7 Update nightly, remove removed features. 2021-08-04 19:48:14 +02:00
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
3f379e06b0 Begin reworking SPI to add DMA for stm32. 2021-07-23 13:22:39 -04:00
a345dd9e2b More formatting! 2021-07-23 13:22:39 -04:00
22901938ce Split up the SPI trait into several with shared Error associated type. 2021-07-23 13:22:39 -04:00
857ac3386b nrf async twim 2021-06-04 17:31:35 +02:00
f7858631d8 stm32: fix build, add ci 2021-05-17 03:16:58 +02:00
a130499c9a Get rid of some warnings 2021-05-14 23:42:12 -03:00
6c3299c82f Fix build on the latest nightly 2021-05-10 00:36:23 +02:00
e8537ca9c2 Implement async RNG, including rand_core sync traits. 2021-05-06 14:35:46 -04:00
dc919c236d Add an RNG trait. 2021-04-26 09:43:19 -04:00
5ee87cf25d Remove Pin from Flash trait 2021-04-14 17:04:40 +02:00
d336a4b38a Remove Pin from Delay trait 2021-04-14 17:04:40 +02:00
f292647066 Remove Pin from I2c 2021-04-14 17:04:40 +02:00
c15411d1bd Remove Pin from SPI 2021-04-14 17:04:40 +02:00
8b1ffb2cb7 Remove Pin from GPIO traits 2021-04-14 17:04:40 +02:00
59ccc45f28 Remove pin from Uart 2021-04-14 17:04:40 +02:00
6f0fb6cab1 remove qei trait 2021-04-02 13:52:31 -05:00
df42c38492 nrf/uarte: update to new api 2021-03-29 00:58:58 +02:00
ec7309962a nrf/qspi: update to new api 2021-03-29 00:58:57 +02:00
08990b2f6d Merge pull request #103 from theunkn0wn1/doc/time
Document remainder of embassy::time
2021-03-24 07:26:48 -05:00
3c9d5b61bb traits: add idle trait 2021-03-23 21:04:18 -05:00
8fbe83ac26 Added remainder of the docs for embassy::time's public interface. 2021-03-21 18:30:03 -07:00
3de2d5c5bd Implement FullDuplex for nrf spim 2021-03-18 01:27:30 +01:00
5bd705caa5 Merge branch 'master' into spi-trait 2021-03-17 03:06:04 +01:00
6ed1a87138 Update features for latest nightly. 2021-03-17 02:48:16 +01:00
3fcecd076b Rename i2c trait 2021-03-15 00:22:17 +01:00
a4bee1c1d2 update docs 2021-03-14 17:41:59 -05:00
6cebd27cc1 add embedded-hal 2021-03-11 16:28:21 -06:00
fa807d2f08 add qei trait and implementation 2021-03-11 16:25:38 -06:00
5df6e57949 update docs 2021-03-08 14:00:31 -06:00
f2ab4c4ec0 add spi trait 2021-03-08 12:35:55 -06:00
9497d6c68a add write_read 2021-03-05 21:30:39 -06:00
7a46e66298 revise i2c trait 2021-03-05 21:19:56 -06:00
a3a36517bd update i2c trait 2021-03-03 09:29:18 -06:00