aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src/i2c.rs
Commit message (Collapse)AuthorAgeFilesLines
* change default internal pullup state to be active to make this change ↵erwin2025-08-191-2/+2
| | | | nonbreaking
* Add configurable internal pullups for rp i2cerwin2025-08-181-7/+19
| | | | | - Example updated to demonstrate enabling internal pullups - Add `sda_pullup` and `scl_pullup` fields to I2C Config
* add `derive(Debug)` for `embassy_rp::i2c::I2c`Ralph Ursprung2025-07-161-0/+1
|
* embassy-rp: defensive change to ensure wakers are registeredJames Munns2025-04-031-2/+4
| | | | | This change ensures that wakers are registered PRIOR to checking status in i2c `wait_on` helpers.
* Remove Peripheral trait, rename PeripheralRef->Peri.Dario Nieuwenhuis2025-03-271-22/+12
|
* remove checks for reserved I2c addressesTom Dohrmann2025-01-261-9/+4
| | | | | | 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.
* Fix CI, rename private feature, address comments from dirbaio.Caleb Jamison2024-08-121-1/+1
|
* Handle pad isolation everywhere and in the same way.Caleb Jamison2024-08-101-0/+2
|
* Initial rp235x supportCaleb Jamison2024-08-081-0/+36
| | | | Examples have been run, but there is not yet a test suite.
* Update to Rust 1.80, make check-cfg unconditional.Dario Nieuwenhuis2024-07-251-12/+6
|
* rp/i2c: add address flexibility and exampleKrzysztof Królczyk2024-06-281-22/+16
| | | | | | | 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]>
* Add Clone and Copy to Error typesdvdsk2024-06-061-2/+2
| | | | | None of them are `non-exaustative`, they are all small enough to be copy (I estimate none are larger than 4 bytes).
* rp: remove mod sealed.Dario Nieuwenhuis2024-04-051-29/+22
|
* fix minor clippy lints in embassy_rpRafael Bachmann2024-03-181-3/+3
|
* Fixup comments from JamesCaleb Jamison2024-02-221-5/+3
|
* Fixup display -> debugCaleb Jamison2024-02-221-1/+1
|
* Add SetConfig impl to rp2040 i2cCaleb Jamison2024-02-221-31/+55
| | | | Also expand test to cover 1kHz, 100kHz, 400kHz, and 1MHz speeds.
* docs: document all embassy-rp public apisUlf Lilleengen2023-12-191-0/+22
| | | | Enable missing doc warnings.
* Remove nightly and unstable-traits features in preparation for 1.75.Dario Nieuwenhuis2023-11-291-120/+110
|
* Merge pull request #2039 from jcdickinson/rp-i2c-stop-restartDario Nieuwenhuis2023-10-111-2/+13
|\ | | | | | | fix (rp i2c): fix restart/stop flags for i2c master methods
| * fix (rp i2c): fix restart/stop flags for i2c master methodsJonathan Dickinson2023-10-101-2/+13
| | | | | | | | | | | | | | | | | | | | 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).
* | fix (rp i2c): set i2c slew rate to spec valueJonathan Dickinson2023-10-101-18/+18
|/ | | | | | | | | 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.
* Add missing deriveJames Munns2023-10-071-1/+1
|
* Add some uncontroversial derives to Error typesJames Munns2023-10-061-1/+1
|
* Fixing my git-based mistakesCaleb Jamison2023-09-101-0/+860
|
* rp2040 I2cDeviceCaleb Jamison2023-09-101-857/+0
| | | | | | | | 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.
* rp: rename gpio::Pin::io to gpio::Pin::gpiopennae2023-07-311-2/+2
| | | | | | 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.
* Rename embassy-hal-common to embassy-hal-internal, document it's for ↵Dario Nieuwenhuis2023-07-281-1/+1
| | | | internal use only. (#1700)
* Embassy-rp I2C: Fix 1664Alex Ferro2023-07-161-2/+3
| | | | | | | 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.
* rp: update rp-pac.Dario Nieuwenhuis2023-06-161-176/+158
|
* Make interrupt module more standard.Dario Nieuwenhuis2023-06-081-6/+7
| | | | | | | | | | | | - 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`.
* cortex-m: remove owned interrupts.Dario Nieuwenhuis2023-06-011-8/+6
|
* rp: remove take!, add bind_interrupts!pennae2023-05-151-15/+19
|
* Fix some typosDirk Stolle2023-05-081-1/+1
|
* rustfmtxoviat2023-04-281-4/+10
|
* Add `Transactional` trait to rp's i2c implLixou2023-04-281-0/+16
|
* Update embedded-hal crates.Dario Nieuwenhuis2023-04-061-78/+29
|
* Switch to async-fn-in-traitDario Nieuwenhuis2022-11-251-48/+27
|
* Associate state with the instance rather than having a separate arrayJeremy Fitzhardinge2022-10-171-9/+14
|
* rp i2c: have separate wakers for each i2c unitJeremy Fitzhardinge2022-10-161-6/+8
| | | | | If they both share one waker, there's the possibility that some wakeups could get lost.
* rp async i2c: raise the tx_empty thresholdJeremy Fitzhardinge2022-10-031-0/+6
| | | | | | 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.
* rp i2c: clean up tx_abrt handlingJeremy Fitzhardinge2022-10-031-65/+69
| | | | | 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.
* rp i2c: allow blocking ops on async contextsJeremy Fitzhardinge2022-10-021-105/+105
|
* make I2c::write_async take an iteratorJeremy Fitzhardinge2022-10-011-2/+2
| | | | There's no other iterator async API right now.
* embassy-rp: async i2c implementationJeremy Fitzhardinge2022-10-011-10/+366
| | | | | | | | | 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
* rp i2c: make blocking only for Mode=BlockingJeremy Fitzhardinge2022-10-011-105/+107
|
* rp i2c: remove vestiges of DMAJeremy Fitzhardinge2022-10-011-10/+1
|
* embassy-rp: inline I2c::regsJeremy Fitzhardinge2022-10-011-0/+1
| | | | It just returns a literal constant, so there's no reason not to always inline it.
* Update embedded-hal versions and explicitly pinUlf Lilleengen2022-09-291-11/+7
|
* Allow unused fields temporarily in i2cMathias2022-09-271-8/+8
|