stm32: move pin trait impls from macrotables to build.rs
This commit is contained in:
@ -636,79 +636,3 @@ crate::pac::interrupts!(
|
||||
}
|
||||
};
|
||||
);
|
||||
|
||||
#[cfg(not(rcc_f1))]
|
||||
crate::pac::peripheral_pins!(
|
||||
|
||||
// USART
|
||||
($inst:ident, usart, USART, $pin:ident, TX, $af:expr) => {
|
||||
pin_trait_impl!(TxPin, $inst, $pin, $af);
|
||||
};
|
||||
($inst:ident, usart, USART, $pin:ident, RX, $af:expr) => {
|
||||
pin_trait_impl!(RxPin, $inst, $pin, $af);
|
||||
};
|
||||
($inst:ident, usart, USART, $pin:ident, CTS, $af:expr) => {
|
||||
pin_trait_impl!(CtsPin, $inst, $pin, $af);
|
||||
};
|
||||
($inst:ident, usart, USART, $pin:ident, RTS, $af:expr) => {
|
||||
pin_trait_impl!(RtsPin, $inst, $pin, $af);
|
||||
};
|
||||
($inst:ident, usart, USART, $pin:ident, CK, $af:expr) => {
|
||||
pin_trait_impl!(CkPin, $inst, $pin, $af);
|
||||
};
|
||||
|
||||
// UART
|
||||
($inst:ident, usart, UART, $pin:ident, TX, $af:expr) => {
|
||||
pin_trait_impl!(TxPin, $inst, $pin, $af);
|
||||
};
|
||||
($inst:ident, usart, UART, $pin:ident, RX, $af:expr) => {
|
||||
pin_trait_impl!(RxPin, $inst, $pin, $af);
|
||||
};
|
||||
($inst:ident, usart, UART, $pin:ident, CTS, $af:expr) => {
|
||||
pin_trait_impl!(CtsPin, $inst, $pin, $af);
|
||||
};
|
||||
($inst:ident, usart, UART, $pin:ident, RTS, $af:expr) => {
|
||||
pin_trait_impl!(RtsPin, $inst, $pin, $af);
|
||||
};
|
||||
($inst:ident, usart, UART, $pin:ident, CK, $af:expr) => {
|
||||
pin_trait_impl!(CkPin, $inst, $pin, $af);
|
||||
};
|
||||
);
|
||||
|
||||
#[cfg(rcc_f1)]
|
||||
crate::pac::peripheral_pins!(
|
||||
|
||||
// USART
|
||||
($inst:ident, usart, USART, $pin:ident, TX) => {
|
||||
pin_trait_impl!(TxPin, $inst, $pin, 0);
|
||||
};
|
||||
($inst:ident, usart, USART, $pin:ident, RX) => {
|
||||
pin_trait_impl!(RxPin, $inst, $pin, 0);
|
||||
};
|
||||
($inst:ident, usart, USART, $pin:ident, CTS) => {
|
||||
pin_trait_impl!(CtsPin, $inst, $pin, 0);
|
||||
};
|
||||
($inst:ident, usart, USART, $pin:ident, RTS) => {
|
||||
pin_trait_impl!(RtsPin, $inst, $pin, 0);
|
||||
};
|
||||
($inst:ident, usart, USART, $pin:ident, CK) => {
|
||||
pin_trait_impl!(CkPin, $inst, $pin, 0);
|
||||
};
|
||||
|
||||
// UART
|
||||
($inst:ident, usart, UART, $pin:ident, TX) => {
|
||||
pin_trait_impl!(TxPin, $inst, $pin, 0);
|
||||
};
|
||||
($inst:ident, usart, UART, $pin:ident, RX) => {
|
||||
pin_trait_impl!(RxPin, $inst, $pin, 0);
|
||||
};
|
||||
($inst:ident, usart, UART, $pin:ident, CTS) => {
|
||||
pin_trait_impl!(CtsPin, $inst, $pin, 0);
|
||||
};
|
||||
($inst:ident, usart, UART, $pin:ident, RTS) => {
|
||||
pin_trait_impl!(RtsPin, $inst, $pin, 0);
|
||||
};
|
||||
($inst:ident, usart, UART, $pin:ident, CK) => {
|
||||
pin_trait_impl!(CkPin, $inst, $pin, 0);
|
||||
};
|
||||
);
|
||||
|
Reference in New Issue
Block a user