c6989dfbca
Remove nightly and unstable-traits features in preparation for 1.75.
2023-11-29 17:26:33 +01:00
bda99e59ec
stm32: fix uart parity, add comment why it is so
2023-10-24 15:57:03 +03:00
1e362c750b
stm32 uart: use ConfigError instead of () as error
2023-10-24 09:54:17 +03:00
188ee59ba6
stm32: fix setting uart databits
2023-10-23 22:40:24 +03:00
591612db7e
stm32 uart: return error if rx and tx not enabled
2023-10-23 22:39:24 +03:00
a6bbb130c5
make set_config concrete methods public again
2023-10-12 23:03:33 +01:00
ecdd7c0e2f
enable clock first
2023-10-12 11:04:44 +02:00
f65a96c541
STM32: combine RccPeripherals reset() and enable() to reset_and_enable()
2023-10-12 11:04:19 +02:00
05218a52e6
stm32: update set_config
2023-10-01 09:39:10 -05:00
44bb405683
stm32/usart: enable fifo mode on usartv4.
2023-09-26 04:38:53 +02:00
5d8817d109
stm32/usart: return error instead of panicking on bad baudrate.
2023-09-26 00:19:27 +02:00
88eb5cca71
stm32: Implement set_config
for Uart structs
2023-09-17 18:38:03 +01:00
49847ff432
Implement blocking embedded-io::Write for Uart & UartTx
2023-09-14 10:09:09 +02:00
582ef90994
stm32/usart: fix usart not wake up issue
2023-09-13 23:47:46 +08:00
274f63a879
stm32: fix refcounts for usart, spi, and i2c
2023-09-04 15:47:33 -05:00
a5484cd119
Modified the brr calculation to be fully 32-bit
2023-08-22 20:52:02 +02:00
f26dd54f63
Update embedded-hal to 1.0.0-rc.1 ( #1783 )
2023-08-16 00:40:56 +02:00
5d5cd23715
Update to embedded-io 0.5 ( #1752 )
2023-08-07 13:43:09 +02:00
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
3c41784de8
stm32/usart: fix error msg for lptim
2023-07-24 18:08:23 -05:00
36ff688fab
stm32/uart: optimize swap_rx_tx
2023-07-19 10:50:40 +02:00
3df2c71e6c
stm32/uart: add swap_rx_tx
2023-07-19 10:26:47 +02:00
e892014b65
Update stm32-metapac, includes chiptool changes to use real Rust enums now.
2023-06-29 02:01:33 +02:00
558918651e
stm32: update stm32-metapac.
2023-06-19 03:22:12 +02:00
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
404aa29289
cortex-m: remove owned interrupts.
2023-06-01 03:25:19 +02:00
aba0f8fd6c
stm32/uart: refactor rx ringbuffer
...
- remove some race conditions
- allow full use of rx buffer
2023-05-29 14:49:43 -05:00
cb5df138d6
Use found divider instead of re-reading brr
2023-05-26 23:48:49 +02:00
f616b22159
Fix yet another v1 error
2023-05-25 18:16:46 +02:00
c5bf36eebf
Fix oversampling message for usart v1
2023-05-25 17:56:52 +02:00
387a4fcb8e
Exclude usart_v1
2023-05-25 17:24:22 +02:00
cd6256a924
Add assume_noise_free to usart configuration
...
Effectively setting cr3.onebit
2023-05-25 17:24:22 +02:00
316be179af
stm32: move to bind_interrupts
...
disable lora functionality for now
2023-05-24 17:29:56 -05:00
977a7906e4
stm32 uart: Fix error flag handling for blocking operations
...
Clear and report the error flags one by one and pop the data byte only
after all error flags were handled.
For v1/v2 we emulate the v3/v4 behaviour by buffering the status
register because a read to the data register clears all flags at once
which means we might loose all but the first error.
2023-05-14 21:10:37 +02:00
0584312ef0
Fix some typos
2023-05-08 23:25:01 +02:00
a61701b756
stm32/usart: add OVER8 and PRESC support, update PAC
2023-05-02 19:36:00 +02:00
96e8a7ddb9
stm32/uart: feature-gate ringbuffer out when using gpdma, not supported yet.
2023-05-01 22:43:23 +02:00
4ea6662e55
Do not disable dma request when idle line is detected
2023-05-01 22:42:36 +02:00
49455792cb
Ring-buffered uart rx with one-period overrun detection
2023-05-01 22:42:36 +02:00
b77794c9a7
stm32/uart: abort on error
2023-04-28 21:43:03 -05:00
173c65b543
stm32/dma: refactor.
2023-04-18 16:37:35 +02:00
f681b9d4e5
Remove the _todo_embedded_hal_serial impls. EH will probably not have these serial traits.
2023-04-15 00:58:58 +02:00
cfbe93c280
Rework bufferedUart to get rid of PeripheralMutex in a similar fashion as nrf & rp. Also adds embedded-hal traits to bufferedUart
2023-03-31 10:43:30 +02:00
c8a7b74bc2
Merge #1192 #1193
...
1192: stm32/usart: implement stop_bits configuration r=Dirbaio a=pattop
1193: stm32/usart: fix LPUART clock multiplier r=Dirbaio a=pattop
According to RM0351 Rev 9 (L4) and RM0399 Rev 3 (H7):
baud = (256 * clock) / LPUARTDIV
Co-authored-by: Patrick Oppenlander <patrick.oppenlander@gmail.com >
2023-02-06 13:39:37 +00:00
fda36fd81b
stm32/usart: fix LPUART clock multiplier
...
According to RM0351 Rev 9 (L4) and RM0399 Rev 3 (H7):
baud = (256 * clock) / LPUARTDIV
2023-02-06 11:22:41 +11:00
64ebb9b7fe
stm32/usart: implement stop_bits configuration
2023-02-06 09:44:15 +11:00
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
16590732f8
Update mod.rs
2023-01-14 07:13:29 +01:00
816b214403
Only implement Write
2023-01-14 07:12:43 +01:00
4c4b47f78a
feat(stm32): Add embedded-io traits for UartRx and UartTx
2023-01-06 14:24:29 +01:00