Skip to content

Instantly share code, notes, and snippets.

@Dirbaio

Dirbaio/asdf.rs Secret

Created September 8, 2021 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dirbaio/85bb62e46c3835c6baae5be7baa661af to your computer and use it in GitHub Desktop.
Save Dirbaio/85bb62e46c3835c6baae5be7baa661af to your computer and use it in GitHub Desktop.
#[macro_export]
macro_rules! peripheral_versions {
($($pat:tt => $code:tt;)*) => {
macro_rules! __peripheral_versions_inner {
$(($pat) => $code;)*
($_:tt) => {}
}
__peripheral_versions_inner!((can,bxcan));
__peripheral_versions_inner!((dbgmcu,f4));
__peripheral_versions_inner!((dma,v2));
__peripheral_versions_inner!((exti,v1));
__peripheral_versions_inner!((flash,f4));
__peripheral_versions_inner!((gpio,v2));
__peripheral_versions_inner!((i2c,v1));
__peripheral_versions_inner!((pwr,f4));
__peripheral_versions_inner!((rcc,f4));
__peripheral_versions_inner!((rng,v1));
__peripheral_versions_inner!((spi,v1));
__peripheral_versions_inner!((syscfg,f4));
__peripheral_versions_inner!((timer,v1));
__peripheral_versions_inner!((usart,v1));
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment