Dario Nieuwenhuis
a3ea01473a
stm32: fix dac trait
2023-11-25 00:30:30 +01:00
Adam Greig
09d7950313
STM32 DAC: Rework DAC driver, support all families.
2023-11-25 00:29:45 +01:00
Adam Greig
267cbaebe6
STM32 DAC: Disable circular writes with GPDMA as it doesn't yet support circular transfers
2023-11-25 00:29:45 +01:00
Adam Greig
31fc337e2f
STM32 DAC: Swap to new TSEL enum entirely in-HAL
2023-11-25 00:29:45 +01:00
Adam Greig
135f350020
STM32 DAC: Use new Mode enum for setting channel mode
2023-11-25 00:29:45 +01:00
xoviat
b24520579a
rcc: ahb/apb -> hclk/pclk
2023-10-15 19:51:35 -05:00
Dario Nieuwenhuis
97ca0e77bf
stm32: avoid creating many tiny critical sections in init.
...
Saves 292 bytes on stm32f0 bilnky with max optimizations (from 3132 to 2840).
2023-10-12 16:20:34 +02:00
pbert
ecdd7c0e2f
enable clock first
2023-10-12 11:04:44 +02:00
pbert
f65a96c541
STM32: combine RccPeripherals reset() and enable() to reset_and_enable()
2023-10-12 11:04:19 +02:00
Dario Nieuwenhuis
85c6f23dcb
Merge pull request #2018 from jamesmunns/add-derives
...
Add some uncontroversial derives to Error types
2023-10-07 00:03:10 +00:00
Matt Ickstadt
f01609036f
h7: implement RTC and LSE clock configuration
2023-10-06 13:28:30 -05:00
James Munns
930b8f3495
Add some uncontroversial derives to Error types
2023-10-06 17:45:35 +02:00
Dario Nieuwenhuis
036e6ae30c
Rename embassy-hal-common to embassy-hal-internal, document it's for internal use only. ( #1700 )
2023-07-28 13:23:22 +02:00
JuliDi
a56b3e9a44
update feature gates for v3
2023-07-22 19:47:36 +02:00
JuliDi
0378366e29
Merge remote-tracking branch 'xoviat/update-metapac' into fix-dac-example
2023-07-22 19:26:20 +02:00
JuliDi
80ce6d1fb7
update DAC triggers to incorporate v3
2023-07-22 19:25:02 +02:00
xoviat
64f8a779ca
stm32: add dac fix
2023-07-22 11:54:54 -05:00
Adam Greig
e5b4641f9e
stm32/dac: set pin mode to analog (ref #334 )
2023-07-22 13:19:26 +01:00
Dario Nieuwenhuis
c9b9be5b81
hal-common: require DerefMut for peripherals, not just Deref.
...
Otherwise you can create multiple drivers on the same singleton like this:
```rust
let mut input = Input::new(&pin, Pull::None);
let mut output = Output::new(&pin, Level::Low, Speed::Low);
input.is_high();
output.set_high();
input.is_high();
output.set_high();
```
Thanks @pennae for reporting.
2023-07-02 22:16:01 +02:00
JuliDi
91c31d5e43
Update DAC examples, add DAC + DMA example
2023-06-28 11:58:25 +02:00
JuliDi
9c81d63155
fix warnings
2023-06-27 22:33:17 +02:00
JuliDi
56dd22f0ac
feature-gate set_channel_mode, undo dma.rs changes
2023-06-27 21:23:47 +02:00
JuliDi
afec1b439b
feature-gate dma write, make trigger not return a result
2023-06-27 18:17:51 +02:00
JuliDi
e7bc84dda8
fix issues when DAC2 present, add additional options to DMA (NOT YET WORKING with STM32H7A3ZI)
2023-06-26 09:42:25 +02:00
JuliDi
8cafaa1f3c
add docs, cleanup
2023-06-25 11:54:25 +02:00
JuliDi
df944edeef
fix minor issues with splitting channels etc
2023-06-25 10:53:35 +02:00
JuliDi
388d3e273d
first attempt at fixing the 2nd channel problem
2023-06-24 13:10:59 +02:00
JuliDi
915f79c974
allow independent use of ch1 and ch2 on dac
2023-06-23 12:14:40 +02:00
JuliDi
78736328a0
update docs and update to new dma interface
2023-06-22 10:44:08 +02:00
JuliDi
56ab6d9f14
remove write_X variants
2023-06-19 13:54:22 +02:00
JuliDi
88052480b1
fix typo, minor cleanup
2023-06-19 13:50:17 +02:00
JuliDi
218b102b28
remove Alignment and make Value and Value array look the same
2023-06-19 13:46:17 +02:00
JuliDi
fe7b72948a
add ValueArray type and respective write functions
2023-06-19 13:42:25 +02:00
JuliDi
f8ee33abb9
add half transfer interrupt and circular dma
2023-06-18 18:51:36 +02:00
JuliDi
78a2ca8a0e
remove unnecessary use, disable DAC and DMA after transfer
2023-06-17 11:51:57 +02:00
JuliDi
f5d084552d
implement mwe of a DMA write() method for DAC
2023-06-17 11:48:21 +02:00
chemicstry
5f01e56728
Merge v1, v2 DAC and update register definitions
2022-08-04 03:02:57 +03:00
Dario Nieuwenhuis
4901c34d9c
Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral
2022-07-23 14:00:19 +02:00
Dario Nieuwenhuis
8a9d2f59af
Update embassy-stm32
2022-07-23 02:40:13 +02:00
Dario Nieuwenhuis
a8703b7598
Run rustfmt.
2022-06-12 22:22:31 +02:00
Dario Nieuwenhuis
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
Michal Srb
c1914a477d
stm32/dac: Check proper channel
2022-04-12 12:49:06 +02:00
Dario Nieuwenhuis
50ff63ab88
Add STM32L5 support.
2022-04-08 03:11:38 +02:00
chemicstry
bdeb537ffa
Fix compile for stm32wb
2022-03-18 01:33:39 +02:00
chemicstry
b30a42aff8
Fix RCC safety and add reset to DAC
2022-03-18 01:16:07 +02:00
Dario Nieuwenhuis
dd828a7a92
stm32: move macrotables to embassy-stm32 build.rs
2022-02-26 03:23:09 +01:00
Dario Nieuwenhuis
ea5cd19c30
stm32: fix build for h7ab
2022-02-24 06:28:29 +01:00
Dario Nieuwenhuis
052f370de9
stm32: move ADC, DAC pin impls to build.rs
2022-02-23 20:21:28 +01:00
Dario Nieuwenhuis
550da471be
stm32: Remove OptionalPin
...
The idea behind OptionalPin has a few problems:
- you need to impl the signal traits for NoPin which is a bit weird https://github.com/embassy-rs/embassy/blob/master/embassy-stm32/src/dcmi.rs#L413-L416
- you can pass any combination of set/unset pins, which needs checking at runtime https://github.com/embassy-rs/embassy/blob/master/embassy-stm32/src/dcmi.rs#L130
The replacement is to do multiple `new` constructors for each combination of pins you want to take.
2022-02-10 02:38:10 +01:00
Ben Gamari
8da6471a50
stm32/dac: Fix disable_channel
...
Previously disable_channel enabled rather than disabled the requested
channel due to an apparent copy-paste error. Refactor to eliminate this
sort of issue by construction.
2021-12-28 23:27:59 -05:00