macro_rules! impl_adc {
    (
        hal: $HAL:ty,
        peripheral: $ADC:ty,
        settings: $Settings:ty,
        apply_settings: |$settings_periph_var:ident, $settings_var:ident| $apply_settings:block,
        channel_id: $Channel:ty,
        set_channel: |$periph_var:ident, $chan_var:ident| $set_channel:block,
        pins: {
            $(
                $(#[$pin_attr:meta])*
                $pin:ty: ($pin_channel:expr$(, $didr:ident::$didr_method:ident)?),
            )+
        },
        $(channels: {
            $(
                $(#[$channel_attr:meta])*
                $channel_ty:ty: $channel:expr,
            )*
        },)?
    ) => { ... };
}