This commit is contained in:
Bob McWhirter
2021-05-25 14:47:07 -04:00
parent aed8283cd5
commit a9ec941dca
508 changed files with 28716 additions and 32242 deletions

View File

@ -211,6 +211,26 @@ impl_gpio_pin!(PK12, 10, 12, EXTI12);
impl_gpio_pin!(PK13, 10, 13, EXTI13);
impl_gpio_pin!(PK14, 10, 14, EXTI14);
impl_gpio_pin!(PK15, 10, 15, EXTI15);
pub const I2C1: i2c::I2c = i2c::I2c(0x40005400 as _);
impl_i2c!(I2C1);
impl_i2c_pin!(I2C1, SclPin, PB6, 4);
impl_i2c_pin!(I2C1, SdaPin, PB7, 4);
impl_i2c_pin!(I2C1, SclPin, PB8, 4);
impl_i2c_pin!(I2C1, SdaPin, PB9, 4);
pub const I2C2: i2c::I2c = i2c::I2c(0x40005800 as _);
impl_i2c!(I2C2);
impl_i2c_pin!(I2C2, SclPin, PB10, 4);
impl_i2c_pin!(I2C2, SdaPin, PB11, 4);
impl_i2c_pin!(I2C2, SdaPin, PF0, 4);
impl_i2c_pin!(I2C2, SclPin, PF1, 4);
impl_i2c_pin!(I2C2, SclPin, PH4, 4);
impl_i2c_pin!(I2C2, SdaPin, PH5, 4);
pub const I2C3: i2c::I2c = i2c::I2c(0x40005c00 as _);
impl_i2c!(I2C3);
impl_i2c_pin!(I2C3, SclPin, PA8, 4);
impl_i2c_pin!(I2C3, SdaPin, PC9, 4);
impl_i2c_pin!(I2C3, SclPin, PH7, 4);
impl_i2c_pin!(I2C3, SdaPin, PH8, 4);
pub const RNG: rng::Rng = rng::Rng(0x50060800 as _);
impl_rng!(RNG, HASH_RNG);
pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _);
@ -264,24 +284,6 @@ impl_spi_pin!(SPI6, MisoPin, PG12, 5);
impl_spi_pin!(SPI6, SckPin, PG13, 5);
impl_spi_pin!(SPI6, MosiPin, PG14, 5);
pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _);
pub const TIM1: timer::TimGp16 = timer::TimGp16(0x40010000 as _);
pub const TIM10: timer::TimGp16 = timer::TimGp16(0x40014400 as _);
pub const TIM11: timer::TimGp16 = timer::TimGp16(0x40014800 as _);
pub const TIM12: timer::TimGp16 = timer::TimGp16(0x40001800 as _);
pub const TIM13: timer::TimGp16 = timer::TimGp16(0x40001c00 as _);
pub const TIM14: timer::TimGp16 = timer::TimGp16(0x40002000 as _);
pub const TIM2: timer::TimGp16 = timer::TimGp16(0x40000000 as _);
impl_timer!(TIM2);
pub const TIM3: timer::TimGp16 = timer::TimGp16(0x40000400 as _);
impl_timer!(TIM3);
pub const TIM4: timer::TimGp16 = timer::TimGp16(0x40000800 as _);
impl_timer!(TIM4);
pub const TIM5: timer::TimGp16 = timer::TimGp16(0x40000c00 as _);
impl_timer!(TIM5);
pub const TIM6: timer::TimGp16 = timer::TimGp16(0x40001000 as _);
pub const TIM7: timer::TimGp16 = timer::TimGp16(0x40001400 as _);
pub const TIM8: timer::TimGp16 = timer::TimGp16(0x40010400 as _);
pub const TIM9: timer::TimGp16 = timer::TimGp16(0x40014000 as _);
pub const USART1: usart::Usart = usart::Usart(0x40011000 as _);
impl_usart!(USART1);
impl_usart_pin!(USART1, RxPin, PA10, 7);
@ -333,10 +335,10 @@ impl_usart_pin!(USART6, RxPin, PG9, 8);
pub use super::regs::dma_v2 as dma;
pub use super::regs::exti_v1 as exti;
pub use super::regs::gpio_v2 as gpio;
pub use super::regs::i2c_v1 as i2c;
pub use super::regs::rng_v1 as rng;
pub use super::regs::spi_v1 as spi;
pub use super::regs::syscfg_f4 as syscfg;
pub use super::regs::timer_v1 as timer;
pub use super::regs::usart_v1 as usart;
embassy_extras::peripherals!(
EXTI0, EXTI1, EXTI2, EXTI3, EXTI4, EXTI5, EXTI6, EXTI7, EXTI8, EXTI9, EXTI10, EXTI11, EXTI12,
@ -352,8 +354,8 @@ embassy_extras::peripherals!(
PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12,
PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13,
PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14,
PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, TIM1, TIM10, TIM11, TIM12, TIM13, TIM14,
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM8, TIM9, USART1, USART2, USART3, USART6
PK15, I2C1, I2C2, I2C3, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2,
USART3, USART6
);
pub fn DMA(n: u8) -> dma::Dma {
match n {