Commit Graph

80 Commits

Author SHA1 Message Date
6ab4ecaf83 Stop sampling when exiting the Saadc methods
Prior to this commit, the onDrop function was being dropped immediately and not on exiting the Saadc sampling methods.
2023-01-18 14:51:46 +11:00
10c9cc31b1 Remove unnecessary use of atomic-polyfill.
Only use it when CAS is actually needed.
2022-12-23 20:46:49 +01:00
1e2fb0459d Switch to async-fn-in-trait 2022-11-25 21:02:06 +01:00
52c03cf0a4 Add more docs 2022-10-24 22:48:40 +03:00
ac61e0ee9f fmt 2022-10-24 22:39:13 +03:00
33f75419e5 Unify i2cv1 definition with i2cv2 2022-10-24 22:34:10 +03:00
6062978d58 Remove weird async timeouts 2022-10-24 22:22:20 +03:00
ca8afacfd0 Implement TimeoutI2c for i2cv2 2022-10-24 22:11:15 +03:00
9ad7e85288 Merge branch 'i2c_timeout2_v2' into i2c_timeout2 2022-10-24 21:50:29 +03:00
9b209ffe1c Add docs 2022-10-24 12:39:47 +03:00
5f02bee388 Gate TimeoutI2c behind i2cv1 2022-10-24 12:34:55 +03:00
1bed02296c i2cv2 timeouts 2022-10-24 12:33:17 +03:00
d99841fea9 Implement time feature 2022-10-24 11:38:15 +03:00
4ce4131f8b Implement i2cv1 timeout 2022-10-24 11:30:04 +03:00
72c2e985bb Update embedded-hal versions and explicitly pin 2022-09-29 11:27:46 +02:00
a0487380da Replace futures::future::poll_fn -> core::future::poll_fn. 2022-09-22 16:42:49 +02:00
8ba421f324 Do not use cfg_if for embedded-hal-async feature gates.
Old code used `cfg_if!` because rustc still parses code inside disabled cfg's, and Rust stable at that time couldn't parse the new GAT where-clause location. This is not the case anymore.
2022-08-31 03:11:21 +02:00
21072bee48 split embassy-util into embassy-futures, embassy-sync. 2022-08-22 22:18:13 +02:00
936473b68a Make sda/scl pullups separate as in nRF HAL 2022-08-10 12:36:15 +03:00
6498324b58 Implement I2C pullup configuration 2022-08-09 22:13:35 +03:00
a0f1b0ee01 Split embassy crate into embassy-executor, embassy-util. 2022-07-29 23:40:36 +02:00
4901c34d9c Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral 2022-07-23 14:00:19 +02:00
8a9d2f59af Update embassy-stm32 2022-07-23 02:40:13 +02:00
5ecbe5c918 embassy-stm32: Simplify time
- Remove unused `MilliSeconds`, `MicroSeconds`, and `NanoSeconds` types
- Remove `Bps`, `KiloHertz`, and `MegaHertz` types that were only used
for converting to `Hertz`
- Replace all instances of `impl Into<Hertz>` with `Hertz`
- Add `hz`, `khz`, and `mhz` methods to `Hertz`, as well as
free function shortcuts
- Remove `U32Ext` extension trait
2022-07-10 21:46:45 -05:00
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
880b71a1e8 impl SetConfig for stm32 i2c and SPI 2022-07-09 02:28:05 +02:00
43aec9083c Cleanup 2022-07-08 08:03:38 +02:00
01ef03f446 stm32/i2c: impl ErrorType for all. 2022-07-07 15:46:30 +02:00
399e7a4791 NoDma 2022-07-07 15:46:30 +02:00
be731b222e Cleanup 2022-07-07 15:46:30 +02:00
0fe818f4f8 v1 fix 2022-07-07 15:46:30 +02:00
1ed5b387f9 v2 fix 2022-07-07 15:46:30 +02:00
02812754ec rustfmt 2022-07-07 15:46:30 +02:00
2460d21fa4 Add EH 1.0 impls for stm32 i2c 2022-07-07 15:46:30 +02:00
a8703b7598 Run rustfmt. 2022-06-12 22:22:31 +02:00
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
ca88ace98d Reset peripherals on enable 2022-03-18 00:46:46 +02:00
9bad9365dc Update rust nightly, embedded-hal 1.0, embedded-hal-async. 2022-03-11 00:38:07 +01:00
dd828a7a92 stm32: move macrotables to embassy-stm32 build.rs 2022-02-26 03:23:09 +01:00
e6299549a0 stm32/i2c: use one static per instance instead of an array. 2022-02-26 01:23:17 +01:00
bf80504ac7 stm32: centralize gpio reg access in the gpio module. 2022-02-24 02:49:20 +01:00
1e69a8c484 stm32: move pin trait impls from macrotables to build.rs 2022-02-23 19:54:46 +01:00
b4abb1f5c2 stm32: move dma trait impls from macrotables to build.rs 2022-02-23 19:16:37 +01:00
39d06b59cd Update stm32-data 2022-02-14 02:12:06 +01:00
340eb4eead stm32: add rust stable support 2022-02-12 02:45:52 +01:00
b99ab3d5d9 stm32: Add standard crate-wide macros for pin/dma traits, switch all drivers to use them. 2022-02-10 21:38:03 +01:00
a8bd3ab952 Add missing + 'd on unborrows. 2022-02-10 16:06:42 +01:00
4032fc0655 Support unstable-trait feature for stm32 2022-01-26 22:39:06 +01:00
3fc54236ea stm32/i2c: allow empty transfers with async api 2022-01-25 16:28:49 +01:00
97ab859f00 stm32/i2c: expose all functionality as inherent methods. 2022-01-19 17:59:55 +01:00