diff options
| author | Ralph Ursprung <[email protected]> | 2025-05-15 17:29:23 +0200 |
|---|---|---|
| committer | Ralph Ursprung <[email protected]> | 2025-05-15 18:38:04 +0200 |
| commit | 4a089fe2455f22f956455548816fcd96735e38d8 (patch) | |
| tree | bbd4184eb3a7215184871854b03ada1540238631 /embassy-rp/src | |
| parent | 05bfbacee55207f8065b6e9bbbc0d5454e77668f (diff) | |
rp: add missing `Debug` and `defmt::Format` `derive`s for ADC
this doesn't cover every `struct` & co. in `embassy-rp`, but at least it
adds those needed for `Adc` and `adc::Channel`.
Diffstat (limited to 'embassy-rp/src')
| -rw-r--r-- | embassy-rp/src/adc.rs | 2 | ||||
| -rw-r--r-- | embassy-rp/src/gpio.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/embassy-rp/src/adc.rs b/embassy-rp/src/adc.rs index ec0c8c46c..2db8e63d7 100644 --- a/embassy-rp/src/adc.rs +++ b/embassy-rp/src/adc.rs | |||
| @@ -21,6 +21,8 @@ static WAKER: AtomicWaker = AtomicWaker::new(); | |||
| 21 | #[derive(Default)] | 21 | #[derive(Default)] |
| 22 | pub struct Config {} | 22 | pub struct Config {} |
| 23 | 23 | ||
| 24 | #[derive(Debug)] | ||
| 25 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | ||
| 24 | enum Source<'p> { | 26 | enum Source<'p> { |
| 25 | Pin(Peri<'p, AnyPin>), | 27 | Pin(Peri<'p, AnyPin>), |
| 26 | TempSensor(Peri<'p, ADC_TEMP_SENSOR>), | 28 | TempSensor(Peri<'p, ADC_TEMP_SENSOR>), |
diff --git a/embassy-rp/src/gpio.rs b/embassy-rp/src/gpio.rs index af0837f6a..2fb2d65c2 100644 --- a/embassy-rp/src/gpio.rs +++ b/embassy-rp/src/gpio.rs | |||
| @@ -932,6 +932,8 @@ pub trait Pin: PeripheralType + Into<AnyPin> + SealedPin + Sized + 'static { | |||
| 932 | } | 932 | } |
| 933 | 933 | ||
| 934 | /// Type-erased GPIO pin | 934 | /// Type-erased GPIO pin |
| 935 | #[derive(Debug)] | ||
| 936 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | ||
| 935 | pub struct AnyPin { | 937 | pub struct AnyPin { |
| 936 | pin_bank: u8, | 938 | pin_bank: u8, |
| 937 | } | 939 | } |
