Dario Nieuwenhuis
189b15c426
stm32/timer: docs.
2023-12-19 17:35:38 +01:00
Dario Nieuwenhuis
124478c5e9
stm32: more docs.
2023-12-18 19:11:23 +01:00
eZio Pan
879c0ad989
after stm32-metapac update, TIM CR1 ARPE enum to bool
2023-12-14 21:33:35 +08:00
Grant Miller
8c0e2748db
stm32/timer: Fix frequency off-by-one
2023-12-01 22:09:15 -06:00
Dion Dokter
5b3f75dc72
Merge branch 'master' into center-align
2023-10-20 14:17:55 +02:00
Dion Dokter
6f2995cd4c
Invert assert
2023-10-20 10:41:39 +02:00
Ralf
9a7fda87b0
STM32: timer enable_output does not take bool, but just enables the output
2023-10-13 18:52:10 +02:00
Ralf
adc810d24b
STM32: Fix regression in advanced timer to enable output of PWM signal by partly reverting commit 74eb519
2023-10-13 17:38:40 +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
randi
710874021a
Implemented Pwm trait for complementary pwm from embedded_hal
2023-10-07 12:22:31 +13:00
randi
b217d147de
Implemented Pwm trait from embedded_hal
2023-10-07 11:57:19 +13:00
Dion Dokter
a9dc887060
Added clarifying comment
2023-10-02 21:41:30 +02:00
Dion Dokter
137e47f98d
Do affect the frequency
2023-10-02 21:14:44 +02:00
Dion Dokter
561126b0d6
stm32: Add the ability to center-align timers
2023-10-01 23:09:01 +02:00
xoviat
4999de6f82
rustfmt
2023-09-30 12:53:17 -05:00
Daniel Berlin
9b8bdad403
Fix clippy error exposed by moving out of macros
2023-09-30 13:07:11 -04:00
Daniel Berlin
3c3fb0a529
Remove unused imports
2023-09-30 12:20:31 -04:00
Daniel Berlin
dc4c27aead
Move one more method out of macros
2023-09-30 12:16:47 -04:00
Daniel Berlin
74eb519810
Move trait impls out of macros
2023-09-30 12:14:20 -04:00
Daniel Berlin
61dc36b1f2
Fix small formatting issue
2023-09-30 11:36:32 -04:00
Daniel Berlin
55a0a15be2
Fix trait inconsistency between sealed traits and implementations
2023-09-30 11:19:09 -04:00
Daniel Berlin
dffdb9268b
Revert "Forgot set_count_direction and set_clock_division in 32 bit instance"
2023-09-28 21:56:18 -04:00
Daniel Berlin
e70143ef8f
Forgot set_count_direction and set_clock_division in 32 bit instance
2023-09-28 20:01:04 -04:00
Daniel Berlin
23f3889167
Add support for STM32 input capture filter
2023-09-28 09:35:43 -04:00
Daniel Berlin
f866735802
Add support for input capture function
2023-09-27 20:15:57 -04:00
xoviat
1d87ec9cc3
stm32/qei: fix struct naming ( #1852 )
...
Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-09-02 00:30:27 +02:00
xoviat
0823d9dc93
Merge pull request #1845 from xoviat/qei
...
stm32: add qei
2023-08-30 23:16:33 +00:00
xoviat
c10fb7c1c4
stm32: implement qei
2023-08-30 18:10:26 -05:00
Dion Dokter
36ec9bcc1d
Stm32 timer prevent hardfault
2023-08-30 19:35:15 +02:00
xoviat
416ecc73d8
add qei draft
2023-08-29 20:06:53 -05:00
Aurelien Jacobs
2ea17d2783
stm32: allow setting the PWM output polarity
2023-08-18 16:45:50 +02:00
Aurélien Jacobs
78bb261246
stm32: allow setting PWM duty cycle to 100%
...
Setting the compare_value to max_compare_value make the PWM output
go low when the timer reach the max_compare_value and go high again
on the next timer clock, when the value roll back to 0.
So to allow a 100% PWM that never goes low, the compare_value must
be set to max_compare_value + 1.
2023-08-18 16:10:49 +02:00
Grant Miller
d49f40dd5c
embassy-stm32: Misc clippy fixes
2023-08-06 15:00:39 -05:00
xoviat
0d7b005252
stm32/pwm: add output type control
2023-07-29 12:01:32 -05:00
Dario Nieuwenhuis
3690af9bea
stm32/timer: merge pwm module into timer. ( #1703 )
...
The traits there are applicable to timer use cases other than PWM.
It doesn't make sense to keep them separated.
2023-07-28 15:29:27 +02:00
Dario Nieuwenhuis
558918651e
stm32: update stm32-metapac.
2023-06-19 03:22:12 +02:00
Dario Nieuwenhuis
921780e6bf
Make interrupt module more standard.
...
- Move typelevel interrupts to a special-purpose mod: `embassy_xx::interrupt::typelevel`.
- Reexport the PAC interrupt enum in `embassy_xx::interrupt`.
This has a few advantages:
- The `embassy_xx::interrupt` module is now more "standard".
- It works with `cortex-m` functions for manipulating interrupts, for example.
- It works with RTIC.
- the interrupt enum allows holding value that can be "any interrupt at runtime", this can't be done with typelevel irqs.
- When "const-generics on enums" is stable, we can remove the typelevel interrupts without disruptive changes to `embassy_xx::interrupt`.
2023-06-08 18:00:48 +02:00
chemicstry
2df665da8a
Revert "Make advanced timer trait not require general purpose timer trait as the timers are too different."
...
This reverts commit 4988dfe981
.
2022-07-12 15:11:57 +03:00
Grant Miller
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
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
Matous Hybl
a88c5e716e
stm32: Register access for timers now doesn't require self
2022-02-28 16:20:42 +01:00
Dario Nieuwenhuis
dd828a7a92
stm32: move macrotables to embassy-stm32 build.rs
2022-02-26 03:23:09 +01:00
Matous Hybl
4988dfe981
Make advanced timer trait not require general purpose timer trait as the timers are too different.
2022-01-18 11:18:54 +01:00
Matous Hybl
a1f7a94c69
Add low level timer API.
2022-01-13 16:05:54 +01:00