Dario Nieuwenhuis
a84b33995e
rp: remove mod sealed.
2024-04-05 00:48:46 +02:00
Rafael Bachmann
255ed29853
fix minor clippy lints in embassy_rp
2024-03-18 23:28:58 +01:00
Jomer.Dev
0708ce1410
Use saturating_sub to make sure we don't overflow
2024-01-29 17:14:23 +01:00
James Munns
5e08bb8bc3
A rebase ate my doc comment!
2024-01-19 15:46:36 +01:00
James Munns
1ce96f79fb
Fun Learning about the RP2040 UART impl!
2024-01-19 14:02:17 +01:00
James Munns
94290981c3
Debugging RSR
2024-01-19 14:02:17 +01:00
James Munns
fe172109be
A little more cleanup
2024-01-19 14:02:17 +01:00
James Munns
24fc12667d
Update with more docs and less panics
2024-01-19 14:02:17 +01:00
James Munns
9fd49fb9d6
Add a basic "read to break" function
2024-01-19 14:02:17 +01:00
Ulf Lilleengen
f4b77c967f
docs: document all embassy-rp public apis
...
Enable missing doc warnings.
2023-12-19 14:19:46 +01:00
Ulf Lilleengen
486b67e895
docs: document spi, rtc and rest of uart for embassy-rp
2023-12-19 11:26:08 +01:00
Ulf Lilleengen
e45e3e76b5
docs: embassy-rp rustdoc and refactoring
2023-12-19 10:56:22 +01:00
James Munns
2b497c1e57
Fix nb on rp uart
2023-12-18 18:38:13 +01:00
Dario Nieuwenhuis
c6989dfbca
Remove nightly and unstable-traits features in preparation for 1.75.
2023-11-29 17:26:33 +01:00
Adam Greig
0621e957a0
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
2023-10-15 01:30:12 +01:00
Dario Nieuwenhuis
f26dd54f63
Update embedded-hal to 1.0.0-rc.1 ( #1783 )
2023-08-16 00:40:56 +02:00
pennae
e6d4043279
rp: rename gpio::Pin::io to gpio::Pin::gpio
...
we'll need access to the pin io bank registers for an upcoming fix, and
having both `io` and `io_bank` or similar can get confusing quickly.
rename `io` to `gpio` to avoid this, and also match the type while there.
2023-07-31 18:28:31 +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
Dario Nieuwenhuis
837ebe405f
rp: update rp-pac.
2023-06-16 01:41:07 +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
Dario Nieuwenhuis
404aa29289
cortex-m: remove owned interrupts.
2023-06-01 03:25:19 +02:00
Alpha3__0
dc28a42fd2
Fix return definition
2023-05-25 11:55:05 -07:00
Alpha3__0
0d80a95e54
Implement eh 0.2.* serial::Write for Uart/UartTx
2023-05-25 11:33:29 -07:00
pennae
14a5d03af2
rp: remove take!, add bind_interrupts!
2023-05-15 15:24:56 +02:00
Dirk Stolle
0584312ef0
Fix some typos
2023-05-08 23:25:01 +02:00
pennae
3c31236c10
rp: remove leftovers from #1414
...
forgot to remove these when they were no longer necessary or useful. oops.
2023-05-02 07:40:12 +02:00
pennae
b58b9ff390
rp/uart: report errors from dma receive
2023-05-01 15:36:53 +02:00
pennae
1d5adb8974
rp/uart: extract fifo draining from blocking_read
...
this will also be needed for dma operations.
2023-05-01 15:32:58 +02:00
pennae
be66e0f7ce
rp/uart: make dma multicore-safe
...
running rx and tx on different cores could lead to hangs if the dmacr
register modifys run concurrently. this is bad.
2023-05-01 15:32:58 +02:00
pennae
19588a9e6f
rp/uart: rename state to buffered_state
...
we'll add a dma state soon as well.
2023-05-01 15:22:39 +02:00
pennae
1d2f6667df
rp/uart: add set-break functions
...
sending break conditions is necessary to implement some protocols, and
the hardware supports this natively. we do have to make sure that we
don't assert a break condition while the uart is busy though, otherwise
the break may be inserted before the last character in the tx fifo.
2023-05-01 15:16:30 +02:00
pennae
7336b8cd88
rp/uart: add UartRx::new_blocking
2023-05-01 13:00:40 +02:00
bors[bot]
38c5b97df0
Merge #1378
...
1378: Add ability to invert UART pins, take 2 r=Dirbaio a=jakewins
Same PR as before, except this now works :)
There was a minor hiccup in the UartRx code where the rx pin got passed as the tx argument, so the invert settings didn't get applied. With this fix, my local setup at least is happily reading inverted uart data.
Co-authored-by: Jacob Davis-Hansson <jake@davis-hansson.com>
2023-04-18 15:48:47 +00:00
Jacob Davis-Hansson
21ea98810a
Pass rx pin to right init arg
2023-04-18 17:44:19 +02:00
Jacob Davis-Hansson
81f10e136a
outover instead of inover
2023-04-15 15:13:44 +02:00
Dario Nieuwenhuis
f681b9d4e5
Remove the _todo_embedded_hal_serial impls. EH will probably not have these serial traits.
2023-04-15 00:58:58 +02:00
Jacob Davis-Hansson
b9fc2a6b33
Add ability to invert UART pins
...
This is useful in some cases where the surrounding circuit
for some reason inverts the UART signal, for instance if you're talking
to a device via an optocoupler.
2023-04-14 21:08:24 +02:00
Thierry Fleury
0e13fe9925
Fix set_baudrate on RP-PICO
2023-04-01 11:44:49 +02:00
Mathias
89a371d10c
Add HIL test for into_buffered uart on embassy-rp
2023-03-14 12:46:58 +01:00
Mathias
bce1ce7dcb
Allow upgrading a blocking uart to a BufferedUart, and implement blocking serial traits for BufferedUart
2023-03-14 10:36:30 +01:00
Andres Hurtado Lopez
2331d58aa6
RP-PICO UART adding set_baudrate: missing to run rust-fmt
2023-02-26 21:23:51 -05:00
Andres Hurtado Lopez
482ba835c4
RP-PICO UART adding set_baudrate: Changing static call from specific type to a Self (requires adding lifetime specifier)
2023-02-26 19:20:08 -05:00
Andres Hurtado Lopez
7172dfd083
RP-PICO UART adding set_baudrate: refactoring of methods
2023-02-26 19:14:25 -05:00
Andres Hurtado Lopez
8fb380b180
RP-PICO UART adding set_baudrate
2023-02-26 18:40:23 -05:00
Pedro Ferreira
6d4c6e0481
rp2040: add {tx,rx}-only constructors to UART
2023-01-04 21:11:19 +01:00
Dario Nieuwenhuis
7b838d0336
rp/uart: use lockfree ringbuffer.
...
This gets rid of another PeripheralMutex usage.
2022-11-25 22:30:47 +01:00
Ulf Lilleengen
72c2e985bb
Update embedded-hal versions and explicitly pin
2022-09-29 11:27:46 +02:00
Mathias
820e6462b6
Add preliminary I2C implementation for RP2040
2022-09-27 22:08:49 +02:00
Mathias
e129a97d48
Fix bufferedUart read and write tests
2022-09-27 07:45:10 +02:00
Mathias
b2d0f8d590
Formatting
2022-09-09 10:49:47 +02:00