mcp2515 0.2.2

`#![no_std]` library for interacting with MCP2515 CAN controller chips.
Documentation
#[macro_export]
macro_rules! dummy {
    ($t:expr) => {
        ()
    };
}

#[macro_export]
macro_rules! filter_def {
    (
        $(#[doc = $doc:expr])*
        $name:ident($n:expr) => {
            $(
                $(#[doc = $filt_doc:expr])*
                $filt:ident => $regs:expr
            ),*
        }
    ) => {
        $(#[doc = $doc])*
        #[derive(Debug, Clone, Copy, PartialEq, Eq)]
        #[cfg_attr(feature = "defmt", derive(defmt::Format))]
        #[cfg_attr(feature = "ufmt", derive(ufmt::derive::uDebug))]
        pub enum $name {
            $(
                $(#[doc = $filt_doc])*
                $filt,
            )*
        }

        impl $name {
            #[doc = concat!("All valid options for [`", stringify!($name), "`].")]
            pub const ALL: [Self; <[_]>::len(&[$($crate::dummy!($filt)),*])] = [$(Self::$filt),*];

            #[doc = concat!("Returns the `SIDH`, `SIDL`, `EID8`, `EID0` registers (in that order) based on the variant of [`", stringify!($name), "`].")]
            pub const fn registers(self) -> [$crate::regs::Register; $n] {
                match self {
                    $(Self::$filt => $regs,)*
                }
            }
        }
    };
}