| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
nonbreaking
|
| |
|
|
|
| |
- Example updated to demonstrate enabling internal pullups
- Add `sda_pullup` and `scl_pullup` fields to I2C Config
|
| | |
|
| |
|
|
|
| |
This change ensures that wakers are registered PRIOR to checking status
in i2c `wait_on` helpers.
|
| | |
|
| |
|
|
|
|
| |
There are some non-compliant devices that respond to reserved I2c
addresses. rp2040 behaves sanely for these addresses, so let's just
allow using them.
|
| | |
|
| | |
|
| |
|
|
| |
Examples have been run, but there is not yet a test suite.
|
| | |
|
| |
|
|
|
|
|
| |
Previous i2c examples are using either blocking Embassy API
or e-h traits, this example uses Embassy pub API directly.
Signed-off-by: Krzysztof Królczyk <[email protected]>
|
| |
|
|
|
| |
None of them are `non-exaustative`, they are all small enough to be copy
(I estimate none are larger than 4 bytes).
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Also expand test to cover 1kHz, 100kHz, 400kHz, and 1MHz speeds.
|
| |
|
|
| |
Enable missing doc warnings.
|
| | |
|
| |\
| |
| |
| | |
fix (rp i2c): fix restart/stop flags for i2c master methods
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update the start and stop flags for all read/write/read_write methods to match
those in the default blocking implementation of these methods (as well as
other RP2040 I2C implementations, and expected I2C behavior).
Also adds a write_read_async method that doesnt require using embedded-hal, as
this is required to use I2C in an idiomatic fashion (see TI Application Report
SLVA704).
|
| |/
|
|
|
|
|
|
|
| |
The RP2040 datasheet indicates that I2C pins should have a limited
slew rate (Page 440 - 4.3.1.3.). This configures that for both
`I2c` and `I2cSlave`.
In addition, the pin configuration has been centralized to a single
fn.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Move i2c to mod, split device and controller
Remove mode generic:
I don't think it's reasonable to use the i2c in device mode while
blocking, so I'm cutting the generic.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
internal use only. (#1700)
|
| |
|
|
|
|
|
| |
Change embassy-rp i2c.rs impl of embedded_hal_async::i2c::I2c::transaction
to only do the call to setup() for address once per call to transactions.
Calling setup multiple times results in I2C transactions being skipped
on the bus, even across calls to transaction() or devices.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- 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`.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
If they both share one waker, there's the possibility that some wakeups
could get lost.
|
| |
|
|
|
|
| |
Assert "tx_empty" interrupt a little early so there's time to wake up
and start refilling the fifo before it drains. This avoids stalling the
i2c bus if the tx fifo completely drains.
|
| |
|
|
|
| |
Make sure we always wait for the stop bit if there's a reason to -
either because we sent one, or because there was a hardware tx abort.
|
| | |
|
| |
|
|
| |
There's no other iterator async API right now.
|
| |
|
|
|
|
|
|
|
| |
This is an interrupt-driven async i2c master implementation. It makes as
best use of the RP2040's i2c block's fifos as possible to minimize
interrupts.
It implements embedded_hal_async::i2c for easy interop.
WIP async impl
|
| | |
|
| | |
|
| |
|
|
| |
It just returns a literal constant, so there's no reason not to always inline it.
|
| | |
|
| | |
|