ibuki2003
19a06d6b8a
fix(rp): use uart dreq number defined in pac
2024-11-14 02:50:04 +09:00
flippette
84def1608f
Also implement embedded_io::Write for UartTx<'d, T: Instance, Blocking>
2024-11-01 23:47:25 +02:00
flippette
93dd21042c
Implement embedded_io::Write for Uart<'d, T: Instance, Blocking> ( #3483 )
...
* Implement `embedded_io::{Read,Write}` for `Uart<'d, T: Instance, Blocking>`
* Unimplement `embedded_io::Read` for `Uart<'d, T: Instance, Blocking>`
* Revert "Unimplement `embedded_io::Read` for `Uart<'d, T: Instance, Blocking>`"
* Unimplement `embedded_io::Read` for `Uart<'d, T: Instance, Blocking>` (take 2)
2024-10-31 21:14:11 +01:00
Sebastian Quilitz
313e76af04
rp: add constructor for tx-only blocking UART
2024-09-16 12:27:17 +02:00
Caleb Jamison
778241fd71
Fix CI, rename private feature, address comments from dirbaio.
2024-08-12 04:32:31 -04:00
Caleb Jamison
9a863f07fe
Handle pad isolation everywhere and in the same way.
2024-08-10 17:36:28 -04:00
Caleb Jamison
b185e02a42
Initial rp235x support
...
Examples have been run, but there is not yet a test suite.
2024-08-08 21:35:21 -04:00
Jomer.Dev
7c1ecae53f
Add read_to_break_with_count
2024-07-19 16:01:20 +02:00
Mathias
4c34132337
Correctly handle modifying LCR register after uart enable
2024-07-17 12:23:59 +02:00
Mathias
f733071908
Add split_ref fn to uart, allowing a mutable reference split into RX & TX handles. Also change order of RX and TX handles in split fn, to streamline with other HALs
2024-07-17 11:25:03 +02:00
rafael
d8821dd7d7
rustfmt
2024-07-10 22:56:12 +02:00
rafael
68b3fbe348
implement read_ready method in BufferedUart
2024-07-10 22:54:48 +02:00
tact1m4n3
5b2535c8a2
fix(embassy-rp): fix drop implementation of BufferedUartRx and BufferedUartTx
2024-05-17 21:51:45 +03:00
Dario Nieuwenhuis
a84b33995e
rp: remove mod sealed.
2024-04-05 00:48:46 +02:00
Rafael Bachmann
cf789be420
Merge branch 'embassy-rs:main' into barafael/minor_clippy_lints_rp
2024-03-25 14:43:18 +01:00
Dario Nieuwenhuis
eca9aac194
Fix warnings in recent nightly.
2024-03-20 16:39:09 +01: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
40f30fa4cd
Remove a few ultra-verbose logs.
...
They're heavily spamming logs for HIL tests, and I don't believe
they're valuable now that the thing they helped debug in their young
age is now solid and mature.
2023-10-03 22:22:16 +02:00
Dario Nieuwenhuis
f26dd54f63
Update embedded-hal to 1.0.0-rc.1 ( #1783 )
2023-08-16 00:40:56 +02:00
Dario Nieuwenhuis
5d5cd23715
Update to embedded-io 0.5 ( #1752 )
2023-08-07 13:43:09 +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
861f49cfd4
rp/uart: report errors from buffered uart
...
this reports errors at the same location the blocking uart would, which
works out to being mostly exact (except in the case of overruns, where
one extra character is dropped). this is actually easier than going
nuclear in the case of errors and nuking both the buffer contents and
the rx fifo, both of which are things we'd have to do in addition to
what's added here, and neither are needed for correctness.
2023-05-01 15:32:58 +02:00
pennae
7ab9fe0522
rp/uart: extract common code from async and blocking buffered reads
...
once we add error propagation the common code will become even larger,
so it makes sense to move it out.
2023-05-01 15:24:03 +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