Commit Graph

3455 Commits

Author SHA1 Message Date
chemicstry
ac61e0ee9f fmt 2022-10-24 22:39:13 +03:00
chemicstry
33f75419e5 Unify i2cv1 definition with i2cv2 2022-10-24 22:34:10 +03:00
chemicstry
6062978d58 Remove weird async timeouts 2022-10-24 22:22:20 +03:00
chemicstry
ca8afacfd0 Implement TimeoutI2c for i2cv2 2022-10-24 22:11:15 +03:00
chemicstry
9ad7e85288 Merge branch 'i2c_timeout2_v2' into i2c_timeout2 2022-10-24 21:50:29 +03:00
Mathias
ad0eb3f4bd Implement flash padding to 256 under assumption that all QSPI NOR flashes are MultiwriteNorFlashes 2022-10-24 12:17:22 +02:00
Mathias
8d809c96ec Merge branch 'master' of https://github.com/embassy-rs/embassy into embassy-rp/flash 2022-10-24 12:14:26 +02:00
chemicstry
9b209ffe1c Add docs 2022-10-24 12:39:47 +03:00
chemicstry
5f02bee388 Gate TimeoutI2c behind i2cv1 2022-10-24 12:34:55 +03:00
chemicstry
1bed02296c i2cv2 timeouts 2022-10-24 12:33:17 +03:00
ivmarkov
516f4ce946 Fix embassy-time wasm build and fix a bug in wasm time driver 2022-10-24 12:15:53 +03:00
Grant Miller
545cc9326b stm32/adc: Remove voltage and temperature conversions 2022-10-24 04:00:29 -05:00
chemicstry
d99841fea9 Implement time feature 2022-10-24 11:38:15 +03:00
ivmarkov
e3cf4255c6 Help compiler with type inference 2022-10-24 11:31:54 +03:00
chemicstry
4ce4131f8b Implement i2cv1 timeout 2022-10-24 11:30:04 +03:00
ivmarkov
f78c706b89 Address review feedback 2022-10-24 11:10:59 +03:00
ivmarkov
4d5550070f Change time Driver contract to never fire the alarm synchronously 2022-10-24 09:17:43 +03:00
ivmarkov
53608a87ac Address feedback after code review 2022-10-24 08:21:35 +03:00
ivmarkov
ba6e452cc5 Documentation and initial testing framework
Add mock waker

First simple test

Tests & documentation
2022-10-24 08:21:31 +03:00
ivmarkov
c2404ee8ca Initial generic timer queue impl 2022-10-24 08:20:29 +03:00
bors[bot]
ce1cba761c
Merge #855
855: PDM microphone support for nrf r=Dirbaio a=pbert519

PDM microphones have a long startup phase, therefore the driver samples continuously and only switches the target buffer if the user requests sampling.

Co-authored-by: pbert <pbert@posteo.net>
2022-10-21 21:03:51 +00:00
bors[bot]
495ca6108c
Merge #1020
1020: Fix mistaken EP_IN_WAKERS r=Dirbaio a=mkj

I'm not totally certain, but this looks like a typo?

Co-authored-by: Matt Johnston <matt@ucc.asn.au>
2022-10-21 20:43:14 +00:00
bors[bot]
73d06dd67b
Merge #1021
1021: rp usb: wait for accept() completion r=Dirbaio a=mkj

This fixes failures when `defmt` feature isn't enabled (timing related). 

Co-authored-by: Matt Johnston <matt@ucc.asn.au>
2022-10-21 19:48:49 +00:00
Matt Johnston
866a42f3ae rp usb: wait for accept() completion
This ensures that the current response has finished being sent
before the subsequent set_address() happens. Otherwise connecting
a device is intermittent, can fail depending on timing.
2022-10-21 22:02:13 +08:00
Matt Johnston
f45d34ce7c Fix mistaken EP_IN_WAKERS 2022-10-20 23:46:02 +08:00
bors[bot]
bf0ad38640
Merge #1019
1019: Add missing files and features for basic example r=lulf a=lulf



Co-authored-by: Ulf Lilleengen <ulf.lilleengen@gmail.com>
2022-10-20 14:18:47 +00:00
Ulf Lilleengen
de103a5f4f Add missing files and features for basic example 2022-10-20 16:12:59 +02:00
bors[bot]
8c42b26fc6
Merge #1017
1017: Add missing examples to rust-analyzer linked projects r=lulf a=GrantM11235



Co-authored-by: Grant Miller <GrantM11235@gmail.com>
2022-10-19 10:37:22 +00:00
Grant Miller
fa495b8e88 Add missing examples to rust-analyzer linked projects 2022-10-19 03:39:29 -05:00
bors[bot]
d9c773f475
Merge #1014
1014: Add memory barriers to H7 flash driver to mitigate PGSERR errors r=lulf a=matoushybl

The stm32h7xx-hal uses only the ordering barrier, while the CubeMX uses the DSB and ISB instructions, to be on the safe side, both are used here.

Without the barrier, the PG bit is not set, when the writes are being done, resulting in an error.

Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-10-19 07:29:12 +00:00
bors[bot]
a669f4cfd8
Merge #1015
1015: Enable defmt in embassy-hal-common when defmt is enabled in stm32 HAL r=Dirbaio a=matoushybl



Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-10-18 21:12:05 +00:00
Matous Hybl
9d2641f2f5 Enable defmt in embassy-hal-common 2022-10-18 22:48:43 +02:00
Matous Hybl
6c5d81ada5 Add memory barriers to H7 flash driver to mitigate PGSERR errors
The stm32h7xx-hal uses only the ordering barrier, while the CubeMX uses the DSB and ISB instructions, to be on the safe side, both are used here.
2022-10-18 22:42:02 +02:00
bors[bot]
18453ee64c
Merge #1012
1012: rp i2c: have separate wakers for each i2c unit r=Dirbaio a=jsgf

