aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src/gpio.rs
Commit message (Collapse)AuthorAgeFilesLines
* rp: fix typo in Input interrupt commentNicolas Mattia2025-10-261-1/+1
|
* Rustfmt for edition 2024.Dario Nieuwenhuis2025-10-061-3/+3
|
* add missing `Debug` and `defmt::Format` derives for `embassy_rp::gpio`Ralph Ursprung2025-07-231-0/+15
|
* embassy-rp: implement input/output inversionFelipe Balbi2025-05-221-0/+38
| | | | | RP2040/RP23xx support inversion in HW of the inputs and outputs. Implement minimal support for that.
* rp: add missing `Debug` and `defmt::Format` `derive`s for ADCRalph Ursprung2025-05-151-0/+2
| | | | | this doesn't cover every `struct` & co. in `embassy-rp`, but at least it adds those needed for `Adc` and `adc::Channel`.
* Remove Peripheral trait, rename PeripheralRef->Peri.Dario Nieuwenhuis2025-03-271-24/+17
|
* Merge pull request #3729 from embassy-rs/update-nrf-rpDario Nieuwenhuis2025-01-061-4/+4
|\ | | | | | | Prepare nrf and rp hals for release
| * Fixes for new PACs.Dario Nieuwenhuis2025-01-061-4/+4
| |
* | `embassy-rp`: add `set_pullup()` for `OutputOpenDrain`Georges Palauqui2025-01-061-0/+10
|/
* Use inline const for initializing arrays. (#3567)Dario Nieuwenhuis2024-11-241-4/+2
|
* Fix rp2350b pins >31 on debug buildsCaleb Jamison2024-09-231-1/+1
|
* Properly drop pins >30Caleb Jamison2024-09-151-2/+2
|
* rp: Fix indexing for pins >31 on rp235xb (#3330)Caleb Jamison2024-09-121-6/+18
| | | | | * Fix indexing for pins >31 on rp235xb * fixup knowing that 1<<7 is 128 not 64
* Fix CI, rename private feature, address comments from dirbaio.Caleb Jamison2024-08-121-6/+11
|
* Handle pad isolation everywhere and in the same way.Caleb Jamison2024-08-101-5/+2
|
* Initial rp235x supportCaleb Jamison2024-08-081-0/+76
| | | | Examples have been run, but there is not yet a test suite.
* rp: remove mod sealed.Dario Nieuwenhuis2024-04-051-50/+46
|
* Merge branch 'embassy-rs:main' into barafael/minor_clippy_lints_rpRafael Bachmann2024-03-251-2/+0
|\
| * Fix warnings in recent nightly.Dario Nieuwenhuis2024-03-201-2/+0
| |
* | fix minor clippy lints in embassy_rpRafael Bachmann2024-03-181-3/+3
|/
* rp/gpio: fix wrong io _bank calcAndelf2024-02-171-1/+1
|
* Add unsafe constructor for AnyPinAdam Snaider2024-02-151-0/+11
|
* rp/gpio: remove generics.Dario Nieuwenhuis2024-01-221-63/+62
|
* Change GPIO inherent methods back to `&self`.Dario Nieuwenhuis2024-01-101-58/+43
| | | | | | | With the embedded-hal rc3 update I changed them to require `&mut self`, but in retrospect I think `&self` is better, for extra flexibility. This PR reverts the changes from the rc3 update to inherent methods.
* Update embedded-hal to v1.0Dario Nieuwenhuis2024-01-091-18/+0
|
* docs: document all embassy-rp public apisUlf Lilleengen2023-12-191-3/+65
| | | | Enable missing doc warnings.
* Update embedded-hal to 1.0.0-rc.3Dario Nieuwenhuis2023-12-141-43/+58
|
* Remove nightly and unstable-traits features in preparation for 1.75.Dario Nieuwenhuis2023-11-291-156/+147
|
* Remove a few ultra-verbose logs.Dario Nieuwenhuis2023-10-031-9/+1
| | | | | | 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.
* feat: allow schmitt, slew, and drive strength be set from Flex, Input, OutputJonathan Dickinson2023-10-011-0/+38
| | | | Allows the schmitt, slew and drive strength to be set from Flex. Input and Output[OpenDrain] also expose the appropriate setters.
* rp: add dormant-wake functionality for Inputpennae2023-08-031-0/+61
| | | | | | | | | | this temporarily takes ownership of pins because we need to clear edge interrupts before waiting for them (otherwise we may wait indefinitely), we want to clean up the dormant-wake bits after a wakeup, and doing anything *else* with the input while we're waiting for a wakeup isn't possible at all. doing it like this lets us not impose any cost on those who don't use dormant wakes without entangling dormant waits too badly with regular interrupt waits.
* rp: fix qspi gpio interruptspennae2023-07-311-9/+36
| | | | | | | | so far only bank0 interrupts were processed and configured, even if a qspi pin was given. this is obviously not the right thing to do, so let's rectify that. the fact that no problems have shown up so far does suggest that most, if not all, applications don't use this functionality at all.
* rp: make QSPI gpio support optionalpennae2023-07-311-4/+13
| | | | | | | | | | this will be mostly not useful to anyone since flash is attached to qspi, and using flash chips that don't use the *entire* qspi interface will severly slow down the chip. the code overhead is minimal right now, but if we also fix interrupt support on qspi pins this will change (adding more code to potentially hot paths, using more memory for wakers that are never used, and preventing the qspi gpio irq from being used in software interrupts as RTIC applications may want to do).
* rp: add gpio::Pin::io() for access to io bankspennae2023-07-311-9/+8
|
* rp: rename gpio::Pin::io to gpio::Pin::gpiopennae2023-07-311-3/+3
| | | | | | 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)
* rp/gpio: fix is_set_high/is_set_low, expand tests.Dario Nieuwenhuis2023-07-111-2/+2
|
* rp/adc: rewrite the modulepennae2023-07-071-1/+1
| | | | | | | | | | | | - don't require an irq binding for blocking-only adc - abstract adc pins into an AnyPin like interface, erasing the actual peripheral type at runtime. - add pull-up/pull-down functions for adc pins - add a test (mostly a copy of the example, to be honest) - configure adc pads according to datasheet - report conversion errors (although they seem exceedingly rare?) - drop embedded-hal interfaces. embedded-hal channels can do neither AnyPin nor pullup/pulldown without encoding both into the type
* Update rp-pac.Dario Nieuwenhuis2023-06-291-2/+2
|
* rp: update rp-pac.Dario Nieuwenhuis2023-06-161-91/+79
|
* Add `rt` feature to HALs, cfg out interrupt handling when not set.Dario Nieuwenhuis2023-06-081-0/+1
|
* Make interrupt module more standard.Dario Nieuwenhuis2023-06-081-4/+4
| | | | | | | | | | | | - 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`.
* Replace Into<bool> for Level with From<Level> for boolExplodingWaffle2023-06-051-3/+3
|
* cortex-m: remove owned interrupts.Dario Nieuwenhuis2023-06-011-5/+4
|
* rp/gpio: set up gpio interrupts only oncepennae2023-05-021-6/+7
| | | | | | doing this setup work repeatedly, on every wait, is unnecessary. with nothing ever disabling the interrupt it is sufficient to enable it once during device init and never touch it again.
* rp/gpio: drop critical_section usepennae2023-05-021-11/+9
| | | | we don't need critical sections if we just use atomic access aliases.
* gp/gpio: fix InputFuture edge waitspennae2023-05-021-83/+43
| | | | | | | InputFuture did not use and check edge interrupts correctly. InterruptTrigger should've checked for not 1,2,3,4 but 1,2,4,8 since the inte fields are bitmasks, and not clearing INTR would have repeatedly triggered edge interrupts early.
* feat(rp): add `Wait` impl to `OutputOpenDrain`Brooks J Rady2023-04-091-0/+59
| | | | | | | | | | | A while ago `OutputOpenDrain` was made to implement `InputPin`, something that allowed drivers for various one-wire protocols to be written, but it's been lacking a `Wait` implementation — something that's needed to write async versions of these drivers. This commit also adds `get_level()` to `OutputOpenDrain`, since `is_high()` and `is_low()` were already implemented, but `get_level()` itself was missing.
* Swap debug! for trace! in rp gpioCaleb Jamison2023-03-021-9/+9
| | | | | | When using gpio pin changes for things like peripheral interrupts these debug! calls flood defmt, making it difficult to find what you're actually looking for.
* Add `#[must_use]` to all futuresGrant Miller2023-02-241-0/+1
|