use crate::{AfMapping, Pin, Port};
const fn map(
port: Port,
number: u8,
af: u8,
peripheral: &'static str,
signal: &'static str,
) -> AfMapping {
AfMapping {
pin: Pin::new(port, number),
af,
peripheral,
signal,
}
}
include!(concat!(env!("OUT_DIR"), "/f446re_gen.rs"));
include!(concat!(env!("OUT_DIR"), "/f411re_gen.rs"));
#[cfg(test)]
pub(crate) const SEED: &[AfMapping] = &[
map(Port::A, 4, 5, "SPI1", "NSS"),
map(Port::A, 5, 5, "SPI1", "SCK"),
map(Port::A, 6, 5, "SPI1", "MISO"),
map(Port::A, 7, 5, "SPI1", "MOSI"),
map(Port::A, 2, 7, "USART2", "TX"),
map(Port::A, 3, 7, "USART2", "RX"),
map(Port::B, 8, 4, "I2C1", "SCL"),
map(Port::B, 9, 4, "I2C1", "SDA"),
map(Port::A, 0, 1, "TIM2", "CH1"),
map(Port::A, 1, 1, "TIM2", "CH2"),
];
#[cfg(test)]
pub(crate) const SEED_F411RE: &[AfMapping] = &[
map(Port::A, 4, 5, "SPI1", "NSS"),
map(Port::A, 5, 5, "SPI1", "SCK"),
map(Port::A, 6, 5, "SPI1", "MISO"),
map(Port::A, 7, 5, "SPI1", "MOSI"),
map(Port::A, 2, 7, "USART2", "TX"),
map(Port::A, 3, 7, "USART2", "RX"),
map(Port::B, 8, 4, "I2C1", "SCL"),
map(Port::B, 9, 4, "I2C1", "SDA"),
map(Port::A, 0, 1, "TIM2", "CH1"),
map(Port::A, 1, 1, "TIM2", "CH2"),
];