If they both share one waker, there's the possibility that some wakeups could get lost.

Co-authored-by: Jeremy Fitzhardinge <jeremy@goop.org>
2022-10-18 08:29:43 +00:00
Jeremy Fitzhardinge
02a3cdb507 Associate state with the instance rather than having a separate array 2022-10-17 21:50:40 -07:00
Jeremy Fitzhardinge
e4c2b2aa9a rp i2c: have separate wakers for each i2c unit
If they both share one waker, there's the possibility that some wakeups
could get lost.
2022-10-16 18:00:23 -07:00
pbert
a4afab4640 add support for pdm microphones in nrf driver 2022-10-13 18:37:53 +02:00
bors[bot]
b7d0944265
Merge #984 #1006
984: rp pico async i2c implementation r=Dirbaio a=jsgf

This implements an interrupt-driven async i2c master. It is based on https://github.com/embassy-rs/embassy/pull/914, a bit of https://github.com/embassy-rs/embassy/pull/978 and `@ithinuel's` https://github.com/ithinuel/rp2040-async-i2c.git

This is still work-in-progress, and is currently untested.

1006: Removes some of the code duplication for UarteWithIdle r=Dirbaio a=huntc

This PR removes some of the code duplications for `UarteWithIdle` at the slight expense of requiring a split when using idle processing. As the nRF example illustrates though given the LoC removed, this expense seems worth the benefit in terms of maintenance, and the avoidance of copying over methods. My main motivation for this PR was actually due to the `event_endtx` method not having been copied across to the idle-related code.

Tested the uart_idle example on my nRF52840-dk, and from within my app. Both appear to work fine.

Co-authored-by: Jeremy Fitzhardinge <jeremy@goop.org>
Co-authored-by: huntc <huntchr@gmail.com>
2022-10-12 19:41:52 +00:00
bors[bot]
1559374a19
Merge #1010
1010: (embassy-rp): correctly enable RTC_IRQ when scheduling an RTC alarm r=Dirbaio a=MathiasKoch



Co-authored-by: Mathias <mk@blackbird.online>
2022-10-12 19:15:48 +00:00
Mathias
5846b4ff7d Correctly enable RTC_IRQ when scheduling an RTC alarm 2022-10-12 10:54:47 +02:00
bors[bot]
83fcc360fe
Merge #985
985: Create Sx126X LORA driver r=lulf a=ceekdee

Implementation features:

- update embassy-lora to support Semtech SX126X chips, specifically the RAK4631 chip (nrf52480 and sx1262).

- support additional SX126X packages by adding a feature (reference feature rak4631) and updating the board specific Rust file.  To enable feature rak4631, settings.json must currently enable "rust-analyzer.linkedProjects" for "examples/nrf/Cargo.toml".

- provide tx/rx examples in examples/nrf to show compatibility with the interface provided by the SX127X LORA implementation.

Only LORA P2P communication has been tested.  Implementation lines marked with ??? indicate areas for further investigation.  Furthermore, I question whether the DIO1 handler is adequate for catching all interrupt sequences.

This implementation is patterned after the C/C++ implementation provided by Semtech, available through the RAK-nRF52-RUI developers platform.

Co-authored-by: ceekdee <taigatensor@gmail.com>
Co-authored-by: Chuck Davis <91165799+ceekdee@users.noreply.github.com>
2022-10-11 08:48:55 +00:00
bors[bot]
71a56292d6
Merge #1008
1008: Add note on partition sizes to bootloader docs r=lulf a=lulf

See #1007

Co-authored-by: Ulf Lilleengen <ulf.lilleengen@gmail.com>
2022-10-11 08:27:00 +00:00
Ulf Lilleengen
4da6320e63 Add note on partition sizes to bootloader docs
See #1007
2022-10-11 10:20:31 +02:00
ceekdee
327d3cf0df Change rak4631 feature to sx126x, removing use in board-specific processing; simplify the P2P examples; correct RSSI computation. 2022-10-10 12:35:42 -05:00
Chuck Davis
79ba20d315
Merge branch 'embassy-rs:master' into master 2022-10-10 09:17:07 -05:00
bors[bot]
9d5b524bb0
Merge #1005
1005: Expose Pin::pin() and Pin::bank() as public r=lulf a=mkj



Co-authored-by: Matt Johnston <matt@ucc.asn.au>
2022-10-10 06:49:34 +00:00
bors[bot]
ef533e6df4
Merge #1004
1004: Fix internal channels for adc v2 r=lulf a=chemicstry

Internal channel reading was broken on adc_v2, because `Adc::read()` requires gpio pin trait, which was not implemented by `VrefInt`, `Temperature`, `Vbat`. The required configuration bits `tsvrefe`, `vbate` were not enabled either. This PR makes it a bit closer to how adc_v4 works.

While at it, I also changed adc_v2 to use `RccPeripheral` instead of permanently enabling all ADCs.

Co-authored-by: chemicstry <chemicstry@gmail.com>
2022-10-10 06:28:41 +00:00
huntc
e1faf88607 Removes some of the code duplication for UarteWithIdle
This commit removes some of the code duplication for UarteWithIdle at the expense of requiring a split. As the example illustrates though, this expense seems worth the benefit in terms of maintenance, and the avoidance of copying over methods. My main motivation for this commit was actually due to the `event_endtx` method not having been copied across.
2022-10-09 13:07:25 +11:00
Chuck Davis
3d0ba58b2d
Merge branch 'embassy-rs:master' into master 2022-10-08 14:38:41 -05:00
ceekdee
f554962f54 Improve generics and consolidate antenna handling 2022-10-08 14:32:22 -05:00