Continuing to update clocks (unused now) and SPI

This commit is contained in:
Bob McWhirter 2021-05-12 10:46:18 -04:00
parent 7d52e1b350
commit 36c16dbef8
86 changed files with 7131 additions and 6906 deletions

View File

@ -116,7 +116,8 @@ for chip in chips.values():
f.write(f'impl_rng!({name});')
if block_mod == 'spi':
f.write(f'impl_spi!({name});')
clock = peri['clock']
f.write(f'impl_spi!({name}, {clock});')
for pin, funcs in af.items():
if pin in pins:
if func := funcs.get(f'{name}_SCK'):

View File

@ -228,6 +228,16 @@ impl AnyPin {
pub unsafe fn steal(pin_port: u8) -> Self {
Self { pin_port }
}
#[inline]
fn _port(&self) -> u8 {
self.pin_port / 16
}
#[inline]
pub fn block(&self) -> gpio::Gpio {
pac::GPIO(self._port() as _)
}
}
impl_unborrow!(AnyPin);

View File

@ -23,6 +23,7 @@ pub mod usart;
// This must go LAST so that it sees the `impl_foo!` macros
mod pac;
mod time;
pub use embassy_macros::interrupt;
pub use pac::{interrupt, peripherals, Peripherals};

File diff suppressed because it is too large Load Diff

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -95,7 +95,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -106,7 +106,7 @@ impl_spi_pin!(SPI1, Sck, PB3, 5);
impl_spi_pin!(SPI1, Miso, PB4, 5);
impl_spi_pin!(SPI1, Mosi, PB5, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -95,7 +95,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -106,7 +106,7 @@ impl_spi_pin!(SPI1, Sck, PB3, 5);
impl_spi_pin!(SPI1, Miso, PB4, 5);
impl_spi_pin!(SPI1, Mosi, PB5, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -95,7 +95,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -106,7 +106,7 @@ impl_spi_pin!(SPI1, Sck, PB3, 5);
impl_spi_pin!(SPI1, Miso, PB4, 5);
impl_spi_pin!(SPI1, Mosi, PB5, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -129,7 +129,7 @@ impl_gpio_pin!(PH15, 7, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -143,7 +143,7 @@ impl_spi_pin!(SPI1, Sck, PE13, 5);
impl_spi_pin!(SPI1, Miso, PE14, 5);
impl_spi_pin!(SPI1, Mosi, PE15, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
impl_spi_pin!(SPI2, Miso, PB14, 5);
@ -154,7 +154,7 @@ impl_spi_pin!(SPI2, Sck, PD1, 5);
impl_spi_pin!(SPI2, Miso, PD3, 5);
impl_spi_pin!(SPI2, Mosi, PD4, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -180,7 +180,7 @@ impl_gpio_pin!(PI15, 8, 15, EXTI15);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
impl_spi!(SPI1);
impl_spi!(SPI1, APB2);
impl_spi_pin!(SPI1, Sck, PA1, 5);
impl_spi_pin!(SPI1, Miso, PA11, 5);
impl_spi_pin!(SPI1, Mosi, PA12, 5);
@ -197,7 +197,7 @@ impl_spi_pin!(SPI1, Sck, PG2, 5);
impl_spi_pin!(SPI1, Miso, PG3, 5);
impl_spi_pin!(SPI1, Mosi, PG4, 5);
pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _);
impl_spi!(SPI2);
impl_spi!(SPI2, APB1);
impl_spi_pin!(SPI2, Sck, PA9, 3);
impl_spi_pin!(SPI2, Sck, PB10, 5);
impl_spi_pin!(SPI2, Sck, PB13, 5);
@ -214,7 +214,7 @@ impl_spi_pin!(SPI2, Sck, PI1, 5);
impl_spi_pin!(SPI2, Miso, PI2, 5);
impl_spi_pin!(SPI2, Mosi, PI3, 5);
pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _);
impl_spi!(SPI3);
impl_spi!(SPI3, APB1);
impl_spi_pin!(SPI3, Sck, PB3, 6);
impl_spi_pin!(SPI3, Miso, PB4, 6);
impl_spi_pin!(SPI3, Mosi, PB5, 6);

View File

@ -7,10 +7,18 @@ use embedded_hal::blocking::spi::{Write, Transfer};
use embassy::util::Unborrow;
use embassy_extras::{impl_unborrow, unborrow};
use crate::gpio::{Pin, AnyPin};
use crate::pac::gpio::vals::Afr;
use crate::pac::gpio::vals::{Afr, Moder};
use crate::pac::spi;
use crate::pac::gpio::Gpio;
use crate::time::Hertz;
//use crate::pac::spi;
// TODO move upwards in the tree
pub enum ByteOrder {
LsbFirst,
MsbFirst
}
pub struct Spi<'d, T: Instance> {
peri: T,
sck: AnyPin,
@ -21,24 +29,78 @@ pub struct Spi<'d, T: Instance> {
}
impl<'d, T: Instance> Spi<'d, T> {
pub fn new(peri: impl Unborrow<Target=T> + 'd,
pub fn new<F>(pclk: Hertz,
peri: impl Unborrow<Target=T> + 'd,
sck: impl Unborrow<Target=impl Sck<T>>,
mosi: impl Unborrow<Target=impl Mosi<T>>,
miso: impl Unborrow<Target=impl Miso<T>>,
) -> Self {
mode: Mode,
byte_order: ByteOrder,
freq: F,
) -> Self
where
F: Into<Hertz>
{
unborrow!(peri);
unborrow!(sck, mosi, miso);
unsafe {
Self::configure_pin( sck.block(), sck.pin() as usize, sck.af() );
Self::configure_pin( mosi.block(), mosi.pin() as usize, mosi.af() );
Self::configure_pin( miso.block(), miso.pin() as usize, miso.af() );
Self::configure_pin(sck.block(), sck.pin() as _, sck.af());
Self::configure_pin(mosi.block(), mosi.pin() as _, mosi.af());
Self::configure_pin(miso.block(), miso.pin() as _, miso.af());
}
let sck = sck.degrade();
let mosi = mosi.degrade();
let miso = miso.degrade();
// FRXTH: RXNE event is generated if the FIFO level is greater than or equal to
// 8-bit
// DS: 8-bit data size
// SSOE: Slave Select output disabled
unsafe {
T::regs().cr2()
.write(|w| {
// 8-bit transfers
w.set_ds( spi::vals::Ds(0b0111));
w.set_frxth( spi::vals::Frxth::QUARTER);
w.set_ssoe(false);
});
}
let br = Self::compute_baud_rate(pclk, freq.into());
unsafe {
T::regs().cr1().write(|w| {
w.set_cpha(
match mode.phase == Phase::CaptureOnSecondTransition {
true => spi::vals::Cpha::SECONDEDGE,
false => spi::vals::Cpha::FIRSTEDGE,
}
);
w.set_cpol(match mode.polarity == Polarity::IdleHigh {
true => spi::vals::Cpol::IDLEHIGH,
false => spi::vals::Cpol::IDLELOW,
});
w.set_mstr(spi::vals::Mstr::MASTER);
w.set_br(spi::vals::Br(br));
w.set_spe(true);
w.set_lsbfirst(
match byte_order {
ByteOrder::LsbFirst => spi::vals::Lsbfirst::LSBFIRST,
ByteOrder::MsbFirst => spi::vals::Lsbfirst::MSBFIRST,
}
);
w.set_ssi(true);
w.set_ssm(true);
w.set_crcen(false);
w.set_bidimode(spi::vals::Bidimode::UNIDIRECTIONAL);
});
T::regs().cr2().write(|w| {
})
}
Self {
peri,
sck,
@ -50,8 +112,38 @@ impl<'d, T: Instance> Spi<'d, T> {
unsafe fn configure_pin(block: Gpio, pin: usize, af_num: u8) {
let (afr, n_af) = if pin < 8 { (0, pin) } else { (1, pin - 8) };
block.moder().modify(|w| w.set_moder(pin, Moder::ALTERNATE));
block.afr(afr).modify(|w| w.set_afr(n_af, Afr(af_num)));
}
unsafe fn unconfigure_pin(block: Gpio, pin: usize) {
let (afr, n_af) = if pin < 8 { (0, pin) } else { (1, pin - 8) };
block.moder().modify(|w| w.set_moder(pin, Moder::ANALOG));
}
fn compute_baud_rate(clocks: Hertz, freq: Hertz) -> u8 {
match clocks.0 / freq.0 {
0 => unreachable!(),
1..=2 => 0b000,
3..=5 => 0b001,
6..=11 => 0b010,
12..=23 => 0b011,
24..=39 => 0b100,
40..=95 => 0b101,
96..=191 => 0b110,
_ => 0b111,
}
}
}
impl<'d, T: Instance> Drop for Spi<'d, T> {
fn drop(&mut self) {
unsafe {
Self::unconfigure_pin(self.sck.block(), self.sck.pin() as _);
Self::unconfigure_pin(self.mosi.block(), self.mosi.pin() as _);
Self::unconfigure_pin(self.miso.block(), self.miso.pin() as _);
}
}
}
pub enum Error {
@ -150,7 +242,7 @@ pub(crate) mod sealed {
//}
pub trait Instance {
fn regs() -> &'static crate::pac::spi::Spi;
fn regs() -> &'static spi::Spi;
//fn state() -> &'static State;
}
@ -180,20 +272,14 @@ pub trait Instance: sealed::Instance + 'static {
//type Interrupt: Interrupt;
}
pub trait Sck<T:Instance>: sealed::Sck<T> + 'static {
pub trait Sck<T: Instance>: sealed::Sck<T> + 'static {}
}
pub trait Mosi<T: Instance>: sealed::Mosi<T> + 'static {}
pub trait Mosi<T:Instance>: sealed::Mosi<T> + 'static {
}
pub trait Miso<T:Instance>: sealed::Miso<T> + 'static {
}
pub trait Miso<T: Instance>: sealed::Miso<T> + 'static {}
macro_rules! impl_spi {
($inst:ident) => {
($inst:ident, $clk:ident) => {
impl crate::spi::sealed::Instance for peripherals::$inst {
fn regs() -> &'static crate::pac::spi::Spi {
&crate::pac::$inst

127
embassy-stm32/src/time.rs Normal file
View File

@ -0,0 +1,127 @@
//! Time units
/// Bits per second
#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
pub struct Bps(pub u32);
/// Hertz
#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
pub struct Hertz(pub u32);
/// KiloHertz
#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
pub struct KiloHertz(pub u32);
/// MegaHertz
#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
pub struct MegaHertz(pub u32);
/// MilliSeconds
#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
pub struct MilliSeconds(pub u32);
/// MicroSeconds
#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
pub struct MicroSeconds(pub u32);
/// NanoSeconds
#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
pub struct NanoSeconds(pub u32);
/// Extension trait that adds convenience methods to the `u32` type
pub trait U32Ext {
/// Wrap in `Bps`
fn bps(self) -> Bps;
/// Wrap in `Hertz`
fn hz(self) -> Hertz;
/// Wrap in `KiloHertz`
fn khz(self) -> KiloHertz;
/// Wrap in `MegaHertz`
fn mhz(self) -> MegaHertz;
/// Wrap in "MilliSeconds"
fn ms(self) -> MilliSeconds;
/// Wrap in "MicroSeconds"
fn us(self) -> MicroSeconds;
/// Wrap in "NanoSeconds"
fn ns(self) -> NanoSeconds;
}
impl U32Ext for u32 {
fn bps(self) -> Bps {
Bps(self)
}
fn hz(self) -> Hertz {
Hertz(self)
}
fn khz(self) -> KiloHertz {
KiloHertz(self)
}
fn mhz(self) -> MegaHertz {
MegaHertz(self)
}
fn ms(self) -> MilliSeconds {
MilliSeconds(self)
}
fn us(self) -> MicroSeconds {
MicroSeconds(self)
}
fn ns(self) -> NanoSeconds {
NanoSeconds(self)
}
}
// Unit conversions
impl Into<Hertz> for Bps {
fn into(self) -> Hertz {
Hertz(self.0)
}
}
impl Into<Hertz> for KiloHertz {
fn into(self) -> Hertz {
Hertz(self.0 * 1_000)
}
}
impl Into<Hertz> for MegaHertz {
fn into(self) -> Hertz {
Hertz(self.0 * 1_000_000)
}
}
impl Into<KiloHertz> for MegaHertz {
fn into(self) -> KiloHertz {
KiloHertz(self.0 * 1_000)
}
}
impl Into<NanoSeconds> for MicroSeconds {
fn into(self) -> NanoSeconds {
NanoSeconds(self.0 * 1_000)
}
}
impl Into<NanoSeconds> for MilliSeconds {
fn into(self) -> NanoSeconds {
NanoSeconds(self.0 * 1_000_000)
}
}
impl Into<MicroSeconds> for MilliSeconds {
fn into(self) -> MicroSeconds {
MicroSeconds(self.0 * 1_000)
}
}

@ -1 +1 @@
Subproject commit 2e55065013cda8b5836d74570530e7fdb75a76b3
Subproject commit e06947f20f01c938d95410d4310c09d116dbca47