rp: add missing Debug and defmt::Format derives for ADC
this doesn't cover every `struct` & co. in `embassy-rp`, but at least it adds those needed for `Adc` and `adc::Channel`.
This commit is contained in:
@@ -8,6 +8,8 @@ macro_rules! peripherals_definition {
|
||||
$(#[$cfg])?
|
||||
#[allow(non_camel_case_types)]
|
||||
#[doc = concat!(stringify!($name), " peripheral")]
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct $name { _private: () }
|
||||
|
||||
$(#[$cfg])?
|
||||
|
||||
@@ -14,6 +14,8 @@ use core::ops::Deref;
|
||||
/// the driver code would be monomorphized two times. With Peri, the driver is generic
|
||||
/// over a lifetime only. `SPI4` becomes `Peri<'static, SPI4>`, and `&mut SPI4` becomes
|
||||
/// `Peri<'a, SPI4>`. Lifetimes don't cause monomorphization.
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct Peri<'a, T: PeripheralType> {
|
||||
inner: T,
|
||||
_lifetime: PhantomData<&'a mut T>,
|
||||
|
||||
Reference in New Issue
Block a user