diff options
| author | Bob McWhirter <[email protected]> | 2021-05-13 14:28:53 -0400 |
|---|---|---|
| committer | Bob McWhirter <[email protected]> | 2021-05-13 14:28:53 -0400 |
| commit | 9e93a0999f3fe6588ead99acf423bf83bee10c7c (patch) | |
| tree | 64a6565a51defc2207d831d11f664f6f01750262 | |
| parent | 07db3ed7c10915f16eeda08909f04afd92902b1b (diff) | |
Add SPIv1, use cfg_attr to pick correct impl.
Add IRQ to impl_rng!() to accomodate RNG vs HASH_RNG split.
299 files changed, 12022 insertions, 6693 deletions
diff --git a/embassy-stm32-examples/src/bin/spi.rs b/embassy-stm32-examples/src/bin/spi.rs new file mode 100644 index 000000000..308c1c682 --- /dev/null +++ b/embassy-stm32-examples/src/bin/spi.rs | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | #![feature(trait_alias)] | ||
| 4 | #![feature(min_type_alias_impl_trait)] | ||
| 5 | #![feature(impl_trait_in_bindings)] | ||
| 6 | #![feature(type_alias_impl_trait)] | ||
| 7 | |||
| 8 | #[path = "../example_common.rs"] | ||
| 9 | mod example_common; | ||
| 10 | |||
| 11 | use embassy_stm32::gpio::{Level, Output, Input, Pull}; | ||
| 12 | use embedded_hal::digital::v2::{OutputPin, InputPin}; | ||
| 13 | use example_common::*; | ||
| 14 | |||
| 15 | use cortex_m_rt::entry; | ||
| 16 | use stm32f4::stm32f429 as pac; | ||
| 17 | //use stm32l4::stm32l4x5 as pac; | ||
| 18 | use embassy_stm32::spi::{Spi, MODE_0, ByteOrder, Config}; | ||
| 19 | use embassy_stm32::time::Hertz; | ||
| 20 | use embedded_hal::blocking::spi::Transfer; | ||
| 21 | |||
| 22 | #[entry] | ||
| 23 | fn main() -> ! { | ||
| 24 | info!("Hello World, dude!"); | ||
| 25 | |||
| 26 | let pp = pac::Peripherals::take().unwrap(); | ||
| 27 | |||
| 28 | pp.DBGMCU.cr.modify(|_, w| { | ||
| 29 | w.dbg_sleep().set_bit(); | ||
| 30 | w.dbg_standby().set_bit(); | ||
| 31 | w.dbg_stop().set_bit() | ||
| 32 | }); | ||
| 33 | pp.RCC.ahb1enr.modify(|_, w| w.dma1en().set_bit()); | ||
| 34 | |||
| 35 | pp.RCC.apb1enr.modify(|_, w| { | ||
| 36 | w.spi3en().enabled(); | ||
| 37 | w | ||
| 38 | }); | ||
| 39 | |||
| 40 | pp.RCC.ahb1enr.modify(|_, w| { | ||
| 41 | w.gpioaen().enabled(); | ||
| 42 | w.gpioben().enabled(); | ||
| 43 | w.gpiocen().enabled(); | ||
| 44 | w.gpioden().enabled(); | ||
| 45 | w.gpioeen().enabled(); | ||
| 46 | w.gpiofen().enabled(); | ||
| 47 | w | ||
| 48 | }); | ||
| 49 | |||
| 50 | let rc = pp.RCC.cfgr.read().sws().bits(); | ||
| 51 | info!("rcc -> {}", rc); | ||
| 52 | let p = embassy_stm32::init(Default::default()); | ||
| 53 | |||
| 54 | let mut led = Output::new(p.PA5, Level::High); | ||
| 55 | let mut spi = Spi::new( | ||
| 56 | Hertz(16_000_000), | ||
| 57 | p.SPI3, | ||
| 58 | p.PC10, | ||
| 59 | p.PC12, | ||
| 60 | p.PC11, | ||
| 61 | Hertz(1_000_000), | ||
| 62 | Config::default(), | ||
| 63 | ); | ||
| 64 | |||
| 65 | let mut cs = Output::new( p.PE0, Level::High); | ||
| 66 | cs.set_low(); | ||
| 67 | |||
| 68 | let mut rdy = Input::new(p.PE1, Pull::Down); | ||
| 69 | let mut wake = Output::new( p.PB13, Level::Low); | ||
| 70 | let mut reset = Output::new( p.PE8, Level::Low); | ||
| 71 | |||
| 72 | wake.set_high().unwrap(); | ||
| 73 | reset.set_high().unwrap(); | ||
| 74 | |||
| 75 | loop { | ||
| 76 | info!("loop"); | ||
| 77 | while rdy.is_low().unwrap() { | ||
| 78 | info!("await ready") | ||
| 79 | } | ||
| 80 | info!("ready"); | ||
| 81 | let mut buf = [0x0A;4]; | ||
| 82 | spi.transfer(&mut buf); | ||
| 83 | info!("xfer {=[u8]:x}", buf); | ||
| 84 | } | ||
| 85 | |||
| 86 | loop { | ||
| 87 | info!("high"); | ||
| 88 | led.set_high().unwrap(); | ||
| 89 | cortex_m::asm::delay(10_000_000); | ||
| 90 | info!("low"); | ||
| 91 | led.set_low().unwrap(); | ||
| 92 | cortex_m::asm::delay(10_000_000); | ||
| 93 | } | ||
| 94 | } | ||
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index cd940c589..f4f5b0852 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml | |||
| @@ -28,125 +28,125 @@ defmt-warn = [ ] | |||
| 28 | defmt-error = [ ] | 28 | defmt-error = [ ] |
| 29 | 29 | ||
| 30 | # BEGIN GENERATED FEATURES | 30 | # BEGIN GENERATED FEATURES |
| 31 | stm32f401cb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 31 | stm32f401cb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 32 | stm32f401cc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 32 | stm32f401cc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 33 | stm32f401cd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 33 | stm32f401cd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 34 | stm32f401ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 34 | stm32f401ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 35 | stm32f401rb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 35 | stm32f401rb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 36 | stm32f401rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 36 | stm32f401rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 37 | stm32f401rd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 37 | stm32f401rd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 38 | stm32f401re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 38 | stm32f401re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 39 | stm32f401vb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 39 | stm32f401vb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 40 | stm32f401vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 40 | stm32f401vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 41 | stm32f401vd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 41 | stm32f401vd = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 42 | stm32f401ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 42 | stm32f401ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 43 | stm32f405oe = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 43 | stm32f405oe = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 44 | stm32f405og = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 44 | stm32f405og = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 45 | stm32f405rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 45 | stm32f405rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 46 | stm32f405vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 46 | stm32f405vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 47 | stm32f405zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 47 | stm32f405zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 48 | stm32f407ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 48 | stm32f407ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 49 | stm32f407ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 49 | stm32f407ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 50 | stm32f407ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 50 | stm32f407ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 51 | stm32f407vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 51 | stm32f407vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 52 | stm32f407ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 52 | stm32f407ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 53 | stm32f407zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 53 | stm32f407zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 54 | stm32f410c8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 54 | stm32f410c8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 55 | stm32f410cb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 55 | stm32f410cb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 56 | stm32f410r8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 56 | stm32f410r8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 57 | stm32f410rb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 57 | stm32f410rb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 58 | stm32f410t8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 58 | stm32f410t8 = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 59 | stm32f410tb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 59 | stm32f410tb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 60 | stm32f411cc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 60 | stm32f411cc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 61 | stm32f411ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 61 | stm32f411ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 62 | stm32f411rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 62 | stm32f411rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 63 | stm32f411re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 63 | stm32f411re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 64 | stm32f411vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 64 | stm32f411vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 65 | stm32f411ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 65 | stm32f411ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 66 | stm32f412ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 66 | stm32f412ce = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 67 | stm32f412cg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 67 | stm32f412cg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 68 | stm32f412re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 68 | stm32f412re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 69 | stm32f412rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 69 | stm32f412rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 70 | stm32f412ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 70 | stm32f412ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 71 | stm32f412vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 71 | stm32f412vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 72 | stm32f412ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 72 | stm32f412ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 73 | stm32f412zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 73 | stm32f412zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 74 | stm32f413cg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 74 | stm32f413cg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 75 | stm32f413ch = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 75 | stm32f413ch = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 76 | stm32f413mg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 76 | stm32f413mg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 77 | stm32f413mh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 77 | stm32f413mh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 78 | stm32f413rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 78 | stm32f413rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 79 | stm32f413rh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 79 | stm32f413rh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 80 | stm32f413vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 80 | stm32f413vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 81 | stm32f413vh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 81 | stm32f413vh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 82 | stm32f413zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 82 | stm32f413zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 83 | stm32f413zh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 83 | stm32f413zh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 84 | stm32f415og = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 84 | stm32f415og = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 85 | stm32f415rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 85 | stm32f415rg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 86 | stm32f415vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 86 | stm32f415vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 87 | stm32f415zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 87 | stm32f415zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 88 | stm32f417ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 88 | stm32f417ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 89 | stm32f417ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 89 | stm32f417ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 90 | stm32f417ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 90 | stm32f417ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 91 | stm32f417vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 91 | stm32f417vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 92 | stm32f417ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 92 | stm32f417ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 93 | stm32f417zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 93 | stm32f417zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 94 | stm32f423ch = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 94 | stm32f423ch = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 95 | stm32f423mh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 95 | stm32f423mh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 96 | stm32f423rh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 96 | stm32f423rh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 97 | stm32f423vh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 97 | stm32f423vh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 98 | stm32f423zh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 98 | stm32f423zh = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 99 | stm32f427ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 99 | stm32f427ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 100 | stm32f427ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 100 | stm32f427ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 101 | stm32f427ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 101 | stm32f427ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 102 | stm32f427ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 102 | stm32f427ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 103 | stm32f427vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 103 | stm32f427vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 104 | stm32f427vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 104 | stm32f427vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 105 | stm32f427zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 105 | stm32f427zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 106 | stm32f427zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 106 | stm32f427zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 107 | stm32f429ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 107 | stm32f429ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 108 | stm32f429ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 108 | stm32f429ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 109 | stm32f429be = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 109 | stm32f429be = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 110 | stm32f429bg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 110 | stm32f429bg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 111 | stm32f429bi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 111 | stm32f429bi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 112 | stm32f429ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 112 | stm32f429ie = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 113 | stm32f429ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 113 | stm32f429ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 114 | stm32f429ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 114 | stm32f429ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 115 | stm32f429ne = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 115 | stm32f429ne = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 116 | stm32f429ng = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 116 | stm32f429ng = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 117 | stm32f429ni = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 117 | stm32f429ni = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 118 | stm32f429ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 118 | stm32f429ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 119 | stm32f429vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 119 | stm32f429vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 120 | stm32f429vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 120 | stm32f429vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 121 | stm32f429ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 121 | stm32f429ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 122 | stm32f429zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 122 | stm32f429zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 123 | stm32f429zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 123 | stm32f429zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 124 | stm32f437ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 124 | stm32f437ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 125 | stm32f437ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 125 | stm32f437ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 126 | stm32f437ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 126 | stm32f437ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 127 | stm32f437vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 127 | stm32f437vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 128 | stm32f437vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 128 | stm32f437vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 129 | stm32f437zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 129 | stm32f437zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 130 | stm32f437zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 130 | stm32f437zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 131 | stm32f439ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 131 | stm32f439ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 132 | stm32f439bg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 132 | stm32f439bg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 133 | stm32f439bi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 133 | stm32f439bi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 134 | stm32f439ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 134 | stm32f439ig = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 135 | stm32f439ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 135 | stm32f439ii = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 136 | stm32f439ng = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 136 | stm32f439ng = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 137 | stm32f439ni = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 137 | stm32f439ni = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 138 | stm32f439vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 138 | stm32f439vg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 139 | stm32f439vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 139 | stm32f439vi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 140 | stm32f439zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 140 | stm32f439zg = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 141 | stm32f439zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 141 | stm32f439zi = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 142 | stm32f446mc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 142 | stm32f446mc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 143 | stm32f446me = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 143 | stm32f446me = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 144 | stm32f446rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 144 | stm32f446rc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 145 | stm32f446re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 145 | stm32f446re = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 146 | stm32f446vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 146 | stm32f446vc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 147 | stm32f446ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 147 | stm32f446ve = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 148 | stm32f446zc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 148 | stm32f446zc = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 149 | stm32f446ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 149 | stm32f446ze = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 150 | stm32f469ae = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 150 | stm32f469ae = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 151 | stm32f469ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 151 | stm32f469ag = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| 152 | stm32f469ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] | 152 | stm32f469ai = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_rng", "_rng_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",] |
| @@ -328,6 +328,7 @@ _gpio_v2 = [] | |||
| 328 | _rng = [ "rand_core",] | 328 | _rng = [ "rand_core",] |
| 329 | _rng_v1 = [] | 329 | _rng_v1 = [] |
| 330 | _spi = [] | 330 | _spi = [] |
| 331 | _spi_v1 = [] | ||
| 331 | _spi_v2 = [] | 332 | _spi_v2 = [] |
| 332 | _stm32f4 = [] | 333 | _stm32f4 = [] |
| 333 | _stm32l4 = [] | 334 | _stm32l4 = [] |
diff --git a/embassy-stm32/gen.py b/embassy-stm32/gen.py index 3f3fe569b..04a2f3337 100644 --- a/embassy-stm32/gen.py +++ b/embassy-stm32/gen.py | |||
| @@ -113,7 +113,10 @@ for chip in chips.values(): | |||
| 113 | f.write(f'impl_usart_pin!({name}, CkPin, {pin}, {func});') | 113 | f.write(f'impl_usart_pin!({name}, CkPin, {pin}, {func});') |
| 114 | 114 | ||
| 115 | if block_mod == 'rng': | 115 | if block_mod == 'rng': |
| 116 | f.write(f'impl_rng!({name});') | 116 | if 'RNG' in chip['interrupts']: |
| 117 | f.write(f'impl_rng!({name}, RNG);') | ||
| 118 | else: | ||
| 119 | f.write(f'impl_rng!({name}, HASH_RNG);') | ||
| 117 | 120 | ||
| 118 | if block_mod == 'spi': | 121 | if block_mod == 'spi': |
| 119 | clock = peri['clock'] | 122 | clock = peri['clock'] |
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index 3d8416c78..f14dbfae8 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs | |||
| @@ -17,6 +17,7 @@ pub mod exti; | |||
| 17 | pub mod gpio; | 17 | pub mod gpio; |
| 18 | #[cfg(feature = "_rng")] | 18 | #[cfg(feature = "_rng")] |
| 19 | pub mod rng; | 19 | pub mod rng; |
| 20 | #[cfg(feature = "_spi")] | ||
| 20 | pub mod spi; | 21 | pub mod spi; |
| 21 | #[cfg(feature = "_usart")] | 22 | #[cfg(feature = "_usart")] |
| 22 | pub mod usart; | 23 | pub mod usart; |
diff --git a/embassy-stm32/src/pac/regs.rs b/embassy-stm32/src/pac/regs.rs index fa31704d2..26378413f 100644 --- a/embassy-stm32/src/pac/regs.rs +++ b/embassy-stm32/src/pac/regs.rs | |||
| @@ -1,1782 +1,1523 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![doc = "Peripheral access API (generated using svd2rust v0.17.0 (22741fa 2021-04-20))"] | 2 | #![doc = "Peripheral access API (generated using svd2rust v0.17.0 (22741fa 2021-04-20))"] |
| 3 | pub mod generic { | 3 | pub mod sdmmc_v2 { |
| 4 | use core::marker::PhantomData; | 4 | use crate::generic::*; |
| 5 | #[derive(Copy, Clone)] | 5 | #[doc = "SDMMC"] |
| 6 | pub struct RW; | ||
| 7 | #[derive(Copy, Clone)] | ||
| 8 | pub struct R; | ||
| 9 | #[derive(Copy, Clone)] | ||
| 10 | pub struct W; | ||
| 11 | mod sealed { | ||
| 12 | use super::*; | ||
| 13 | pub trait Access {} | ||
| 14 | impl Access for R {} | ||
| 15 | impl Access for W {} | ||
| 16 | impl Access for RW {} | ||
| 17 | } | ||
| 18 | pub trait Access: sealed::Access + Copy {} | ||
| 19 | impl Access for R {} | ||
| 20 | impl Access for W {} | ||
| 21 | impl Access for RW {} | ||
| 22 | pub trait Read: Access {} | ||
| 23 | impl Read for RW {} | ||
| 24 | impl Read for R {} | ||
| 25 | pub trait Write: Access {} | ||
| 26 | impl Write for RW {} | ||
| 27 | impl Write for W {} | ||
| 28 | #[derive(Copy, Clone)] | 6 | #[derive(Copy, Clone)] |
| 29 | pub struct Reg<T: Copy, A: Access> { | 7 | pub struct Sdmmc(pub *mut u8); |
| 30 | ptr: *mut u8, | 8 | unsafe impl Send for Sdmmc {} |
| 31 | phantom: PhantomData<*mut (T, A)>, | 9 | unsafe impl Sync for Sdmmc {} |
| 32 | } | 10 | impl Sdmmc { |
| 33 | unsafe impl<T: Copy, A: Access> Send for Reg<T, A> {} | 11 | #[doc = "SDMMC power control register"] |
| 34 | unsafe impl<T: Copy, A: Access> Sync for Reg<T, A> {} | 12 | pub fn power(self) -> Reg<regs::Power, RW> { |
| 35 | impl<T: Copy, A: Access> Reg<T, A> { | 13 | unsafe { Reg::from_ptr(self.0.add(0usize)) } |
| 36 | pub fn from_ptr(ptr: *mut u8) -> Self { | ||
| 37 | Self { | ||
| 38 | ptr, | ||
| 39 | phantom: PhantomData, | ||
| 40 | } | ||
| 41 | } | ||
| 42 | pub fn ptr(&self) -> *mut T { | ||
| 43 | self.ptr as _ | ||
| 44 | } | ||
| 45 | } | ||
| 46 | impl<T: Copy, A: Read> Reg<T, A> { | ||
| 47 | pub unsafe fn read(&self) -> T { | ||
| 48 | (self.ptr as *mut T).read_volatile() | ||
| 49 | } | 14 | } |
| 50 | } | 15 | #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."] |
| 51 | impl<T: Copy, A: Write> Reg<T, A> { | 16 | pub fn clkcr(self) -> Reg<regs::Clkcr, RW> { |
| 52 | pub unsafe fn write_value(&self, val: T) { | 17 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 53 | (self.ptr as *mut T).write_volatile(val) | ||
| 54 | } | 18 | } |
| 55 | } | 19 | #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."] |
| 56 | impl<T: Default + Copy, A: Write> Reg<T, A> { | 20 | pub fn argr(self) -> Reg<regs::Argr, RW> { |
| 57 | pub unsafe fn write<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { | 21 | unsafe { Reg::from_ptr(self.0.add(8usize)) } |
| 58 | let mut val = Default::default(); | ||
| 59 | let res = f(&mut val); | ||
| 60 | self.write_value(val); | ||
| 61 | res | ||
| 62 | } | 22 | } |
| 63 | } | 23 | #[doc = "The SDMMC_CMDR register contains the command index and command type bits. The command index is sent to a card as part of a command message. The command type bits control the command path state machine (CPSM)."] |
| 64 | impl<T: Copy, A: Read + Write> Reg<T, A> { | 24 | pub fn cmdr(self) -> Reg<regs::Cmdr, RW> { |
| 65 | pub unsafe fn modify<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { | 25 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 66 | let mut val = self.read(); | ||
| 67 | let res = f(&mut val); | ||
| 68 | self.write_value(val); | ||
| 69 | res | ||
| 70 | } | 26 | } |
| 71 | } | 27 | #[doc = "SDMMC command response register"] |
| 72 | } | 28 | pub fn respcmdr(self) -> Reg<regs::Respcmdr, R> { |
| 73 | pub mod syscfg_h7 { | 29 | unsafe { Reg::from_ptr(self.0.add(16usize)) } |
| 74 | use crate::generic::*; | ||
| 75 | #[doc = "System configuration controller"] | ||
| 76 | #[derive(Copy, Clone)] | ||
| 77 | pub struct Syscfg(pub *mut u8); | ||
| 78 | unsafe impl Send for Syscfg {} | ||
| 79 | unsafe impl Sync for Syscfg {} | ||
| 80 | impl Syscfg { | ||
| 81 | #[doc = "peripheral mode configuration register"] | ||
| 82 | pub fn pmcr(self) -> Reg<regs::Pmcr, RW> { | ||
| 83 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 84 | } | 30 | } |
| 85 | #[doc = "external interrupt configuration register 1"] | 31 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] |
| 86 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { | 32 | pub fn respr(self, n: usize) -> Reg<regs::Resp1r, R> { |
| 87 | assert!(n < 4usize); | 33 | assert!(n < 4usize); |
| 88 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | 34 | unsafe { Reg::from_ptr(self.0.add(20usize + n * 4usize)) } |
| 89 | } | ||
| 90 | #[doc = "compensation cell control/status register"] | ||
| 91 | pub fn cccsr(self) -> Reg<regs::Cccsr, RW> { | ||
| 92 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | ||
| 93 | } | 35 | } |
| 94 | #[doc = "SYSCFG compensation cell value register"] | 36 | #[doc = "The SDMMC_DTIMER register contains the data timeout period, in card bus clock periods. A counter loads the value from the SDMMC_DTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_R or Busy state. If the timer reaches 0 while the DPSM is in either of these states, the timeout status flag is set."] |
| 95 | pub fn ccvr(self) -> Reg<regs::Ccvr, R> { | 37 | pub fn dtimer(self) -> Reg<regs::Dtimer, RW> { |
| 96 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | 38 | unsafe { Reg::from_ptr(self.0.add(36usize)) } |
| 97 | } | 39 | } |
| 98 | #[doc = "SYSCFG compensation cell code register"] | 40 | #[doc = "The SDMMC_DLENR register contains the number of data bytes to be transferred. The value is loaded into the data counter when data transfer starts."] |
| 99 | pub fn cccr(self) -> Reg<regs::Cccr, RW> { | 41 | pub fn dlenr(self) -> Reg<regs::Dlenr, RW> { |
| 100 | unsafe { Reg::from_ptr(self.0.add(40usize)) } | 42 | unsafe { Reg::from_ptr(self.0.add(40usize)) } |
| 101 | } | 43 | } |
| 102 | #[doc = "SYSCFG power control register"] | 44 | #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."] |
| 103 | pub fn pwrcr(self) -> Reg<regs::Pwrcr, RW> { | 45 | pub fn dctrl(self) -> Reg<regs::Dctrl, RW> { |
| 104 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | 46 | unsafe { Reg::from_ptr(self.0.add(44usize)) } |
| 105 | } | 47 | } |
| 106 | #[doc = "SYSCFG package register"] | 48 | #[doc = "The SDMMC_DCNTR register loads the value from the data length register (see SDMMC_DLENR) when the DPSM moves from the Idle state to the Wait_R or Wait_S state. As data is transferred, the counter decrements the value until it reaches 0. The DPSM then moves to the Idle state and when there has been no error, the data status end flag (DATAEND) is set."] |
| 107 | pub fn pkgr(self) -> Reg<regs::Pkgr, R> { | 49 | pub fn dcntr(self) -> Reg<regs::Dcntr, R> { |
| 108 | unsafe { Reg::from_ptr(self.0.add(292usize)) } | 50 | unsafe { Reg::from_ptr(self.0.add(48usize)) } |
| 109 | } | ||
| 110 | #[doc = "SYSCFG user register 0"] | ||
| 111 | pub fn ur0(self) -> Reg<regs::Ur0, R> { | ||
| 112 | unsafe { Reg::from_ptr(self.0.add(768usize)) } | ||
| 113 | } | ||
| 114 | #[doc = "SYSCFG user register 2"] | ||
| 115 | pub fn ur2(self) -> Reg<regs::Ur2, RW> { | ||
| 116 | unsafe { Reg::from_ptr(self.0.add(776usize)) } | ||
| 117 | } | ||
| 118 | #[doc = "SYSCFG user register 3"] | ||
| 119 | pub fn ur3(self) -> Reg<regs::Ur3, RW> { | ||
| 120 | unsafe { Reg::from_ptr(self.0.add(780usize)) } | ||
| 121 | } | ||
| 122 | #[doc = "SYSCFG user register 4"] | ||
| 123 | pub fn ur4(self) -> Reg<regs::Ur4, R> { | ||
| 124 | unsafe { Reg::from_ptr(self.0.add(784usize)) } | ||
| 125 | } | ||
| 126 | #[doc = "SYSCFG user register 5"] | ||
| 127 | pub fn ur5(self) -> Reg<regs::Ur5, R> { | ||
| 128 | unsafe { Reg::from_ptr(self.0.add(788usize)) } | ||
| 129 | } | ||
| 130 | #[doc = "SYSCFG user register 6"] | ||
| 131 | pub fn ur6(self) -> Reg<regs::Ur6, R> { | ||
| 132 | unsafe { Reg::from_ptr(self.0.add(792usize)) } | ||
| 133 | } | 51 | } |
| 134 | #[doc = "SYSCFG user register 7"] | 52 | #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"] |
| 135 | pub fn ur7(self) -> Reg<regs::Ur7, R> { | 53 | pub fn star(self) -> Reg<regs::Star, R> { |
| 136 | unsafe { Reg::from_ptr(self.0.add(796usize)) } | 54 | unsafe { Reg::from_ptr(self.0.add(52usize)) } |
| 137 | } | 55 | } |
| 138 | #[doc = "SYSCFG user register 8"] | 56 | #[doc = "The SDMMC_ICR register is a write-only register. Writing a bit with 1 clears the corresponding bit in the SDMMC_STAR status register."] |
| 139 | pub fn ur8(self) -> Reg<regs::Ur8, R> { | 57 | pub fn icr(self) -> Reg<regs::Icr, RW> { |
| 140 | unsafe { Reg::from_ptr(self.0.add(800usize)) } | 58 | unsafe { Reg::from_ptr(self.0.add(56usize)) } |
| 141 | } | 59 | } |
| 142 | #[doc = "SYSCFG user register 9"] | 60 | #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."] |
| 143 | pub fn ur9(self) -> Reg<regs::Ur9, R> { | 61 | pub fn maskr(self) -> Reg<regs::Maskr, RW> { |
| 144 | unsafe { Reg::from_ptr(self.0.add(804usize)) } | 62 | unsafe { Reg::from_ptr(self.0.add(60usize)) } |
| 145 | } | 63 | } |
| 146 | #[doc = "SYSCFG user register 10"] | 64 | #[doc = "The SDMMC_ACKTIMER register contains the acknowledgment timeout period, in SDMMC_CK bus clock periods. A counter loads the value from the SDMMC_ACKTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_Ack state. If the timer reaches 0 while the DPSM is in this states, the acknowledgment timeout status flag is set."] |
| 147 | pub fn ur10(self) -> Reg<regs::Ur10, R> { | 65 | pub fn acktimer(self) -> Reg<regs::Acktimer, RW> { |
| 148 | unsafe { Reg::from_ptr(self.0.add(808usize)) } | 66 | unsafe { Reg::from_ptr(self.0.add(64usize)) } |
| 149 | } | 67 | } |
| 150 | #[doc = "SYSCFG user register 11"] | 68 | #[doc = "The receive and transmit FIFOs can be read or written as 32-bit wide registers. The FIFOs contain 32 entries on 32 sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO."] |
| 151 | pub fn ur11(self) -> Reg<regs::Ur11, R> { | 69 | pub fn idmactrlr(self) -> Reg<regs::Idmactrlr, RW> { |
| 152 | unsafe { Reg::from_ptr(self.0.add(812usize)) } | 70 | unsafe { Reg::from_ptr(self.0.add(80usize)) } |
| 153 | } | 71 | } |
| 154 | #[doc = "SYSCFG user register 12"] | 72 | #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."] |
| 155 | pub fn ur12(self) -> Reg<regs::Ur12, R> { | 73 | pub fn idmabsizer(self) -> Reg<regs::Idmabsizer, RW> { |
| 156 | unsafe { Reg::from_ptr(self.0.add(816usize)) } | 74 | unsafe { Reg::from_ptr(self.0.add(84usize)) } |
| 157 | } | 75 | } |
| 158 | #[doc = "SYSCFG user register 13"] | 76 | #[doc = "The SDMMC_IDMABASE0R register contains the memory buffer base address in single buffer configuration and the buffer 0 base address in double buffer configuration."] |
| 159 | pub fn ur13(self) -> Reg<regs::Ur13, R> { | 77 | pub fn idmabase0r(self) -> Reg<regs::Idmabase0r, RW> { |
| 160 | unsafe { Reg::from_ptr(self.0.add(820usize)) } | 78 | unsafe { Reg::from_ptr(self.0.add(88usize)) } |
| 161 | } | 79 | } |
| 162 | #[doc = "SYSCFG user register 14"] | 80 | #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."] |
| 163 | pub fn ur14(self) -> Reg<regs::Ur14, RW> { | 81 | pub fn idmabase1r(self) -> Reg<regs::Idmabase1r, RW> { |
| 164 | unsafe { Reg::from_ptr(self.0.add(824usize)) } | 82 | unsafe { Reg::from_ptr(self.0.add(92usize)) } |
| 165 | } | 83 | } |
| 166 | #[doc = "SYSCFG user register 15"] | 84 | #[doc = "The receive and transmit FIFOs can be only read or written as word (32-bit) wide registers. The FIFOs contain 16 entries on sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.When accessing SDMMC_FIFOR with half word or byte access an AHB bus fault is generated."] |
| 167 | pub fn ur15(self) -> Reg<regs::Ur15, R> { | 85 | pub fn fifor(self) -> Reg<regs::Fifor, RW> { |
| 168 | unsafe { Reg::from_ptr(self.0.add(828usize)) } | 86 | unsafe { Reg::from_ptr(self.0.add(128usize)) } |
| 169 | } | 87 | } |
| 170 | #[doc = "SYSCFG user register 16"] | 88 | #[doc = "SDMMC IP version register"] |
| 171 | pub fn ur16(self) -> Reg<regs::Ur16, R> { | 89 | pub fn ver(self) -> Reg<regs::Ver, R> { |
| 172 | unsafe { Reg::from_ptr(self.0.add(832usize)) } | 90 | unsafe { Reg::from_ptr(self.0.add(1012usize)) } |
| 173 | } | 91 | } |
| 174 | #[doc = "SYSCFG user register 17"] | 92 | #[doc = "SDMMC IP identification register"] |
| 175 | pub fn ur17(self) -> Reg<regs::Ur17, R> { | 93 | pub fn id(self) -> Reg<regs::Id, R> { |
| 176 | unsafe { Reg::from_ptr(self.0.add(836usize)) } | 94 | unsafe { Reg::from_ptr(self.0.add(1016usize)) } |
| 177 | } | 95 | } |
| 178 | } | 96 | } |
| 179 | pub mod regs { | 97 | pub mod regs { |
| 180 | use crate::generic::*; | 98 | use crate::generic::*; |
| 181 | #[doc = "SYSCFG power control register"] | 99 | #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."] |
| 182 | #[repr(transparent)] | ||
| 183 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 184 | pub struct Pwrcr(pub u32); | ||
| 185 | impl Pwrcr { | ||
| 186 | #[doc = "Overdrive enable"] | ||
| 187 | pub const fn oden(&self) -> u8 { | ||
| 188 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 189 | val as u8 | ||
| 190 | } | ||
| 191 | #[doc = "Overdrive enable"] | ||
| 192 | pub fn set_oden(&mut self, val: u8) { | ||
| 193 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | ||
| 194 | } | ||
| 195 | } | ||
| 196 | impl Default for Pwrcr { | ||
| 197 | fn default() -> Pwrcr { | ||
| 198 | Pwrcr(0) | ||
| 199 | } | ||
| 200 | } | ||
| 201 | #[doc = "SYSCFG user register 0"] | ||
| 202 | #[repr(transparent)] | 100 | #[repr(transparent)] |
| 203 | #[derive(Copy, Clone, Eq, PartialEq)] | 101 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 204 | pub struct Ur0(pub u32); | 102 | pub struct Dctrl(pub u32); |
| 205 | impl Ur0 { | 103 | impl Dctrl { |
| 206 | #[doc = "Bank Swap"] | 104 | #[doc = "Data transfer enable bit This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). This bit is cleared by Hardware when data transfer completes. This bit shall only be used to transfer data when no associated data transfer command is used, i.e. shall not be used with SD or eMMC cards."] |
| 207 | pub const fn bks(&self) -> bool { | 105 | pub const fn dten(&self) -> bool { |
| 208 | let val = (self.0 >> 0usize) & 0x01; | 106 | let val = (self.0 >> 0usize) & 0x01; |
| 209 | val != 0 | 107 | val != 0 |
| 210 | } | 108 | } |
| 211 | #[doc = "Bank Swap"] | 109 | #[doc = "Data transfer enable bit This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). This bit is cleared by Hardware when data transfer completes. This bit shall only be used to transfer data when no associated data transfer command is used, i.e. shall not be used with SD or eMMC cards."] |
| 212 | pub fn set_bks(&mut self, val: bool) { | 110 | pub fn set_dten(&mut self, val: bool) { |
| 213 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 111 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 214 | } | 112 | } |
| 215 | #[doc = "Readout protection"] | 113 | #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 216 | pub const fn rdp(&self) -> u8 { | 114 | pub const fn dtdir(&self) -> bool { |
| 217 | let val = (self.0 >> 16usize) & 0xff; | 115 | let val = (self.0 >> 1usize) & 0x01; |
| 116 | val != 0 | ||
| 117 | } | ||
| 118 | #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 119 | pub fn set_dtdir(&mut self, val: bool) { | ||
| 120 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 121 | } | ||
| 122 | #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 123 | pub const fn dtmode(&self) -> u8 { | ||
| 124 | let val = (self.0 >> 2usize) & 0x03; | ||
| 218 | val as u8 | 125 | val as u8 |
| 219 | } | 126 | } |
| 220 | #[doc = "Readout protection"] | 127 | #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 221 | pub fn set_rdp(&mut self, val: u8) { | 128 | pub fn set_dtmode(&mut self, val: u8) { |
| 222 | self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); | 129 | self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize); |
| 223 | } | 130 | } |
| 224 | } | 131 | #[doc = "Data block size This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). Define the data block length when the block data transfer mode is selected: When DATALENGTH is not a multiple of DBLOCKSIZE, the transfered data is truncated at a multiple of DBLOCKSIZE. (Any remain data will not be transfered.) When DDR = 1, DBLOCKSIZE = 0000 shall not be used. (No data will be transfered)"] |
| 225 | impl Default for Ur0 { | 132 | pub const fn dblocksize(&self) -> u8 { |
| 226 | fn default() -> Ur0 { | 133 | let val = (self.0 >> 4usize) & 0x0f; |
| 227 | Ur0(0) | 134 | val as u8 |
| 228 | } | 135 | } |
| 229 | } | 136 | #[doc = "Data block size This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). Define the data block length when the block data transfer mode is selected: When DATALENGTH is not a multiple of DBLOCKSIZE, the transfered data is truncated at a multiple of DBLOCKSIZE. (Any remain data will not be transfered.) When DDR = 1, DBLOCKSIZE = 0000 shall not be used. (No data will be transfered)"] |
| 230 | #[doc = "SYSCFG user register 14"] | 137 | pub fn set_dblocksize(&mut self, val: u8) { |
| 231 | #[repr(transparent)] | 138 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); |
| 232 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 233 | pub struct Ur14(pub u32); | ||
| 234 | impl Ur14 { | ||
| 235 | #[doc = "D1 Stop Reset"] | ||
| 236 | pub const fn d1stprst(&self) -> bool { | ||
| 237 | let val = (self.0 >> 0usize) & 0x01; | ||
| 238 | val != 0 | ||
| 239 | } | 139 | } |
| 240 | #[doc = "D1 Stop Reset"] | 140 | #[doc = "Read wait start. If this bit is set, read wait operation starts."] |
| 241 | pub fn set_d1stprst(&mut self, val: bool) { | 141 | pub const fn rwstart(&self) -> bool { |
| 242 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 142 | let val = (self.0 >> 8usize) & 0x01; |
| 143 | val != 0 | ||
| 243 | } | 144 | } |
| 244 | } | 145 | #[doc = "Read wait start. If this bit is set, read wait operation starts."] |
| 245 | impl Default for Ur14 { | 146 | pub fn set_rwstart(&mut self, val: bool) { |
| 246 | fn default() -> Ur14 { | 147 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 247 | Ur14(0) | ||
| 248 | } | 148 | } |
| 249 | } | 149 | #[doc = "Read wait stop This bit is written by firmware and auto cleared by hardware when the DPSM moves from the READ_WAIT state to the WAIT_R or IDLE state."] |
| 250 | #[doc = "SYSCFG user register 5"] | 150 | pub const fn rwstop(&self) -> bool { |
| 251 | #[repr(transparent)] | 151 | let val = (self.0 >> 9usize) & 0x01; |
| 252 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 253 | pub struct Ur5(pub u32); | ||
| 254 | impl Ur5 { | ||
| 255 | #[doc = "Mass erase secured area disabled for bank 1"] | ||
| 256 | pub const fn mesad_1(&self) -> bool { | ||
| 257 | let val = (self.0 >> 0usize) & 0x01; | ||
| 258 | val != 0 | 152 | val != 0 |
| 259 | } | 153 | } |
| 260 | #[doc = "Mass erase secured area disabled for bank 1"] | 154 | #[doc = "Read wait stop This bit is written by firmware and auto cleared by hardware when the DPSM moves from the READ_WAIT state to the WAIT_R or IDLE state."] |
| 261 | pub fn set_mesad_1(&mut self, val: bool) { | 155 | pub fn set_rwstop(&mut self, val: bool) { |
| 262 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 156 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); |
| 263 | } | 157 | } |
| 264 | #[doc = "Write protection for flash bank 1"] | 158 | #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 265 | pub const fn wrpn_1(&self) -> u8 { | 159 | pub const fn rwmod(&self) -> bool { |
| 266 | let val = (self.0 >> 16usize) & 0xff; | 160 | let val = (self.0 >> 10usize) & 0x01; |
| 267 | val as u8 | 161 | val != 0 |
| 268 | } | 162 | } |
| 269 | #[doc = "Write protection for flash bank 1"] | 163 | #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 270 | pub fn set_wrpn_1(&mut self, val: u8) { | 164 | pub fn set_rwmod(&mut self, val: bool) { |
| 271 | self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); | 165 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); |
| 272 | } | 166 | } |
| 273 | } | 167 | #[doc = "SD I/O interrupt enable functions This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). If this bit is set, the DPSM enables the SD I/O card specific interrupt operation."] |
| 274 | impl Default for Ur5 { | 168 | pub const fn sdioen(&self) -> bool { |
| 275 | fn default() -> Ur5 { | 169 | let val = (self.0 >> 11usize) & 0x01; |
| 276 | Ur5(0) | 170 | val != 0 |
| 277 | } | 171 | } |
| 278 | } | 172 | #[doc = "SD I/O interrupt enable functions This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). If this bit is set, the DPSM enables the SD I/O card specific interrupt operation."] |
| 279 | #[doc = "SYSCFG user register 8"] | 173 | pub fn set_sdioen(&mut self, val: bool) { |
| 280 | #[repr(transparent)] | 174 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); |
| 281 | #[derive(Copy, Clone, Eq, PartialEq)] | 175 | } |
| 282 | pub struct Ur8(pub u32); | 176 | #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 283 | impl Ur8 { | 177 | pub const fn bootacken(&self) -> bool { |
| 284 | #[doc = "Mass erase protected area disabled for bank 2"] | 178 | let val = (self.0 >> 12usize) & 0x01; |
| 285 | pub const fn mepad_2(&self) -> bool { | ||
| 286 | let val = (self.0 >> 0usize) & 0x01; | ||
| 287 | val != 0 | 179 | val != 0 |
| 288 | } | 180 | } |
| 289 | #[doc = "Mass erase protected area disabled for bank 2"] | 181 | #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 290 | pub fn set_mepad_2(&mut self, val: bool) { | 182 | pub fn set_bootacken(&mut self, val: bool) { |
| 291 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 183 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); |
| 292 | } | 184 | } |
| 293 | #[doc = "Mass erase secured area disabled for bank 2"] | 185 | #[doc = "FIFO reset, will flush any remaining data. This bit can only be written by firmware when IDMAEN= 0 and DPSM is active (DPSMACT = 1). This bit will only take effect when a transfer error or transfer hold occurs."] |
| 294 | pub const fn mesad_2(&self) -> bool { | 186 | pub const fn fiforst(&self) -> bool { |
| 295 | let val = (self.0 >> 16usize) & 0x01; | 187 | let val = (self.0 >> 13usize) & 0x01; |
| 296 | val != 0 | 188 | val != 0 |
| 297 | } | 189 | } |
| 298 | #[doc = "Mass erase secured area disabled for bank 2"] | 190 | #[doc = "FIFO reset, will flush any remaining data. This bit can only be written by firmware when IDMAEN= 0 and DPSM is active (DPSMACT = 1). This bit will only take effect when a transfer error or transfer hold occurs."] |
| 299 | pub fn set_mesad_2(&mut self, val: bool) { | 191 | pub fn set_fiforst(&mut self, val: bool) { |
| 300 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 192 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); |
| 301 | } | 193 | } |
| 302 | } | 194 | } |
| 303 | impl Default for Ur8 { | 195 | impl Default for Dctrl { |
| 304 | fn default() -> Ur8 { | 196 | fn default() -> Dctrl { |
| 305 | Ur8(0) | 197 | Dctrl(0) |
| 306 | } | 198 | } |
| 307 | } | 199 | } |
| 308 | #[doc = "peripheral mode configuration register"] | 200 | #[doc = "The SDMMC_ICR register is a write-only register. Writing a bit with 1 clears the corresponding bit in the SDMMC_STAR status register."] |
| 309 | #[repr(transparent)] | 201 | #[repr(transparent)] |
| 310 | #[derive(Copy, Clone, Eq, PartialEq)] | 202 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 311 | pub struct Pmcr(pub u32); | 203 | pub struct Icr(pub u32); |
| 312 | impl Pmcr { | 204 | impl Icr { |
| 313 | #[doc = "I2C1 Fm+"] | 205 | #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."] |
| 314 | pub const fn i2c1fmp(&self) -> bool { | 206 | pub const fn ccrcfailc(&self) -> bool { |
| 315 | let val = (self.0 >> 0usize) & 0x01; | 207 | let val = (self.0 >> 0usize) & 0x01; |
| 316 | val != 0 | 208 | val != 0 |
| 317 | } | 209 | } |
| 318 | #[doc = "I2C1 Fm+"] | 210 | #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."] |
| 319 | pub fn set_i2c1fmp(&mut self, val: bool) { | 211 | pub fn set_ccrcfailc(&mut self, val: bool) { |
| 320 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 212 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 321 | } | 213 | } |
| 322 | #[doc = "I2C2 Fm+"] | 214 | #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."] |
| 323 | pub const fn i2c2fmp(&self) -> bool { | 215 | pub const fn dcrcfailc(&self) -> bool { |
| 324 | let val = (self.0 >> 1usize) & 0x01; | 216 | let val = (self.0 >> 1usize) & 0x01; |
| 325 | val != 0 | 217 | val != 0 |
| 326 | } | 218 | } |
| 327 | #[doc = "I2C2 Fm+"] | 219 | #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."] |
| 328 | pub fn set_i2c2fmp(&mut self, val: bool) { | 220 | pub fn set_dcrcfailc(&mut self, val: bool) { |
| 329 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 221 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 330 | } | 222 | } |
| 331 | #[doc = "I2C3 Fm+"] | 223 | #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."] |
| 332 | pub const fn i2c3fmp(&self) -> bool { | 224 | pub const fn ctimeoutc(&self) -> bool { |
| 333 | let val = (self.0 >> 2usize) & 0x01; | 225 | let val = (self.0 >> 2usize) & 0x01; |
| 334 | val != 0 | 226 | val != 0 |
| 335 | } | 227 | } |
| 336 | #[doc = "I2C3 Fm+"] | 228 | #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."] |
| 337 | pub fn set_i2c3fmp(&mut self, val: bool) { | 229 | pub fn set_ctimeoutc(&mut self, val: bool) { |
| 338 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 230 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 339 | } | 231 | } |
| 340 | #[doc = "I2C4 Fm+"] | 232 | #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."] |
| 341 | pub const fn i2c4fmp(&self) -> bool { | 233 | pub const fn dtimeoutc(&self) -> bool { |
| 342 | let val = (self.0 >> 3usize) & 0x01; | 234 | let val = (self.0 >> 3usize) & 0x01; |
| 343 | val != 0 | 235 | val != 0 |
| 344 | } | 236 | } |
| 345 | #[doc = "I2C4 Fm+"] | 237 | #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."] |
| 346 | pub fn set_i2c4fmp(&mut self, val: bool) { | 238 | pub fn set_dtimeoutc(&mut self, val: bool) { |
| 347 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 239 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 348 | } | 240 | } |
| 349 | #[doc = "PB(6) Fm+"] | 241 | #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."] |
| 350 | pub const fn pb6fmp(&self) -> bool { | 242 | pub const fn txunderrc(&self) -> bool { |
| 351 | let val = (self.0 >> 4usize) & 0x01; | 243 | let val = (self.0 >> 4usize) & 0x01; |
| 352 | val != 0 | 244 | val != 0 |
| 353 | } | 245 | } |
| 354 | #[doc = "PB(6) Fm+"] | 246 | #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."] |
| 355 | pub fn set_pb6fmp(&mut self, val: bool) { | 247 | pub fn set_txunderrc(&mut self, val: bool) { |
| 356 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | 248 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); |
| 357 | } | 249 | } |
| 358 | #[doc = "PB(7) Fast Mode Plus"] | 250 | #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."] |
| 359 | pub const fn pb7fmp(&self) -> bool { | 251 | pub const fn rxoverrc(&self) -> bool { |
| 360 | let val = (self.0 >> 5usize) & 0x01; | 252 | let val = (self.0 >> 5usize) & 0x01; |
| 361 | val != 0 | 253 | val != 0 |
| 362 | } | 254 | } |
| 363 | #[doc = "PB(7) Fast Mode Plus"] | 255 | #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."] |
| 364 | pub fn set_pb7fmp(&mut self, val: bool) { | 256 | pub fn set_rxoverrc(&mut self, val: bool) { |
| 365 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 257 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 366 | } | 258 | } |
| 367 | #[doc = "PB(8) Fast Mode Plus"] | 259 | #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."] |
| 368 | pub const fn pb8fmp(&self) -> bool { | 260 | pub const fn cmdrendc(&self) -> bool { |
| 369 | let val = (self.0 >> 6usize) & 0x01; | 261 | let val = (self.0 >> 6usize) & 0x01; |
| 370 | val != 0 | 262 | val != 0 |
| 371 | } | 263 | } |
| 372 | #[doc = "PB(8) Fast Mode Plus"] | 264 | #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."] |
| 373 | pub fn set_pb8fmp(&mut self, val: bool) { | 265 | pub fn set_cmdrendc(&mut self, val: bool) { |
| 374 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 266 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 375 | } | 267 | } |
| 376 | #[doc = "PB(9) Fm+"] | 268 | #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."] |
| 377 | pub const fn pb9fmp(&self) -> bool { | 269 | pub const fn cmdsentc(&self) -> bool { |
| 378 | let val = (self.0 >> 7usize) & 0x01; | 270 | let val = (self.0 >> 7usize) & 0x01; |
| 379 | val != 0 | 271 | val != 0 |
| 380 | } | 272 | } |
| 381 | #[doc = "PB(9) Fm+"] | 273 | #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."] |
| 382 | pub fn set_pb9fmp(&mut self, val: bool) { | 274 | pub fn set_cmdsentc(&mut self, val: bool) { |
| 383 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 275 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 384 | } | 276 | } |
| 385 | #[doc = "Booster Enable"] | 277 | #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."] |
| 386 | pub const fn booste(&self) -> bool { | 278 | pub const fn dataendc(&self) -> bool { |
| 387 | let val = (self.0 >> 8usize) & 0x01; | 279 | let val = (self.0 >> 8usize) & 0x01; |
| 388 | val != 0 | 280 | val != 0 |
| 389 | } | 281 | } |
| 390 | #[doc = "Booster Enable"] | 282 | #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."] |
| 391 | pub fn set_booste(&mut self, val: bool) { | 283 | pub fn set_dataendc(&mut self, val: bool) { |
| 392 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 284 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 393 | } | 285 | } |
| 394 | #[doc = "Analog switch supply voltage selection"] | 286 | #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."] |
| 395 | pub const fn boostvddsel(&self) -> bool { | 287 | pub const fn dholdc(&self) -> bool { |
| 396 | let val = (self.0 >> 9usize) & 0x01; | 288 | let val = (self.0 >> 9usize) & 0x01; |
| 397 | val != 0 | 289 | val != 0 |
| 398 | } | 290 | } |
| 399 | #[doc = "Analog switch supply voltage selection"] | 291 | #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."] |
| 400 | pub fn set_boostvddsel(&mut self, val: bool) { | 292 | pub fn set_dholdc(&mut self, val: bool) { |
| 401 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | 293 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); |
| 402 | } | 294 | } |
| 403 | #[doc = "Ethernet PHY Interface Selection"] | 295 | #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."] |
| 404 | pub const fn epis(&self) -> u8 { | 296 | pub const fn dbckendc(&self) -> bool { |
| 405 | let val = (self.0 >> 21usize) & 0x07; | 297 | let val = (self.0 >> 10usize) & 0x01; |
| 406 | val as u8 | 298 | val != 0 |
| 407 | } | 299 | } |
| 408 | #[doc = "Ethernet PHY Interface Selection"] | 300 | #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."] |
| 409 | pub fn set_epis(&mut self, val: u8) { | 301 | pub fn set_dbckendc(&mut self, val: bool) { |
| 410 | self.0 = (self.0 & !(0x07 << 21usize)) | (((val as u32) & 0x07) << 21usize); | 302 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); |
| 411 | } | 303 | } |
| 412 | #[doc = "PA0 Switch Open"] | 304 | #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."] |
| 413 | pub const fn pa0so(&self) -> bool { | 305 | pub const fn dabortc(&self) -> bool { |
| 306 | let val = (self.0 >> 11usize) & 0x01; | ||
| 307 | val != 0 | ||
| 308 | } | ||
| 309 | #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."] | ||
| 310 | pub fn set_dabortc(&mut self, val: bool) { | ||
| 311 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); | ||
| 312 | } | ||
| 313 | #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."] | ||
| 314 | pub const fn busyd0endc(&self) -> bool { | ||
| 315 | let val = (self.0 >> 21usize) & 0x01; | ||
| 316 | val != 0 | ||
| 317 | } | ||
| 318 | #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."] | ||
| 319 | pub fn set_busyd0endc(&mut self, val: bool) { | ||
| 320 | self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); | ||
| 321 | } | ||
| 322 | #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."] | ||
| 323 | pub const fn sdioitc(&self) -> bool { | ||
| 324 | let val = (self.0 >> 22usize) & 0x01; | ||
| 325 | val != 0 | ||
| 326 | } | ||
| 327 | #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."] | ||
| 328 | pub fn set_sdioitc(&mut self, val: bool) { | ||
| 329 | self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); | ||
| 330 | } | ||
| 331 | #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."] | ||
| 332 | pub const fn ackfailc(&self) -> bool { | ||
| 333 | let val = (self.0 >> 23usize) & 0x01; | ||
| 334 | val != 0 | ||
| 335 | } | ||
| 336 | #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."] | ||
| 337 | pub fn set_ackfailc(&mut self, val: bool) { | ||
| 338 | self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); | ||
| 339 | } | ||
| 340 | #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."] | ||
| 341 | pub const fn acktimeoutc(&self) -> bool { | ||
| 414 | let val = (self.0 >> 24usize) & 0x01; | 342 | let val = (self.0 >> 24usize) & 0x01; |
| 415 | val != 0 | 343 | val != 0 |
| 416 | } | 344 | } |
| 417 | #[doc = "PA0 Switch Open"] | 345 | #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."] |
| 418 | pub fn set_pa0so(&mut self, val: bool) { | 346 | pub fn set_acktimeoutc(&mut self, val: bool) { |
| 419 | self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); | 347 | self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); |
| 420 | } | 348 | } |
| 421 | #[doc = "PA1 Switch Open"] | 349 | #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."] |
| 422 | pub const fn pa1so(&self) -> bool { | 350 | pub const fn vswendc(&self) -> bool { |
| 423 | let val = (self.0 >> 25usize) & 0x01; | 351 | let val = (self.0 >> 25usize) & 0x01; |
| 424 | val != 0 | 352 | val != 0 |
| 425 | } | 353 | } |
| 426 | #[doc = "PA1 Switch Open"] | 354 | #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."] |
| 427 | pub fn set_pa1so(&mut self, val: bool) { | 355 | pub fn set_vswendc(&mut self, val: bool) { |
| 428 | self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); | 356 | self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); |
| 429 | } | 357 | } |
| 430 | #[doc = "PC2 Switch Open"] | 358 | #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."] |
| 431 | pub const fn pc2so(&self) -> bool { | 359 | pub const fn ckstopc(&self) -> bool { |
| 432 | let val = (self.0 >> 26usize) & 0x01; | 360 | let val = (self.0 >> 26usize) & 0x01; |
| 433 | val != 0 | 361 | val != 0 |
| 434 | } | 362 | } |
| 435 | #[doc = "PC2 Switch Open"] | 363 | #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."] |
| 436 | pub fn set_pc2so(&mut self, val: bool) { | 364 | pub fn set_ckstopc(&mut self, val: bool) { |
| 437 | self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); | 365 | self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); |
| 438 | } | 366 | } |
| 439 | #[doc = "PC3 Switch Open"] | 367 | #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."] |
| 440 | pub const fn pc3so(&self) -> bool { | 368 | pub const fn idmatec(&self) -> bool { |
| 441 | let val = (self.0 >> 27usize) & 0x01; | 369 | let val = (self.0 >> 27usize) & 0x01; |
| 442 | val != 0 | 370 | val != 0 |
| 443 | } | 371 | } |
| 444 | #[doc = "PC3 Switch Open"] | 372 | #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."] |
| 445 | pub fn set_pc3so(&mut self, val: bool) { | 373 | pub fn set_idmatec(&mut self, val: bool) { |
| 446 | self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); | 374 | self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); |
| 447 | } | 375 | } |
| 376 | #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."] | ||
| 377 | pub const fn idmabtcc(&self) -> bool { | ||
| 378 | let val = (self.0 >> 28usize) & 0x01; | ||
| 379 | val != 0 | ||
| 380 | } | ||
| 381 | #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."] | ||
| 382 | pub fn set_idmabtcc(&mut self, val: bool) { | ||
| 383 | self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); | ||
| 384 | } | ||
| 448 | } | 385 | } |
| 449 | impl Default for Pmcr { | 386 | impl Default for Icr { |
| 450 | fn default() -> Pmcr { | 387 | fn default() -> Icr { |
| 451 | Pmcr(0) | 388 | Icr(0) |
| 452 | } | 389 | } |
| 453 | } | 390 | } |
| 454 | #[doc = "SYSCFG user register 12"] | 391 | #[doc = "SDMMC IP identification register"] |
| 455 | #[repr(transparent)] | 392 | #[repr(transparent)] |
| 456 | #[derive(Copy, Clone, Eq, PartialEq)] | 393 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 457 | pub struct Ur12(pub u32); | 394 | pub struct Id(pub u32); |
| 458 | impl Ur12 { | 395 | impl Id { |
| 459 | #[doc = "Secure mode"] | 396 | #[doc = "SDMMC IP identification."] |
| 460 | pub const fn secure(&self) -> bool { | 397 | pub const fn ip_id(&self) -> u32 { |
| 461 | let val = (self.0 >> 16usize) & 0x01; | 398 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 462 | val != 0 | 399 | val as u32 |
| 463 | } | 400 | } |
| 464 | #[doc = "Secure mode"] | 401 | #[doc = "SDMMC IP identification."] |
| 465 | pub fn set_secure(&mut self, val: bool) { | 402 | pub fn set_ip_id(&mut self, val: u32) { |
| 466 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 403 | self.0 = |
| 404 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 467 | } | 405 | } |
| 468 | } | 406 | } |
| 469 | impl Default for Ur12 { | 407 | impl Default for Id { |
| 470 | fn default() -> Ur12 { | 408 | fn default() -> Id { |
| 471 | Ur12(0) | 409 | Id(0) |
| 472 | } | 410 | } |
| 473 | } | 411 | } |
| 474 | #[doc = "SYSCFG user register 4"] | 412 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] |
| 475 | #[repr(transparent)] | 413 | #[repr(transparent)] |
| 476 | #[derive(Copy, Clone, Eq, PartialEq)] | 414 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 477 | pub struct Ur4(pub u32); | 415 | pub struct Resp2r(pub u32); |
| 478 | impl Ur4 { | 416 | impl Resp2r { |
| 479 | #[doc = "Mass Erase Protected Area Disabled for bank 1"] | 417 | #[doc = "see Table404."] |
| 480 | pub const fn mepad_1(&self) -> bool { | 418 | pub const fn cardstatus2(&self) -> u32 { |
| 481 | let val = (self.0 >> 16usize) & 0x01; | 419 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 482 | val != 0 | 420 | val as u32 |
| 483 | } | 421 | } |
| 484 | #[doc = "Mass Erase Protected Area Disabled for bank 1"] | 422 | #[doc = "see Table404."] |
| 485 | pub fn set_mepad_1(&mut self, val: bool) { | 423 | pub fn set_cardstatus2(&mut self, val: u32) { |
| 486 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 424 | self.0 = |
| 425 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 487 | } | 426 | } |
| 488 | } | 427 | } |
| 489 | impl Default for Ur4 { | 428 | impl Default for Resp2r { |
| 490 | fn default() -> Ur4 { | 429 | fn default() -> Resp2r { |
| 491 | Ur4(0) | 430 | Resp2r(0) |
| 492 | } | 431 | } |
| 493 | } | 432 | } |
| 494 | #[doc = "SYSCFG compensation cell value register"] | 433 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] |
| 495 | #[repr(transparent)] | 434 | #[repr(transparent)] |
| 496 | #[derive(Copy, Clone, Eq, PartialEq)] | 435 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 497 | pub struct Ccvr(pub u32); | 436 | pub struct Resp1r(pub u32); |
| 498 | impl Ccvr { | 437 | impl Resp1r { |
| 499 | #[doc = "NMOS compensation value"] | 438 | #[doc = "see Table 432"] |
| 500 | pub const fn ncv(&self) -> u8 { | 439 | pub const fn cardstatus1(&self) -> u32 { |
| 501 | let val = (self.0 >> 0usize) & 0x0f; | 440 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 502 | val as u8 | 441 | val as u32 |
| 503 | } | 442 | } |
| 504 | #[doc = "NMOS compensation value"] | 443 | #[doc = "see Table 432"] |
| 505 | pub fn set_ncv(&mut self, val: u8) { | 444 | pub fn set_cardstatus1(&mut self, val: u32) { |
| 506 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | 445 | self.0 = |
| 446 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 507 | } | 447 | } |
| 508 | #[doc = "PMOS compensation value"] | 448 | } |
| 509 | pub const fn pcv(&self) -> u8 { | 449 | impl Default for Resp1r { |
| 510 | let val = (self.0 >> 4usize) & 0x0f; | 450 | fn default() -> Resp1r { |
| 511 | val as u8 | 451 | Resp1r(0) |
| 512 | } | 452 | } |
| 513 | #[doc = "PMOS compensation value"] | 453 | } |
| 514 | pub fn set_pcv(&mut self, val: u8) { | 454 | #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."] |
| 515 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); | 455 | #[repr(transparent)] |
| 456 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 457 | pub struct Argr(pub u32); | ||
| 458 | impl Argr { | ||
| 459 | #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."] | ||
| 460 | pub const fn cmdarg(&self) -> u32 { | ||
| 461 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 462 | val as u32 | ||
| 463 | } | ||
| 464 | #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."] | ||
| 465 | pub fn set_cmdarg(&mut self, val: u32) { | ||
| 466 | self.0 = | ||
| 467 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 516 | } | 468 | } |
| 517 | } | 469 | } |
| 518 | impl Default for Ccvr { | 470 | impl Default for Argr { |
| 519 | fn default() -> Ccvr { | 471 | fn default() -> Argr { |
| 520 | Ccvr(0) | 472 | Argr(0) |
| 521 | } | 473 | } |
| 522 | } | 474 | } |
| 523 | #[doc = "SYSCFG user register 13"] | 475 | #[doc = "SDMMC IP version register"] |
| 524 | #[repr(transparent)] | 476 | #[repr(transparent)] |
| 525 | #[derive(Copy, Clone, Eq, PartialEq)] | 477 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 526 | pub struct Ur13(pub u32); | 478 | pub struct Ver(pub u32); |
| 527 | impl Ur13 { | 479 | impl Ver { |
| 528 | #[doc = "Secured DTCM RAM Size"] | 480 | #[doc = "IP minor revision number."] |
| 529 | pub const fn sdrs(&self) -> u8 { | 481 | pub const fn minrev(&self) -> u8 { |
| 530 | let val = (self.0 >> 0usize) & 0x03; | 482 | let val = (self.0 >> 0usize) & 0x0f; |
| 531 | val as u8 | 483 | val as u8 |
| 532 | } | 484 | } |
| 533 | #[doc = "Secured DTCM RAM Size"] | 485 | #[doc = "IP minor revision number."] |
| 534 | pub fn set_sdrs(&mut self, val: u8) { | 486 | pub fn set_minrev(&mut self, val: u8) { |
| 535 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); | 487 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 536 | } | 488 | } |
| 537 | #[doc = "D1 Standby reset"] | 489 | #[doc = "IP major revision number."] |
| 538 | pub const fn d1sbrst(&self) -> bool { | 490 | pub const fn majrev(&self) -> u8 { |
| 539 | let val = (self.0 >> 16usize) & 0x01; | 491 | let val = (self.0 >> 4usize) & 0x0f; |
| 540 | val != 0 | 492 | val as u8 |
| 541 | } | 493 | } |
| 542 | #[doc = "D1 Standby reset"] | 494 | #[doc = "IP major revision number."] |
| 543 | pub fn set_d1sbrst(&mut self, val: bool) { | 495 | pub fn set_majrev(&mut self, val: u8) { |
| 544 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 496 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); |
| 545 | } | 497 | } |
| 546 | } | 498 | } |
| 547 | impl Default for Ur13 { | 499 | impl Default for Ver { |
| 548 | fn default() -> Ur13 { | 500 | fn default() -> Ver { |
| 549 | Ur13(0) | 501 | Ver(0) |
| 550 | } | 502 | } |
| 551 | } | 503 | } |
| 552 | #[doc = "compensation cell control/status register"] | 504 | #[doc = "The receive and transmit FIFOs can be read or written as 32-bit wide registers. The FIFOs contain 32 entries on 32 sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO."] |
| 553 | #[repr(transparent)] | 505 | #[repr(transparent)] |
| 554 | #[derive(Copy, Clone, Eq, PartialEq)] | 506 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 555 | pub struct Cccsr(pub u32); | 507 | pub struct Idmactrlr(pub u32); |
| 556 | impl Cccsr { | 508 | impl Idmactrlr { |
| 557 | #[doc = "enable"] | 509 | #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 558 | pub const fn en(&self) -> bool { | 510 | pub const fn idmaen(&self) -> bool { |
| 559 | let val = (self.0 >> 0usize) & 0x01; | 511 | let val = (self.0 >> 0usize) & 0x01; |
| 560 | val != 0 | 512 | val != 0 |
| 561 | } | 513 | } |
| 562 | #[doc = "enable"] | 514 | #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 563 | pub fn set_en(&mut self, val: bool) { | 515 | pub fn set_idmaen(&mut self, val: bool) { |
| 564 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 516 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 565 | } | 517 | } |
| 566 | #[doc = "Code selection"] | 518 | #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 567 | pub const fn cs(&self) -> bool { | 519 | pub const fn idmabmode(&self) -> bool { |
| 568 | let val = (self.0 >> 1usize) & 0x01; | 520 | let val = (self.0 >> 1usize) & 0x01; |
| 569 | val != 0 | 521 | val != 0 |
| 570 | } | 522 | } |
| 571 | #[doc = "Code selection"] | 523 | #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 572 | pub fn set_cs(&mut self, val: bool) { | 524 | pub fn set_idmabmode(&mut self, val: bool) { |
| 573 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 525 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 574 | } | 526 | } |
| 575 | #[doc = "Compensation cell ready flag"] | 527 | #[doc = "Double buffer mode active buffer indication This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). When IDMA is enabled this bit is toggled by hardware."] |
| 576 | pub const fn ready(&self) -> bool { | 528 | pub const fn idmabact(&self) -> bool { |
| 577 | let val = (self.0 >> 8usize) & 0x01; | 529 | let val = (self.0 >> 2usize) & 0x01; |
| 578 | val != 0 | ||
| 579 | } | ||
| 580 | #[doc = "Compensation cell ready flag"] | ||
| 581 | pub fn set_ready(&mut self, val: bool) { | ||
| 582 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 583 | } | ||
| 584 | #[doc = "High-speed at low-voltage"] | ||
| 585 | pub const fn hslv(&self) -> bool { | ||
| 586 | let val = (self.0 >> 16usize) & 0x01; | ||
| 587 | val != 0 | 530 | val != 0 |
| 588 | } | 531 | } |
| 589 | #[doc = "High-speed at low-voltage"] | 532 | #[doc = "Double buffer mode active buffer indication This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). When IDMA is enabled this bit is toggled by hardware."] |
| 590 | pub fn set_hslv(&mut self, val: bool) { | 533 | pub fn set_idmabact(&mut self, val: bool) { |
| 591 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 534 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 592 | } | 535 | } |
| 593 | } | 536 | } |
| 594 | impl Default for Cccsr { | 537 | impl Default for Idmactrlr { |
| 595 | fn default() -> Cccsr { | 538 | fn default() -> Idmactrlr { |
| 596 | Cccsr(0) | 539 | Idmactrlr(0) |
| 597 | } | 540 | } |
| 598 | } | 541 | } |
| 599 | #[doc = "SYSCFG user register 6"] | 542 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] |
| 600 | #[repr(transparent)] | 543 | #[repr(transparent)] |
| 601 | #[derive(Copy, Clone, Eq, PartialEq)] | 544 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 602 | pub struct Ur6(pub u32); | 545 | pub struct Resp4r(pub u32); |
| 603 | impl Ur6 { | 546 | impl Resp4r { |
| 604 | #[doc = "Protected area start address for bank 1"] | 547 | #[doc = "see Table404."] |
| 605 | pub const fn pa_beg_1(&self) -> u16 { | 548 | pub const fn cardstatus4(&self) -> u32 { |
| 606 | let val = (self.0 >> 0usize) & 0x0fff; | 549 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 607 | val as u16 | 550 | val as u32 |
| 608 | } | ||
| 609 | #[doc = "Protected area start address for bank 1"] | ||
| 610 | pub fn set_pa_beg_1(&mut self, val: u16) { | ||
| 611 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); | ||
| 612 | } | ||
| 613 | #[doc = "Protected area end address for bank 1"] | ||
| 614 | pub const fn pa_end_1(&self) -> u16 { | ||
| 615 | let val = (self.0 >> 16usize) & 0x0fff; | ||
| 616 | val as u16 | ||
| 617 | } | 551 | } |
| 618 | #[doc = "Protected area end address for bank 1"] | 552 | #[doc = "see Table404."] |
| 619 | pub fn set_pa_end_1(&mut self, val: u16) { | 553 | pub fn set_cardstatus4(&mut self, val: u32) { |
| 620 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | 554 | self.0 = |
| 555 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 621 | } | 556 | } |
| 622 | } | 557 | } |
| 623 | impl Default for Ur6 { | 558 | impl Default for Resp4r { |
| 624 | fn default() -> Ur6 { | 559 | fn default() -> Resp4r { |
| 625 | Ur6(0) | 560 | Resp4r(0) |
| 626 | } | 561 | } |
| 627 | } | 562 | } |
| 628 | #[doc = "SYSCFG package register"] | 563 | #[doc = "The SDMMC_CMDR register contains the command index and command type bits. The command index is sent to a card as part of a command message. The command type bits control the command path state machine (CPSM)."] |
| 629 | #[repr(transparent)] | 564 | #[repr(transparent)] |
| 630 | #[derive(Copy, Clone, Eq, PartialEq)] | 565 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 631 | pub struct Pkgr(pub u32); | 566 | pub struct Cmdr(pub u32); |
| 632 | impl Pkgr { | 567 | impl Cmdr { |
| 633 | #[doc = "Package"] | 568 | #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."] |
| 634 | pub const fn pkg(&self) -> u8 { | 569 | pub const fn cmdindex(&self) -> u8 { |
| 635 | let val = (self.0 >> 0usize) & 0x0f; | 570 | let val = (self.0 >> 0usize) & 0x3f; |
| 636 | val as u8 | 571 | val as u8 |
| 637 | } | 572 | } |
| 638 | #[doc = "Package"] | 573 | #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."] |
| 639 | pub fn set_pkg(&mut self, val: u8) { | 574 | pub fn set_cmdindex(&mut self, val: u8) { |
| 640 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | 575 | self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); |
| 641 | } | 576 | } |
| 642 | } | 577 | #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."] |
| 643 | impl Default for Pkgr { | 578 | pub const fn cmdtrans(&self) -> bool { |
| 644 | fn default() -> Pkgr { | 579 | let val = (self.0 >> 6usize) & 0x01; |
| 645 | Pkgr(0) | 580 | val != 0 |
| 646 | } | 581 | } |
| 647 | } | 582 | #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."] |
| 648 | #[doc = "SYSCFG user register 10"] | 583 | pub fn set_cmdtrans(&mut self, val: bool) { |
| 649 | #[repr(transparent)] | 584 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 650 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 651 | pub struct Ur10(pub u32); | ||
| 652 | impl Ur10 { | ||
| 653 | #[doc = "Protected area end address for bank 2"] | ||
| 654 | pub const fn pa_end_2(&self) -> u16 { | ||
| 655 | let val = (self.0 >> 0usize) & 0x0fff; | ||
| 656 | val as u16 | ||
| 657 | } | 585 | } |
| 658 | #[doc = "Protected area end address for bank 2"] | 586 | #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."] |
| 659 | pub fn set_pa_end_2(&mut self, val: u16) { | 587 | pub const fn cmdstop(&self) -> bool { |
| 660 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); | 588 | let val = (self.0 >> 7usize) & 0x01; |
| 589 | val != 0 | ||
| 661 | } | 590 | } |
| 662 | #[doc = "Secured area start address for bank 2"] | 591 | #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."] |
| 663 | pub const fn sa_beg_2(&self) -> u16 { | 592 | pub fn set_cmdstop(&mut self, val: bool) { |
| 664 | let val = (self.0 >> 16usize) & 0x0fff; | 593 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 665 | val as u16 | ||
| 666 | } | 594 | } |
| 667 | #[doc = "Secured area start address for bank 2"] | 595 | #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."] |
| 668 | pub fn set_sa_beg_2(&mut self, val: u16) { | 596 | pub const fn waitresp(&self) -> u8 { |
| 669 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | 597 | let val = (self.0 >> 8usize) & 0x03; |
| 598 | val as u8 | ||
| 670 | } | 599 | } |
| 671 | } | 600 | #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."] |
| 672 | impl Default for Ur10 { | 601 | pub fn set_waitresp(&mut self, val: u8) { |
| 673 | fn default() -> Ur10 { | 602 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); |
| 674 | Ur10(0) | ||
| 675 | } | 603 | } |
| 676 | } | 604 | #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."] |
| 677 | #[doc = "external interrupt configuration register 2"] | 605 | pub const fn waitint(&self) -> bool { |
| 678 | #[repr(transparent)] | 606 | let val = (self.0 >> 10usize) & 0x01; |
| 679 | #[derive(Copy, Clone, Eq, PartialEq)] | 607 | val != 0 |
| 680 | pub struct Exticr(pub u32); | ||
| 681 | impl Exticr { | ||
| 682 | #[doc = "EXTI x configuration (x = 4 to 7)"] | ||
| 683 | pub fn exti(&self, n: usize) -> u8 { | ||
| 684 | assert!(n < 4usize); | ||
| 685 | let offs = 0usize + n * 4usize; | ||
| 686 | let val = (self.0 >> offs) & 0x0f; | ||
| 687 | val as u8 | ||
| 688 | } | 608 | } |
| 689 | #[doc = "EXTI x configuration (x = 4 to 7)"] | 609 | #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."] |
| 690 | pub fn set_exti(&mut self, n: usize, val: u8) { | 610 | pub fn set_waitint(&mut self, val: bool) { |
| 691 | assert!(n < 4usize); | 611 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); |
| 692 | let offs = 0usize + n * 4usize; | ||
| 693 | self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); | ||
| 694 | } | 612 | } |
| 695 | } | 613 | #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."] |
| 696 | impl Default for Exticr { | 614 | pub const fn waitpend(&self) -> bool { |
| 697 | fn default() -> Exticr { | 615 | let val = (self.0 >> 11usize) & 0x01; |
| 698 | Exticr(0) | 616 | val != 0 |
| 699 | } | 617 | } |
| 700 | } | 618 | #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."] |
| 701 | #[doc = "SYSCFG user register 15"] | 619 | pub fn set_waitpend(&mut self, val: bool) { |
| 702 | #[repr(transparent)] | 620 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); |
| 703 | #[derive(Copy, Clone, Eq, PartialEq)] | 621 | } |
| 704 | pub struct Ur15(pub u32); | 622 | #[doc = "Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0."] |
| 705 | impl Ur15 { | 623 | pub const fn cpsmen(&self) -> bool { |
| 706 | #[doc = "Freeze independent watchdog in Standby mode"] | 624 | let val = (self.0 >> 12usize) & 0x01; |
| 707 | pub const fn fziwdgstb(&self) -> bool { | ||
| 708 | let val = (self.0 >> 16usize) & 0x01; | ||
| 709 | val != 0 | 625 | val != 0 |
| 710 | } | 626 | } |
| 711 | #[doc = "Freeze independent watchdog in Standby mode"] | 627 | #[doc = "Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0."] |
| 712 | pub fn set_fziwdgstb(&mut self, val: bool) { | 628 | pub fn set_cpsmen(&mut self, val: bool) { |
| 713 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 629 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); |
| 714 | } | 630 | } |
| 715 | } | 631 | #[doc = "Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state."] |
| 716 | impl Default for Ur15 { | 632 | pub const fn dthold(&self) -> bool { |
| 717 | fn default() -> Ur15 { | 633 | let val = (self.0 >> 13usize) & 0x01; |
| 718 | Ur15(0) | 634 | val != 0 |
| 719 | } | 635 | } |
| 720 | } | 636 | #[doc = "Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state."] |
| 721 | #[doc = "SYSCFG user register 3"] | 637 | pub fn set_dthold(&mut self, val: bool) { |
| 722 | #[repr(transparent)] | 638 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); |
| 723 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 724 | pub struct Ur3(pub u32); | ||
| 725 | impl Ur3 { | ||
| 726 | #[doc = "Boot Address 1"] | ||
| 727 | pub const fn boot_add1(&self) -> u16 { | ||
| 728 | let val = (self.0 >> 16usize) & 0xffff; | ||
| 729 | val as u16 | ||
| 730 | } | 639 | } |
| 731 | #[doc = "Boot Address 1"] | 640 | #[doc = "Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)"] |
| 732 | pub fn set_boot_add1(&mut self, val: u16) { | 641 | pub const fn bootmode(&self) -> bool { |
| 733 | self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); | 642 | let val = (self.0 >> 14usize) & 0x01; |
| 643 | val != 0 | ||
| 734 | } | 644 | } |
| 735 | } | 645 | #[doc = "Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)"] |
| 736 | impl Default for Ur3 { | 646 | pub fn set_bootmode(&mut self, val: bool) { |
| 737 | fn default() -> Ur3 { | 647 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); |
| 738 | Ur3(0) | ||
| 739 | } | 648 | } |
| 740 | } | 649 | #[doc = "Enable boot mode procedure."] |
| 741 | #[doc = "SYSCFG user register 2"] | 650 | pub const fn booten(&self) -> bool { |
| 742 | #[repr(transparent)] | 651 | let val = (self.0 >> 15usize) & 0x01; |
| 743 | #[derive(Copy, Clone, Eq, PartialEq)] | 652 | val != 0 |
| 744 | pub struct Ur2(pub u32); | ||
| 745 | impl Ur2 { | ||
| 746 | #[doc = "BOR_LVL Brownout Reset Threshold Level"] | ||
| 747 | pub const fn borh(&self) -> u8 { | ||
| 748 | let val = (self.0 >> 0usize) & 0x03; | ||
| 749 | val as u8 | ||
| 750 | } | 653 | } |
| 751 | #[doc = "BOR_LVL Brownout Reset Threshold Level"] | 654 | #[doc = "Enable boot mode procedure."] |
| 752 | pub fn set_borh(&mut self, val: u8) { | 655 | pub fn set_booten(&mut self, val: bool) { |
| 753 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); | 656 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); |
| 754 | } | 657 | } |
| 755 | #[doc = "Boot Address 0"] | 658 | #[doc = "The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1."] |
| 756 | pub const fn boot_add0(&self) -> u16 { | 659 | pub const fn cmdsuspend(&self) -> bool { |
| 757 | let val = (self.0 >> 16usize) & 0xffff; | 660 | let val = (self.0 >> 16usize) & 0x01; |
| 758 | val as u16 | 661 | val != 0 |
| 759 | } | 662 | } |
| 760 | #[doc = "Boot Address 0"] | 663 | #[doc = "The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1."] |
| 761 | pub fn set_boot_add0(&mut self, val: u16) { | 664 | pub fn set_cmdsuspend(&mut self, val: bool) { |
| 762 | self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); | 665 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 763 | } | 666 | } |
| 764 | } | 667 | } |
| 765 | impl Default for Ur2 { | 668 | impl Default for Cmdr { |
| 766 | fn default() -> Ur2 { | 669 | fn default() -> Cmdr { |
| 767 | Ur2(0) | 670 | Cmdr(0) |
| 768 | } | 671 | } |
| 769 | } | 672 | } |
| 770 | #[doc = "SYSCFG user register 17"] | 673 | #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."] |
| 771 | #[repr(transparent)] | 674 | #[repr(transparent)] |
| 772 | #[derive(Copy, Clone, Eq, PartialEq)] | 675 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 773 | pub struct Ur17(pub u32); | 676 | pub struct Maskr(pub u32); |
| 774 | impl Ur17 { | 677 | impl Maskr { |
| 775 | #[doc = "I/O high speed / low voltage"] | 678 | #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."] |
| 776 | pub const fn io_hslv(&self) -> bool { | 679 | pub const fn ccrcfailie(&self) -> bool { |
| 777 | let val = (self.0 >> 0usize) & 0x01; | 680 | let val = (self.0 >> 0usize) & 0x01; |
| 778 | val != 0 | 681 | val != 0 |
| 779 | } | 682 | } |
| 780 | #[doc = "I/O high speed / low voltage"] | 683 | #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."] |
| 781 | pub fn set_io_hslv(&mut self, val: bool) { | 684 | pub fn set_ccrcfailie(&mut self, val: bool) { |
| 782 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 685 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 783 | } | 686 | } |
| 784 | } | 687 | #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."] |
| 785 | impl Default for Ur17 { | 688 | pub const fn dcrcfailie(&self) -> bool { |
| 786 | fn default() -> Ur17 { | 689 | let val = (self.0 >> 1usize) & 0x01; |
| 787 | Ur17(0) | 690 | val != 0 |
| 788 | } | ||
| 789 | } | ||
| 790 | #[doc = "SYSCFG user register 9"] | ||
| 791 | #[repr(transparent)] | ||
| 792 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 793 | pub struct Ur9(pub u32); | ||
| 794 | impl Ur9 { | ||
| 795 | #[doc = "Write protection for flash bank 2"] | ||
| 796 | pub const fn wrpn_2(&self) -> u8 { | ||
| 797 | let val = (self.0 >> 0usize) & 0xff; | ||
| 798 | val as u8 | ||
| 799 | } | 691 | } |
| 800 | #[doc = "Write protection for flash bank 2"] | 692 | #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."] |
| 801 | pub fn set_wrpn_2(&mut self, val: u8) { | 693 | pub fn set_dcrcfailie(&mut self, val: bool) { |
| 802 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | 694 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 803 | } | 695 | } |
| 804 | #[doc = "Protected area start address for bank 2"] | 696 | #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."] |
| 805 | pub const fn pa_beg_2(&self) -> u16 { | 697 | pub const fn ctimeoutie(&self) -> bool { |
| 806 | let val = (self.0 >> 16usize) & 0x0fff; | 698 | let val = (self.0 >> 2usize) & 0x01; |
| 807 | val as u16 | 699 | val != 0 |
| 808 | } | 700 | } |
| 809 | #[doc = "Protected area start address for bank 2"] | 701 | #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."] |
| 810 | pub fn set_pa_beg_2(&mut self, val: u16) { | 702 | pub fn set_ctimeoutie(&mut self, val: bool) { |
| 811 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | 703 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 812 | } | 704 | } |
| 813 | } | 705 | #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."] |
| 814 | impl Default for Ur9 { | 706 | pub const fn dtimeoutie(&self) -> bool { |
| 815 | fn default() -> Ur9 { | 707 | let val = (self.0 >> 3usize) & 0x01; |
| 816 | Ur9(0) | 708 | val != 0 |
| 817 | } | 709 | } |
| 818 | } | 710 | #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."] |
| 819 | #[doc = "SYSCFG compensation cell code register"] | 711 | pub fn set_dtimeoutie(&mut self, val: bool) { |
| 820 | #[repr(transparent)] | 712 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 821 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 822 | pub struct Cccr(pub u32); | ||
| 823 | impl Cccr { | ||
| 824 | #[doc = "NMOS compensation code"] | ||
| 825 | pub const fn ncc(&self) -> u8 { | ||
| 826 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 827 | val as u8 | ||
| 828 | } | 713 | } |
| 829 | #[doc = "NMOS compensation code"] | 714 | #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."] |
| 830 | pub fn set_ncc(&mut self, val: u8) { | 715 | pub const fn txunderrie(&self) -> bool { |
| 831 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | 716 | let val = (self.0 >> 4usize) & 0x01; |
| 717 | val != 0 | ||
| 832 | } | 718 | } |
| 833 | #[doc = "PMOS compensation code"] | 719 | #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."] |
| 834 | pub const fn pcc(&self) -> u8 { | 720 | pub fn set_txunderrie(&mut self, val: bool) { |
| 835 | let val = (self.0 >> 4usize) & 0x0f; | 721 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); |
| 836 | val as u8 | ||
| 837 | } | 722 | } |
| 838 | #[doc = "PMOS compensation code"] | 723 | #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."] |
| 839 | pub fn set_pcc(&mut self, val: u8) { | 724 | pub const fn rxoverrie(&self) -> bool { |
| 840 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); | 725 | let val = (self.0 >> 5usize) & 0x01; |
| 726 | val != 0 | ||
| 841 | } | 727 | } |
| 842 | } | 728 | #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."] |
| 843 | impl Default for Cccr { | 729 | pub fn set_rxoverrie(&mut self, val: bool) { |
| 844 | fn default() -> Cccr { | 730 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 845 | Cccr(0) | ||
| 846 | } | 731 | } |
| 847 | } | 732 | #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."] |
| 848 | #[doc = "SYSCFG user register 11"] | 733 | pub const fn cmdrendie(&self) -> bool { |
| 849 | #[repr(transparent)] | 734 | let val = (self.0 >> 6usize) & 0x01; |
| 850 | #[derive(Copy, Clone, Eq, PartialEq)] | 735 | val != 0 |
| 851 | pub struct Ur11(pub u32); | ||
| 852 | impl Ur11 { | ||
| 853 | #[doc = "Secured area end address for bank 2"] | ||
| 854 | pub const fn sa_end_2(&self) -> u16 { | ||
| 855 | let val = (self.0 >> 0usize) & 0x0fff; | ||
| 856 | val as u16 | ||
| 857 | } | 736 | } |
| 858 | #[doc = "Secured area end address for bank 2"] | 737 | #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."] |
| 859 | pub fn set_sa_end_2(&mut self, val: u16) { | 738 | pub fn set_cmdrendie(&mut self, val: bool) { |
| 860 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); | 739 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 861 | } | 740 | } |
| 862 | #[doc = "Independent Watchdog 1 mode"] | 741 | #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."] |
| 863 | pub const fn iwdg1m(&self) -> bool { | 742 | pub const fn cmdsentie(&self) -> bool { |
| 864 | let val = (self.0 >> 16usize) & 0x01; | 743 | let val = (self.0 >> 7usize) & 0x01; |
| 865 | val != 0 | 744 | val != 0 |
| 866 | } | 745 | } |
| 867 | #[doc = "Independent Watchdog 1 mode"] | 746 | #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."] |
| 868 | pub fn set_iwdg1m(&mut self, val: bool) { | 747 | pub fn set_cmdsentie(&mut self, val: bool) { |
| 869 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 748 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 870 | } | 749 | } |
| 871 | } | 750 | #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."] |
| 872 | impl Default for Ur11 { | 751 | pub const fn dataendie(&self) -> bool { |
| 873 | fn default() -> Ur11 { | 752 | let val = (self.0 >> 8usize) & 0x01; |
| 874 | Ur11(0) | 753 | val != 0 |
| 875 | } | 754 | } |
| 876 | } | 755 | #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."] |
| 877 | #[doc = "SYSCFG user register 16"] | 756 | pub fn set_dataendie(&mut self, val: bool) { |
| 878 | #[repr(transparent)] | 757 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 879 | #[derive(Copy, Clone, Eq, PartialEq)] | 758 | } |
| 880 | pub struct Ur16(pub u32); | 759 | #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."] |
| 881 | impl Ur16 { | 760 | pub const fn dholdie(&self) -> bool { |
| 882 | #[doc = "Freeze independent watchdog in Stop mode"] | 761 | let val = (self.0 >> 9usize) & 0x01; |
| 883 | pub const fn fziwdgstp(&self) -> bool { | ||
| 884 | let val = (self.0 >> 0usize) & 0x01; | ||
| 885 | val != 0 | 762 | val != 0 |
| 886 | } | 763 | } |
| 887 | #[doc = "Freeze independent watchdog in Stop mode"] | 764 | #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."] |
| 888 | pub fn set_fziwdgstp(&mut self, val: bool) { | 765 | pub fn set_dholdie(&mut self, val: bool) { |
| 889 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 766 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); |
| 890 | } | 767 | } |
| 891 | #[doc = "Private key programmed"] | 768 | #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."] |
| 892 | pub const fn pkp(&self) -> bool { | 769 | pub const fn dbckendie(&self) -> bool { |
| 893 | let val = (self.0 >> 16usize) & 0x01; | 770 | let val = (self.0 >> 10usize) & 0x01; |
| 894 | val != 0 | 771 | val != 0 |
| 895 | } | 772 | } |
| 896 | #[doc = "Private key programmed"] | 773 | #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."] |
| 897 | pub fn set_pkp(&mut self, val: bool) { | 774 | pub fn set_dbckendie(&mut self, val: bool) { |
| 898 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 775 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); |
| 899 | } | 776 | } |
| 900 | } | 777 | #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."] |
| 901 | impl Default for Ur16 { | 778 | pub const fn dabortie(&self) -> bool { |
| 902 | fn default() -> Ur16 { | 779 | let val = (self.0 >> 11usize) & 0x01; |
| 903 | Ur16(0) | 780 | val != 0 |
| 904 | } | 781 | } |
| 905 | } | 782 | #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."] |
| 906 | #[doc = "SYSCFG user register 7"] | 783 | pub fn set_dabortie(&mut self, val: bool) { |
| 907 | #[repr(transparent)] | 784 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); |
| 908 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 909 | pub struct Ur7(pub u32); | ||
| 910 | impl Ur7 { | ||
| 911 | #[doc = "Secured area start address for bank 1"] | ||
| 912 | pub const fn sa_beg_1(&self) -> u16 { | ||
| 913 | let val = (self.0 >> 0usize) & 0x0fff; | ||
| 914 | val as u16 | ||
| 915 | } | 785 | } |
| 916 | #[doc = "Secured area start address for bank 1"] | 786 | #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."] |
| 917 | pub fn set_sa_beg_1(&mut self, val: u16) { | 787 | pub const fn txfifoheie(&self) -> bool { |
| 918 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); | 788 | let val = (self.0 >> 14usize) & 0x01; |
| 789 | val != 0 | ||
| 919 | } | 790 | } |
| 920 | #[doc = "Secured area end address for bank 1"] | 791 | #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."] |
| 921 | pub const fn sa_end_1(&self) -> u16 { | 792 | pub fn set_txfifoheie(&mut self, val: bool) { |
| 922 | let val = (self.0 >> 16usize) & 0x0fff; | 793 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); |
| 923 | val as u16 | ||
| 924 | } | 794 | } |
| 925 | #[doc = "Secured area end address for bank 1"] | 795 | #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."] |
| 926 | pub fn set_sa_end_1(&mut self, val: u16) { | 796 | pub const fn rxfifohfie(&self) -> bool { |
| 927 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | 797 | let val = (self.0 >> 15usize) & 0x01; |
| 798 | val != 0 | ||
| 928 | } | 799 | } |
| 929 | } | 800 | #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."] |
| 930 | impl Default for Ur7 { | 801 | pub fn set_rxfifohfie(&mut self, val: bool) { |
| 931 | fn default() -> Ur7 { | 802 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); |
| 932 | Ur7(0) | ||
| 933 | } | 803 | } |
| 934 | } | 804 | #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."] |
| 935 | } | 805 | pub const fn rxfifofie(&self) -> bool { |
| 936 | } | 806 | let val = (self.0 >> 17usize) & 0x01; |
| 937 | pub mod exti_v1 { | 807 | val != 0 |
| 938 | use crate::generic::*; | ||
| 939 | #[doc = "External interrupt/event controller"] | ||
| 940 | #[derive(Copy, Clone)] | ||
| 941 | pub struct Exti(pub *mut u8); | ||
| 942 | unsafe impl Send for Exti {} | ||
| 943 | unsafe impl Sync for Exti {} | ||
| 944 | impl Exti { | ||
| 945 | #[doc = "Interrupt mask register (EXTI_IMR)"] | ||
| 946 | pub fn imr(self) -> Reg<regs::Imr, RW> { | ||
| 947 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 948 | } | ||
| 949 | #[doc = "Event mask register (EXTI_EMR)"] | ||
| 950 | pub fn emr(self) -> Reg<regs::Emr, RW> { | ||
| 951 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 952 | } | ||
| 953 | #[doc = "Rising Trigger selection register (EXTI_RTSR)"] | ||
| 954 | pub fn rtsr(self) -> Reg<regs::Rtsr, RW> { | ||
| 955 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 956 | } | ||
| 957 | #[doc = "Falling Trigger selection register (EXTI_FTSR)"] | ||
| 958 | pub fn ftsr(self) -> Reg<regs::Ftsr, RW> { | ||
| 959 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 960 | } | ||
| 961 | #[doc = "Software interrupt event register (EXTI_SWIER)"] | ||
| 962 | pub fn swier(self) -> Reg<regs::Swier, RW> { | ||
| 963 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 964 | } | ||
| 965 | #[doc = "Pending register (EXTI_PR)"] | ||
| 966 | pub fn pr(self) -> Reg<regs::Pr, RW> { | ||
| 967 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 968 | } | ||
| 969 | } | ||
| 970 | pub mod regs { | ||
| 971 | use crate::generic::*; | ||
| 972 | #[doc = "Falling Trigger selection register (EXTI_FTSR)"] | ||
| 973 | #[repr(transparent)] | ||
| 974 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 975 | pub struct Ftsr(pub u32); | ||
| 976 | impl Ftsr { | ||
| 977 | #[doc = "Falling trigger event configuration of line 0"] | ||
| 978 | pub fn tr(&self, n: usize) -> super::vals::Tr { | ||
| 979 | assert!(n < 23usize); | ||
| 980 | let offs = 0usize + n * 1usize; | ||
| 981 | let val = (self.0 >> offs) & 0x01; | ||
| 982 | super::vals::Tr(val as u8) | ||
| 983 | } | 808 | } |
| 984 | #[doc = "Falling trigger event configuration of line 0"] | 809 | #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."] |
| 985 | pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) { | 810 | pub fn set_rxfifofie(&mut self, val: bool) { |
| 986 | assert!(n < 23usize); | 811 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); |
| 987 | let offs = 0usize + n * 1usize; | ||
| 988 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 989 | } | 812 | } |
| 990 | } | 813 | #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."] |
| 991 | impl Default for Ftsr { | 814 | pub const fn txfifoeie(&self) -> bool { |
| 992 | fn default() -> Ftsr { | 815 | let val = (self.0 >> 18usize) & 0x01; |
| 993 | Ftsr(0) | 816 | val != 0 |
| 994 | } | 817 | } |
| 995 | } | 818 | #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."] |
| 996 | #[doc = "Event mask register (EXTI_EMR)"] | 819 | pub fn set_txfifoeie(&mut self, val: bool) { |
| 997 | #[repr(transparent)] | 820 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); |
| 998 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 999 | pub struct Emr(pub u32); | ||
| 1000 | impl Emr { | ||
| 1001 | #[doc = "Event Mask on line 0"] | ||
| 1002 | pub fn mr(&self, n: usize) -> super::vals::Mr { | ||
| 1003 | assert!(n < 23usize); | ||
| 1004 | let offs = 0usize + n * 1usize; | ||
| 1005 | let val = (self.0 >> offs) & 0x01; | ||
| 1006 | super::vals::Mr(val as u8) | ||
| 1007 | } | 821 | } |
| 1008 | #[doc = "Event Mask on line 0"] | 822 | #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."] |
| 1009 | pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) { | 823 | pub const fn busyd0endie(&self) -> bool { |
| 1010 | assert!(n < 23usize); | 824 | let val = (self.0 >> 21usize) & 0x01; |
| 1011 | let offs = 0usize + n * 1usize; | 825 | val != 0 |
| 1012 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 1013 | } | 826 | } |
| 1014 | } | 827 | #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."] |
| 1015 | impl Default for Emr { | 828 | pub fn set_busyd0endie(&mut self, val: bool) { |
| 1016 | fn default() -> Emr { | 829 | self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); |
| 1017 | Emr(0) | ||
| 1018 | } | 830 | } |
| 1019 | } | 831 | #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."] |
| 1020 | #[doc = "Pending register (EXTI_PR)"] | 832 | pub const fn sdioitie(&self) -> bool { |
| 1021 | #[repr(transparent)] | 833 | let val = (self.0 >> 22usize) & 0x01; |
| 1022 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1023 | pub struct Pr(pub u32); | ||
| 1024 | impl Pr { | ||
| 1025 | #[doc = "Pending bit 0"] | ||
| 1026 | pub fn pr(&self, n: usize) -> bool { | ||
| 1027 | assert!(n < 23usize); | ||
| 1028 | let offs = 0usize + n * 1usize; | ||
| 1029 | let val = (self.0 >> offs) & 0x01; | ||
| 1030 | val != 0 | 834 | val != 0 |
| 1031 | } | 835 | } |
| 1032 | #[doc = "Pending bit 0"] | 836 | #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."] |
| 1033 | pub fn set_pr(&mut self, n: usize, val: bool) { | 837 | pub fn set_sdioitie(&mut self, val: bool) { |
| 1034 | assert!(n < 23usize); | 838 | self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); |
| 1035 | let offs = 0usize + n * 1usize; | ||
| 1036 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1037 | } | 839 | } |
| 1038 | } | 840 | #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."] |
| 1039 | impl Default for Pr { | 841 | pub const fn ackfailie(&self) -> bool { |
| 1040 | fn default() -> Pr { | 842 | let val = (self.0 >> 23usize) & 0x01; |
| 1041 | Pr(0) | 843 | val != 0 |
| 1042 | } | 844 | } |
| 1043 | } | 845 | #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."] |
| 1044 | #[doc = "Software interrupt event register (EXTI_SWIER)"] | 846 | pub fn set_ackfailie(&mut self, val: bool) { |
| 1045 | #[repr(transparent)] | 847 | self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); |
| 1046 | #[derive(Copy, Clone, Eq, PartialEq)] | 848 | } |
| 1047 | pub struct Swier(pub u32); | 849 | #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."] |
| 1048 | impl Swier { | 850 | pub const fn acktimeoutie(&self) -> bool { |
| 1049 | #[doc = "Software Interrupt on line 0"] | 851 | let val = (self.0 >> 24usize) & 0x01; |
| 1050 | pub fn swier(&self, n: usize) -> bool { | ||
| 1051 | assert!(n < 23usize); | ||
| 1052 | let offs = 0usize + n * 1usize; | ||
| 1053 | let val = (self.0 >> offs) & 0x01; | ||
| 1054 | val != 0 | 852 | val != 0 |
| 1055 | } | 853 | } |
| 1056 | #[doc = "Software Interrupt on line 0"] | 854 | #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."] |
| 1057 | pub fn set_swier(&mut self, n: usize, val: bool) { | 855 | pub fn set_acktimeoutie(&mut self, val: bool) { |
| 1058 | assert!(n < 23usize); | 856 | self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); |
| 1059 | let offs = 0usize + n * 1usize; | ||
| 1060 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1061 | } | 857 | } |
| 1062 | } | 858 | #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."] |
| 1063 | impl Default for Swier { | 859 | pub const fn vswendie(&self) -> bool { |
| 1064 | fn default() -> Swier { | 860 | let val = (self.0 >> 25usize) & 0x01; |
| 1065 | Swier(0) | 861 | val != 0 |
| 1066 | } | 862 | } |
| 1067 | } | 863 | #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."] |
| 1068 | #[doc = "Interrupt mask register (EXTI_IMR)"] | 864 | pub fn set_vswendie(&mut self, val: bool) { |
| 1069 | #[repr(transparent)] | 865 | self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); |
| 1070 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1071 | pub struct Imr(pub u32); | ||
| 1072 | impl Imr { | ||
| 1073 | #[doc = "Interrupt Mask on line 0"] | ||
| 1074 | pub fn mr(&self, n: usize) -> super::vals::Mr { | ||
| 1075 | assert!(n < 23usize); | ||
| 1076 | let offs = 0usize + n * 1usize; | ||
| 1077 | let val = (self.0 >> offs) & 0x01; | ||
| 1078 | super::vals::Mr(val as u8) | ||
| 1079 | } | 866 | } |
| 1080 | #[doc = "Interrupt Mask on line 0"] | 867 | #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."] |
| 1081 | pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) { | 868 | pub const fn ckstopie(&self) -> bool { |
| 1082 | assert!(n < 23usize); | 869 | let val = (self.0 >> 26usize) & 0x01; |
| 1083 | let offs = 0usize + n * 1usize; | 870 | val != 0 |
| 1084 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 1085 | } | 871 | } |
| 1086 | } | 872 | #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."] |
| 1087 | impl Default for Imr { | 873 | pub fn set_ckstopie(&mut self, val: bool) { |
| 1088 | fn default() -> Imr { | 874 | self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); |
| 1089 | Imr(0) | ||
| 1090 | } | 875 | } |
| 1091 | } | 876 | #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."] |
| 1092 | #[doc = "Rising Trigger selection register (EXTI_RTSR)"] | 877 | pub const fn idmabtcie(&self) -> bool { |
| 1093 | #[repr(transparent)] | 878 | let val = (self.0 >> 28usize) & 0x01; |
| 1094 | #[derive(Copy, Clone, Eq, PartialEq)] | 879 | val != 0 |
| 1095 | pub struct Rtsr(pub u32); | ||
| 1096 | impl Rtsr { | ||
| 1097 | #[doc = "Rising trigger event configuration of line 0"] | ||
| 1098 | pub fn tr(&self, n: usize) -> super::vals::Tr { | ||
| 1099 | assert!(n < 23usize); | ||
| 1100 | let offs = 0usize + n * 1usize; | ||
| 1101 | let val = (self.0 >> offs) & 0x01; | ||
| 1102 | super::vals::Tr(val as u8) | ||
| 1103 | } | 880 | } |
| 1104 | #[doc = "Rising trigger event configuration of line 0"] | 881 | #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."] |
| 1105 | pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) { | 882 | pub fn set_idmabtcie(&mut self, val: bool) { |
| 1106 | assert!(n < 23usize); | 883 | self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); |
| 1107 | let offs = 0usize + n * 1usize; | ||
| 1108 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 1109 | } | 884 | } |
| 1110 | } | 885 | } |
| 1111 | impl Default for Rtsr { | 886 | impl Default for Maskr { |
| 1112 | fn default() -> Rtsr { | 887 | fn default() -> Maskr { |
| 1113 | Rtsr(0) | 888 | Maskr(0) |
| 1114 | } | 889 | } |
| 1115 | } | 890 | } |
| 1116 | } | 891 | #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."] |
| 1117 | pub mod vals { | ||
| 1118 | use crate::generic::*; | ||
| 1119 | #[repr(transparent)] | ||
| 1120 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1121 | pub struct Prr(pub u8); | ||
| 1122 | impl Prr { | ||
| 1123 | #[doc = "No trigger request occurred"] | ||
| 1124 | pub const NOTPENDING: Self = Self(0); | ||
| 1125 | #[doc = "Selected trigger request occurred"] | ||
| 1126 | pub const PENDING: Self = Self(0x01); | ||
| 1127 | } | ||
| 1128 | #[repr(transparent)] | ||
| 1129 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1130 | pub struct Swierw(pub u8); | ||
| 1131 | impl Swierw { | ||
| 1132 | #[doc = "Generates an interrupt request"] | ||
| 1133 | pub const PEND: Self = Self(0x01); | ||
| 1134 | } | ||
| 1135 | #[repr(transparent)] | ||
| 1136 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1137 | pub struct Tr(pub u8); | ||
| 1138 | impl Tr { | ||
| 1139 | #[doc = "Falling edge trigger is disabled"] | ||
| 1140 | pub const DISABLED: Self = Self(0); | ||
| 1141 | #[doc = "Falling edge trigger is enabled"] | ||
| 1142 | pub const ENABLED: Self = Self(0x01); | ||
| 1143 | } | ||
| 1144 | #[repr(transparent)] | ||
| 1145 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1146 | pub struct Mr(pub u8); | ||
| 1147 | impl Mr { | ||
| 1148 | #[doc = "Interrupt request line is masked"] | ||
| 1149 | pub const MASKED: Self = Self(0); | ||
| 1150 | #[doc = "Interrupt request line is unmasked"] | ||
| 1151 | pub const UNMASKED: Self = Self(0x01); | ||
| 1152 | } | ||
| 1153 | #[repr(transparent)] | ||
| 1154 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1155 | pub struct Prw(pub u8); | ||
| 1156 | impl Prw { | ||
| 1157 | #[doc = "Clears pending bit"] | ||
| 1158 | pub const CLEAR: Self = Self(0x01); | ||
| 1159 | } | ||
| 1160 | } | ||
| 1161 | } | ||
| 1162 | pub mod dma_v2 { | ||
| 1163 | use crate::generic::*; | ||
| 1164 | #[doc = "DMA controller"] | ||
| 1165 | #[derive(Copy, Clone)] | ||
| 1166 | pub struct Dma(pub *mut u8); | ||
| 1167 | unsafe impl Send for Dma {} | ||
| 1168 | unsafe impl Sync for Dma {} | ||
| 1169 | impl Dma { | ||
| 1170 | #[doc = "low interrupt status register"] | ||
| 1171 | pub fn isr(self, n: usize) -> Reg<regs::Isr, R> { | ||
| 1172 | assert!(n < 2usize); | ||
| 1173 | unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) } | ||
| 1174 | } | ||
| 1175 | #[doc = "low interrupt flag clear register"] | ||
| 1176 | pub fn ifcr(self, n: usize) -> Reg<regs::Ifcr, W> { | ||
| 1177 | assert!(n < 2usize); | ||
| 1178 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 1179 | } | ||
| 1180 | #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] | ||
| 1181 | pub fn st(self, n: usize) -> St { | ||
| 1182 | assert!(n < 8usize); | ||
| 1183 | unsafe { St(self.0.add(16usize + n * 24usize)) } | ||
| 1184 | } | ||
| 1185 | } | ||
| 1186 | #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] | ||
| 1187 | #[derive(Copy, Clone)] | ||
| 1188 | pub struct St(pub *mut u8); | ||
| 1189 | unsafe impl Send for St {} | ||
| 1190 | unsafe impl Sync for St {} | ||
| 1191 | impl St { | ||
| 1192 | #[doc = "stream x configuration register"] | ||
| 1193 | pub fn cr(self) -> Reg<regs::Cr, RW> { | ||
| 1194 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 1195 | } | ||
| 1196 | #[doc = "stream x number of data register"] | ||
| 1197 | pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { | ||
| 1198 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 1199 | } | ||
| 1200 | #[doc = "stream x peripheral address register"] | ||
| 1201 | pub fn par(self) -> Reg<u32, RW> { | ||
| 1202 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 1203 | } | ||
| 1204 | #[doc = "stream x memory 0 address register"] | ||
| 1205 | pub fn m0ar(self) -> Reg<u32, RW> { | ||
| 1206 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 1207 | } | ||
| 1208 | #[doc = "stream x memory 1 address register"] | ||
| 1209 | pub fn m1ar(self) -> Reg<u32, RW> { | ||
| 1210 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 1211 | } | ||
| 1212 | #[doc = "stream x FIFO control register"] | ||
| 1213 | pub fn fcr(self) -> Reg<regs::Fcr, RW> { | ||
| 1214 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 1215 | } | ||
| 1216 | } | ||
| 1217 | pub mod regs { | ||
| 1218 | use crate::generic::*; | ||
| 1219 | #[doc = "stream x number of data register"] | ||
| 1220 | #[repr(transparent)] | 892 | #[repr(transparent)] |
| 1221 | #[derive(Copy, Clone, Eq, PartialEq)] | 893 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1222 | pub struct Ndtr(pub u32); | 894 | pub struct Idmabase1r(pub u32); |
| 1223 | impl Ndtr { | 895 | impl Idmabase1r { |
| 1224 | #[doc = "Number of data items to transfer"] | 896 | #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0] |
| 1225 | pub const fn ndt(&self) -> u16 { | 897 | are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 1 is inactive (IDMABACT = 0)."] |
| 1226 | let val = (self.0 >> 0usize) & 0xffff; | 898 | pub const fn idmabase1(&self) -> u32 { |
| 1227 | val as u16 | 899 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 900 | val as u32 | ||
| 1228 | } | 901 | } |
| 1229 | #[doc = "Number of data items to transfer"] | 902 | #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0] |
| 1230 | pub fn set_ndt(&mut self, val: u16) { | 903 | are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 1 is inactive (IDMABACT = 0)."] |
| 1231 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 904 | pub fn set_idmabase1(&mut self, val: u32) { |
| 905 | self.0 = | ||
| 906 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 1232 | } | 907 | } |
| 1233 | } | 908 | } |
| 1234 | impl Default for Ndtr { | 909 | impl Default for Idmabase1r { |
| 1235 | fn default() -> Ndtr { | 910 | fn default() -> Idmabase1r { |
| 1236 | Ndtr(0) | 911 | Idmabase1r(0) |
| 1237 | } | 912 | } |
| 1238 | } | 913 | } |
| 1239 | #[doc = "stream x FIFO control register"] | 914 | #[doc = "SDMMC power control register"] |
| 1240 | #[repr(transparent)] | 915 | #[repr(transparent)] |
| 1241 | #[derive(Copy, Clone, Eq, PartialEq)] | 916 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1242 | pub struct Fcr(pub u32); | 917 | pub struct Power(pub u32); |
| 1243 | impl Fcr { | 918 | impl Power { |
| 1244 | #[doc = "FIFO threshold selection"] | 919 | #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."] |
| 1245 | pub const fn fth(&self) -> super::vals::Fth { | 920 | pub const fn pwrctrl(&self) -> u8 { |
| 1246 | let val = (self.0 >> 0usize) & 0x03; | 921 | let val = (self.0 >> 0usize) & 0x03; |
| 1247 | super::vals::Fth(val as u8) | 922 | val as u8 |
| 1248 | } | 923 | } |
| 1249 | #[doc = "FIFO threshold selection"] | 924 | #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."] |
| 1250 | pub fn set_fth(&mut self, val: super::vals::Fth) { | 925 | pub fn set_pwrctrl(&mut self, val: u8) { |
| 1251 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val.0 as u32) & 0x03) << 0usize); | 926 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); |
| 1252 | } | 927 | } |
| 1253 | #[doc = "Direct mode disable"] | 928 | #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"] |
| 1254 | pub const fn dmdis(&self) -> super::vals::Dmdis { | 929 | pub const fn vswitch(&self) -> bool { |
| 1255 | let val = (self.0 >> 2usize) & 0x01; | 930 | let val = (self.0 >> 2usize) & 0x01; |
| 1256 | super::vals::Dmdis(val as u8) | 931 | val != 0 |
| 1257 | } | 932 | } |
| 1258 | #[doc = "Direct mode disable"] | 933 | #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"] |
| 1259 | pub fn set_dmdis(&mut self, val: super::vals::Dmdis) { | 934 | pub fn set_vswitch(&mut self, val: bool) { |
| 1260 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | 935 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 1261 | } | 936 | } |
| 1262 | #[doc = "FIFO status"] | 937 | #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"] |
| 1263 | pub const fn fs(&self) -> super::vals::Fs { | 938 | pub const fn vswitchen(&self) -> bool { |
| 1264 | let val = (self.0 >> 3usize) & 0x07; | 939 | let val = (self.0 >> 3usize) & 0x01; |
| 1265 | super::vals::Fs(val as u8) | 940 | val != 0 |
| 1266 | } | 941 | } |
| 1267 | #[doc = "FIFO status"] | 942 | #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"] |
| 1268 | pub fn set_fs(&mut self, val: super::vals::Fs) { | 943 | pub fn set_vswitchen(&mut self, val: bool) { |
| 1269 | self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize); | 944 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 1270 | } | 945 | } |
| 1271 | #[doc = "FIFO error interrupt enable"] | 946 | #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."] |
| 1272 | pub const fn feie(&self) -> bool { | 947 | pub const fn dirpol(&self) -> bool { |
| 1273 | let val = (self.0 >> 7usize) & 0x01; | 948 | let val = (self.0 >> 4usize) & 0x01; |
| 1274 | val != 0 | 949 | val != 0 |
| 1275 | } | 950 | } |
| 1276 | #[doc = "FIFO error interrupt enable"] | 951 | #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."] |
| 1277 | pub fn set_feie(&mut self, val: bool) { | 952 | pub fn set_dirpol(&mut self, val: bool) { |
| 1278 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 953 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); |
| 1279 | } | 954 | } |
| 1280 | } | 955 | } |
| 1281 | impl Default for Fcr { | 956 | impl Default for Power { |
| 1282 | fn default() -> Fcr { | 957 | fn default() -> Power { |
| 1283 | Fcr(0) | 958 | Power(0) |
| 1284 | } | 959 | } |
| 1285 | } | 960 | } |
| 1286 | #[doc = "low interrupt flag clear register"] | 961 | #[doc = "The SDMMC_ACKTIMER register contains the acknowledgment timeout period, in SDMMC_CK bus clock periods. A counter loads the value from the SDMMC_ACKTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_Ack state. If the timer reaches 0 while the DPSM is in this states, the acknowledgment timeout status flag is set."] |
| 1287 | #[repr(transparent)] | 962 | #[repr(transparent)] |
| 1288 | #[derive(Copy, Clone, Eq, PartialEq)] | 963 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1289 | pub struct Ifcr(pub u32); | 964 | pub struct Acktimer(pub u32); |
| 1290 | impl Ifcr { | 965 | impl Acktimer { |
| 1291 | #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"] | 966 | #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."] |
| 1292 | pub fn cfeif(&self, n: usize) -> bool { | 967 | pub const fn acktime(&self) -> u32 { |
| 1293 | assert!(n < 4usize); | 968 | let val = (self.0 >> 0usize) & 0x01ff_ffff; |
| 1294 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 969 | val as u32 |
| 1295 | let val = (self.0 >> offs) & 0x01; | ||
| 1296 | val != 0 | ||
| 1297 | } | 970 | } |
| 1298 | #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"] | 971 | #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."] |
| 1299 | pub fn set_cfeif(&mut self, n: usize, val: bool) { | 972 | pub fn set_acktime(&mut self, val: u32) { |
| 1300 | assert!(n < 4usize); | 973 | self.0 = |
| 1301 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 974 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); |
| 1302 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1303 | } | 975 | } |
| 1304 | #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"] | 976 | } |
| 1305 | pub fn cdmeif(&self, n: usize) -> bool { | 977 | impl Default for Acktimer { |
| 1306 | assert!(n < 4usize); | 978 | fn default() -> Acktimer { |
| 1307 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 979 | Acktimer(0) |
| 1308 | let val = (self.0 >> offs) & 0x01; | ||
| 1309 | val != 0 | ||
| 1310 | } | 980 | } |
| 1311 | #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"] | 981 | } |
| 1312 | pub fn set_cdmeif(&mut self, n: usize, val: bool) { | 982 | #[doc = "SDMMC command response register"] |
| 1313 | assert!(n < 4usize); | 983 | #[repr(transparent)] |
| 1314 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 984 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1315 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 985 | pub struct Respcmdr(pub u32); |
| 986 | impl Respcmdr { | ||
| 987 | #[doc = "Response command index"] | ||
| 988 | pub const fn respcmd(&self) -> u8 { | ||
| 989 | let val = (self.0 >> 0usize) & 0x3f; | ||
| 990 | val as u8 | ||
| 1316 | } | 991 | } |
| 1317 | #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"] | 992 | #[doc = "Response command index"] |
| 1318 | pub fn cteif(&self, n: usize) -> bool { | 993 | pub fn set_respcmd(&mut self, val: u8) { |
| 1319 | assert!(n < 4usize); | 994 | self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); |
| 1320 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 1321 | let val = (self.0 >> offs) & 0x01; | ||
| 1322 | val != 0 | ||
| 1323 | } | 995 | } |
| 1324 | #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"] | 996 | } |
| 1325 | pub fn set_cteif(&mut self, n: usize, val: bool) { | 997 | impl Default for Respcmdr { |
| 1326 | assert!(n < 4usize); | 998 | fn default() -> Respcmdr { |
| 1327 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 999 | Respcmdr(0) |
| 1328 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1329 | } | 1000 | } |
| 1330 | #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"] | 1001 | } |
| 1331 | pub fn chtif(&self, n: usize) -> bool { | 1002 | #[doc = "The receive and transmit FIFOs can be only read or written as word (32-bit) wide registers. The FIFOs contain 16 entries on sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.When accessing SDMMC_FIFOR with half word or byte access an AHB bus fault is generated."] |
| 1332 | assert!(n < 4usize); | 1003 | #[repr(transparent)] |
| 1333 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 1004 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1334 | let val = (self.0 >> offs) & 0x01; | 1005 | pub struct Fifor(pub u32); |
| 1335 | val != 0 | 1006 | impl Fifor { |
| 1007 | #[doc = "Receive and transmit FIFO data This register can only be read or written by firmware when the DPSM is active (DPSMACT=1). The FIFO data occupies 16 entries of 32-bit words."] | ||
| 1008 | pub const fn fifodata(&self) -> u32 { | ||
| 1009 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 1010 | val as u32 | ||
| 1336 | } | 1011 | } |
| 1337 | #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"] | 1012 | #[doc = "Receive and transmit FIFO data This register can only be read or written by firmware when the DPSM is active (DPSMACT=1). The FIFO data occupies 16 entries of 32-bit words."] |
| 1338 | pub fn set_chtif(&mut self, n: usize, val: bool) { | 1013 | pub fn set_fifodata(&mut self, val: u32) { |
| 1339 | assert!(n < 4usize); | 1014 | self.0 = |
| 1340 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 1015 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); |
| 1341 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1342 | } | 1016 | } |
| 1343 | #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"] | 1017 | } |
| 1344 | pub fn ctcif(&self, n: usize) -> bool { | 1018 | impl Default for Fifor { |
| 1345 | assert!(n < 4usize); | 1019 | fn default() -> Fifor { |
| 1346 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 1020 | Fifor(0) |
| 1347 | let val = (self.0 >> offs) & 0x01; | ||
| 1348 | val != 0 | ||
| 1349 | } | 1021 | } |
| 1350 | #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"] | 1022 | } |
| 1351 | pub fn set_ctcif(&mut self, n: usize, val: bool) { | 1023 | #[doc = "The SDMMC_DLENR register contains the number of data bytes to be transferred. The value is loaded into the data counter when data transfer starts."] |
| 1352 | assert!(n < 4usize); | 1024 | #[repr(transparent)] |
| 1353 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 1025 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1354 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 1026 | pub struct Dlenr(pub u32); |
| 1027 | impl Dlenr { | ||
| 1028 | #[doc = "Data length value This register can only be written by firmware when DPSM is inactive (DPSMACT = 0). Number of data bytes to be transferred. When DDR = 1 DATALENGTH is truncated to a multiple of 2. (The last odd byte is not transfered) When DATALENGTH = 0 no data will be transfered, when requested by a CPSMEN and CMDTRANS = 1 also no command will be transfered. DTEN and CPSMEN are cleared to 0."] | ||
| 1029 | pub const fn datalength(&self) -> u32 { | ||
| 1030 | let val = (self.0 >> 0usize) & 0x01ff_ffff; | ||
| 1031 | val as u32 | ||
| 1032 | } | ||
| 1033 | #[doc = "Data length value This register can only be written by firmware when DPSM is inactive (DPSMACT = 0). Number of data bytes to be transferred. When DDR = 1 DATALENGTH is truncated to a multiple of 2. (The last odd byte is not transfered) When DATALENGTH = 0 no data will be transfered, when requested by a CPSMEN and CMDTRANS = 1 also no command will be transfered. DTEN and CPSMEN are cleared to 0."] | ||
| 1034 | pub fn set_datalength(&mut self, val: u32) { | ||
| 1035 | self.0 = | ||
| 1036 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); | ||
| 1355 | } | 1037 | } |
| 1356 | } | 1038 | } |
| 1357 | impl Default for Ifcr { | 1039 | impl Default for Dlenr { |
| 1358 | fn default() -> Ifcr { | 1040 | fn default() -> Dlenr { |
| 1359 | Ifcr(0) | 1041 | Dlenr(0) |
| 1360 | } | 1042 | } |
| 1361 | } | 1043 | } |
| 1362 | #[doc = "stream x configuration register"] | 1044 | #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."] |
| 1363 | #[repr(transparent)] | 1045 | #[repr(transparent)] |
| 1364 | #[derive(Copy, Clone, Eq, PartialEq)] | 1046 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1365 | pub struct Cr(pub u32); | 1047 | pub struct Idmabsizer(pub u32); |
| 1366 | impl Cr { | 1048 | impl Idmabsizer { |
| 1367 | #[doc = "Stream enable / flag stream ready when read low"] | 1049 | #[doc = "Number of transfers per buffer. This 8-bit value shall be multiplied by 8 to get the size of the buffer in 32-bit words and by 32 to get the size of the buffer in bytes. Example: IDMABNDT = 0x01: buffer size = 8 words = 32 bytes. These bits can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] |
| 1368 | pub const fn en(&self) -> bool { | 1050 | pub const fn idmabndt(&self) -> u8 { |
| 1051 | let val = (self.0 >> 5usize) & 0xff; | ||
| 1052 | val as u8 | ||
| 1053 | } | ||
| 1054 | #[doc = "Number of transfers per buffer. This 8-bit value shall be multiplied by 8 to get the size of the buffer in 32-bit words and by 32 to get the size of the buffer in bytes. Example: IDMABNDT = 0x01: buffer size = 8 words = 32 bytes. These bits can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 1055 | pub fn set_idmabndt(&mut self, val: u8) { | ||
| 1056 | self.0 = (self.0 & !(0xff << 5usize)) | (((val as u32) & 0xff) << 5usize); | ||
| 1057 | } | ||
| 1058 | } | ||
| 1059 | impl Default for Idmabsizer { | ||
| 1060 | fn default() -> Idmabsizer { | ||
| 1061 | Idmabsizer(0) | ||
| 1062 | } | ||
| 1063 | } | ||
| 1064 | #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"] | ||
| 1065 | #[repr(transparent)] | ||
| 1066 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1067 | pub struct Star(pub u32); | ||
| 1068 | impl Star { | ||
| 1069 | #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1070 | pub const fn ccrcfail(&self) -> bool { | ||
| 1369 | let val = (self.0 >> 0usize) & 0x01; | 1071 | let val = (self.0 >> 0usize) & 0x01; |
| 1370 | val != 0 | 1072 | val != 0 |
| 1371 | } | 1073 | } |
| 1372 | #[doc = "Stream enable / flag stream ready when read low"] | 1074 | #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1373 | pub fn set_en(&mut self, val: bool) { | 1075 | pub fn set_ccrcfail(&mut self, val: bool) { |
| 1374 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 1076 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 1375 | } | 1077 | } |
| 1376 | #[doc = "Direct mode error interrupt enable"] | 1078 | #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1377 | pub const fn dmeie(&self) -> bool { | 1079 | pub const fn dcrcfail(&self) -> bool { |
| 1378 | let val = (self.0 >> 1usize) & 0x01; | 1080 | let val = (self.0 >> 1usize) & 0x01; |
| 1379 | val != 0 | 1081 | val != 0 |
| 1380 | } | 1082 | } |
| 1381 | #[doc = "Direct mode error interrupt enable"] | 1083 | #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1382 | pub fn set_dmeie(&mut self, val: bool) { | 1084 | pub fn set_dcrcfail(&mut self, val: bool) { |
| 1383 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 1085 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 1384 | } | 1086 | } |
| 1385 | #[doc = "Transfer error interrupt enable"] | 1087 | #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."] |
| 1386 | pub const fn teie(&self) -> bool { | 1088 | pub const fn ctimeout(&self) -> bool { |
| 1387 | let val = (self.0 >> 2usize) & 0x01; | 1089 | let val = (self.0 >> 2usize) & 0x01; |
| 1388 | val != 0 | 1090 | val != 0 |
| 1389 | } | 1091 | } |
| 1390 | #[doc = "Transfer error interrupt enable"] | 1092 | #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."] |
| 1391 | pub fn set_teie(&mut self, val: bool) { | 1093 | pub fn set_ctimeout(&mut self, val: bool) { |
| 1392 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 1094 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 1393 | } | 1095 | } |
| 1394 | #[doc = "Half transfer interrupt enable"] | 1096 | #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1395 | pub const fn htie(&self) -> bool { | 1097 | pub const fn dtimeout(&self) -> bool { |
| 1396 | let val = (self.0 >> 3usize) & 0x01; | 1098 | let val = (self.0 >> 3usize) & 0x01; |
| 1397 | val != 0 | 1099 | val != 0 |
| 1398 | } | 1100 | } |
| 1399 | #[doc = "Half transfer interrupt enable"] | 1101 | #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1400 | pub fn set_htie(&mut self, val: bool) { | 1102 | pub fn set_dtimeout(&mut self, val: bool) { |
| 1401 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 1103 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 1402 | } | 1104 | } |
| 1403 | #[doc = "Transfer complete interrupt enable"] | 1105 | #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1404 | pub const fn tcie(&self) -> bool { | 1106 | pub const fn txunderr(&self) -> bool { |
| 1405 | let val = (self.0 >> 4usize) & 0x01; | 1107 | let val = (self.0 >> 4usize) & 0x01; |
| 1406 | val != 0 | 1108 | val != 0 |
| 1407 | } | 1109 | } |
| 1408 | #[doc = "Transfer complete interrupt enable"] | 1110 | #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1409 | pub fn set_tcie(&mut self, val: bool) { | 1111 | pub fn set_txunderr(&mut self, val: bool) { |
| 1410 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | 1112 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); |
| 1411 | } | 1113 | } |
| 1412 | #[doc = "Peripheral flow controller"] | 1114 | #[doc = "Received FIFO overrun error or IDMA write transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1413 | pub const fn pfctrl(&self) -> super::vals::Pfctrl { | 1115 | pub const fn rxoverr(&self) -> bool { |
| 1414 | let val = (self.0 >> 5usize) & 0x01; | 1116 | let val = (self.0 >> 5usize) & 0x01; |
| 1415 | super::vals::Pfctrl(val as u8) | 1117 | val != 0 |
| 1416 | } | 1118 | } |
| 1417 | #[doc = "Peripheral flow controller"] | 1119 | #[doc = "Received FIFO overrun error or IDMA write transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1418 | pub fn set_pfctrl(&mut self, val: super::vals::Pfctrl) { | 1120 | pub fn set_rxoverr(&mut self, val: bool) { |
| 1419 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | 1121 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 1420 | } | 1122 | } |
| 1421 | #[doc = "Data transfer direction"] | 1123 | #[doc = "Command response received (CRC check passed, or no CRC). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1422 | pub const fn dir(&self) -> super::vals::Dir { | 1124 | pub const fn cmdrend(&self) -> bool { |
| 1423 | let val = (self.0 >> 6usize) & 0x03; | 1125 | let val = (self.0 >> 6usize) & 0x01; |
| 1424 | super::vals::Dir(val as u8) | 1126 | val != 0 |
| 1425 | } | 1127 | } |
| 1426 | #[doc = "Data transfer direction"] | 1128 | #[doc = "Command response received (CRC check passed, or no CRC). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1427 | pub fn set_dir(&mut self, val: super::vals::Dir) { | 1129 | pub fn set_cmdrend(&mut self, val: bool) { |
| 1428 | self.0 = (self.0 & !(0x03 << 6usize)) | (((val.0 as u32) & 0x03) << 6usize); | 1130 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 1429 | } | 1131 | } |
| 1430 | #[doc = "Circular mode"] | 1132 | #[doc = "Command sent (no response required). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1431 | pub const fn circ(&self) -> super::vals::Circ { | 1133 | pub const fn cmdsent(&self) -> bool { |
| 1134 | let val = (self.0 >> 7usize) & 0x01; | ||
| 1135 | val != 0 | ||
| 1136 | } | ||
| 1137 | #[doc = "Command sent (no response required). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1138 | pub fn set_cmdsent(&mut self, val: bool) { | ||
| 1139 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 1140 | } | ||
| 1141 | #[doc = "Data transfer ended correctly. (data counter, DATACOUNT is zero and no errors occur). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1142 | pub const fn dataend(&self) -> bool { | ||
| 1432 | let val = (self.0 >> 8usize) & 0x01; | 1143 | let val = (self.0 >> 8usize) & 0x01; |
| 1433 | super::vals::Circ(val as u8) | 1144 | val != 0 |
| 1434 | } | 1145 | } |
| 1435 | #[doc = "Circular mode"] | 1146 | #[doc = "Data transfer ended correctly. (data counter, DATACOUNT is zero and no errors occur). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1436 | pub fn set_circ(&mut self, val: super::vals::Circ) { | 1147 | pub fn set_dataend(&mut self, val: bool) { |
| 1437 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val.0 as u32) & 0x01) << 8usize); | 1148 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 1438 | } | 1149 | } |
| 1439 | #[doc = "Peripheral increment mode"] | 1150 | #[doc = "Data transfer Hold. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1440 | pub const fn pinc(&self) -> super::vals::Inc { | 1151 | pub const fn dhold(&self) -> bool { |
| 1441 | let val = (self.0 >> 9usize) & 0x01; | 1152 | let val = (self.0 >> 9usize) & 0x01; |
| 1442 | super::vals::Inc(val as u8) | 1153 | val != 0 |
| 1443 | } | 1154 | } |
| 1444 | #[doc = "Peripheral increment mode"] | 1155 | #[doc = "Data transfer Hold. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1445 | pub fn set_pinc(&mut self, val: super::vals::Inc) { | 1156 | pub fn set_dhold(&mut self, val: bool) { |
| 1446 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); | 1157 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); |
| 1447 | } | 1158 | } |
| 1448 | #[doc = "Memory increment mode"] | 1159 | #[doc = "Data block sent/received. (CRC check passed) and DPSM moves to the READWAIT state. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1449 | pub const fn minc(&self) -> super::vals::Inc { | 1160 | pub const fn dbckend(&self) -> bool { |
| 1450 | let val = (self.0 >> 10usize) & 0x01; | 1161 | let val = (self.0 >> 10usize) & 0x01; |
| 1451 | super::vals::Inc(val as u8) | 1162 | val != 0 |
| 1452 | } | 1163 | } |
| 1453 | #[doc = "Memory increment mode"] | 1164 | #[doc = "Data block sent/received. (CRC check passed) and DPSM moves to the READWAIT state. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1454 | pub fn set_minc(&mut self, val: super::vals::Inc) { | 1165 | pub fn set_dbckend(&mut self, val: bool) { |
| 1455 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | 1166 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); |
| 1456 | } | 1167 | } |
| 1457 | #[doc = "Peripheral data size"] | 1168 | #[doc = "Data transfer aborted by CMD12. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1458 | pub const fn psize(&self) -> super::vals::Size { | 1169 | pub const fn dabort(&self) -> bool { |
| 1459 | let val = (self.0 >> 11usize) & 0x03; | 1170 | let val = (self.0 >> 11usize) & 0x01; |
| 1460 | super::vals::Size(val as u8) | 1171 | val != 0 |
| 1461 | } | 1172 | } |
| 1462 | #[doc = "Peripheral data size"] | 1173 | #[doc = "Data transfer aborted by CMD12. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1463 | pub fn set_psize(&mut self, val: super::vals::Size) { | 1174 | pub fn set_dabort(&mut self, val: bool) { |
| 1464 | self.0 = (self.0 & !(0x03 << 11usize)) | (((val.0 as u32) & 0x03) << 11usize); | 1175 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); |
| 1465 | } | 1176 | } |
| 1466 | #[doc = "Memory data size"] | 1177 | #[doc = "Data path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."] |
| 1467 | pub const fn msize(&self) -> super::vals::Size { | 1178 | pub const fn dpsmact(&self) -> bool { |
| 1468 | let val = (self.0 >> 13usize) & 0x03; | 1179 | let val = (self.0 >> 12usize) & 0x01; |
| 1469 | super::vals::Size(val as u8) | 1180 | val != 0 |
| 1470 | } | 1181 | } |
| 1471 | #[doc = "Memory data size"] | 1182 | #[doc = "Data path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."] |
| 1472 | pub fn set_msize(&mut self, val: super::vals::Size) { | 1183 | pub fn set_dpsmact(&mut self, val: bool) { |
| 1473 | self.0 = (self.0 & !(0x03 << 13usize)) | (((val.0 as u32) & 0x03) << 13usize); | 1184 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); |
| 1474 | } | 1185 | } |
| 1475 | #[doc = "Peripheral increment offset size"] | 1186 | #[doc = "Command path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."] |
| 1476 | pub const fn pincos(&self) -> super::vals::Pincos { | 1187 | pub const fn cpsmact(&self) -> bool { |
| 1188 | let val = (self.0 >> 13usize) & 0x01; | ||
| 1189 | val != 0 | ||
| 1190 | } | ||
| 1191 | #[doc = "Command path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."] | ||
| 1192 | pub fn set_cpsmact(&mut self, val: bool) { | ||
| 1193 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | ||
| 1194 | } | ||
| 1195 | #[doc = "Transmit FIFO half empty At least half the number of words can be written into the FIFO. This bit is cleared when the FIFO becomes half+1 full."] | ||
| 1196 | pub const fn txfifohe(&self) -> bool { | ||
| 1197 | let val = (self.0 >> 14usize) & 0x01; | ||
| 1198 | val != 0 | ||
| 1199 | } | ||
| 1200 | #[doc = "Transmit FIFO half empty At least half the number of words can be written into the FIFO. This bit is cleared when the FIFO becomes half+1 full."] | ||
| 1201 | pub fn set_txfifohe(&mut self, val: bool) { | ||
| 1202 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | ||
| 1203 | } | ||
| 1204 | #[doc = "Receive FIFO half full There are at least half the number of words in the FIFO. This bit is cleared when the FIFO becomes half+1 empty."] | ||
| 1205 | pub const fn rxfifohf(&self) -> bool { | ||
| 1477 | let val = (self.0 >> 15usize) & 0x01; | 1206 | let val = (self.0 >> 15usize) & 0x01; |
| 1478 | super::vals::Pincos(val as u8) | 1207 | val != 0 |
| 1479 | } | 1208 | } |
| 1480 | #[doc = "Peripheral increment offset size"] | 1209 | #[doc = "Receive FIFO half full There are at least half the number of words in the FIFO. This bit is cleared when the FIFO becomes half+1 empty."] |
| 1481 | pub fn set_pincos(&mut self, val: super::vals::Pincos) { | 1210 | pub fn set_rxfifohf(&mut self, val: bool) { |
| 1482 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); | 1211 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); |
| 1483 | } | 1212 | } |
| 1484 | #[doc = "Priority level"] | 1213 | #[doc = "Transmit FIFO full This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes empty."] |
| 1485 | pub const fn pl(&self) -> super::vals::Pl { | 1214 | pub const fn txfifof(&self) -> bool { |
| 1486 | let val = (self.0 >> 16usize) & 0x03; | 1215 | let val = (self.0 >> 16usize) & 0x01; |
| 1487 | super::vals::Pl(val as u8) | 1216 | val != 0 |
| 1488 | } | 1217 | } |
| 1489 | #[doc = "Priority level"] | 1218 | #[doc = "Transmit FIFO full This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes empty."] |
| 1490 | pub fn set_pl(&mut self, val: super::vals::Pl) { | 1219 | pub fn set_txfifof(&mut self, val: bool) { |
| 1491 | self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize); | 1220 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 1492 | } | 1221 | } |
| 1493 | #[doc = "Double buffer mode"] | 1222 | #[doc = "Receive FIFO full This bit is cleared when one FIFO location becomes empty."] |
| 1494 | pub const fn dbm(&self) -> super::vals::Dbm { | 1223 | pub const fn rxfifof(&self) -> bool { |
| 1224 | let val = (self.0 >> 17usize) & 0x01; | ||
| 1225 | val != 0 | ||
| 1226 | } | ||
| 1227 | #[doc = "Receive FIFO full This bit is cleared when one FIFO location becomes empty."] | ||
| 1228 | pub fn set_rxfifof(&mut self, val: bool) { | ||
| 1229 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | ||
| 1230 | } | ||
| 1231 | #[doc = "Transmit FIFO empty This bit is cleared when one FIFO location becomes full."] | ||
| 1232 | pub const fn txfifoe(&self) -> bool { | ||
| 1495 | let val = (self.0 >> 18usize) & 0x01; | 1233 | let val = (self.0 >> 18usize) & 0x01; |
| 1496 | super::vals::Dbm(val as u8) | 1234 | val != 0 |
| 1497 | } | 1235 | } |
| 1498 | #[doc = "Double buffer mode"] | 1236 | #[doc = "Transmit FIFO empty This bit is cleared when one FIFO location becomes full."] |
| 1499 | pub fn set_dbm(&mut self, val: super::vals::Dbm) { | 1237 | pub fn set_txfifoe(&mut self, val: bool) { |
| 1500 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize); | 1238 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); |
| 1501 | } | 1239 | } |
| 1502 | #[doc = "Current target (only in double buffer mode)"] | 1240 | #[doc = "Receive FIFO empty This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes full."] |
| 1503 | pub const fn ct(&self) -> super::vals::Ct { | 1241 | pub const fn rxfifoe(&self) -> bool { |
| 1504 | let val = (self.0 >> 19usize) & 0x01; | 1242 | let val = (self.0 >> 19usize) & 0x01; |
| 1505 | super::vals::Ct(val as u8) | 1243 | val != 0 |
| 1506 | } | 1244 | } |
| 1507 | #[doc = "Current target (only in double buffer mode)"] | 1245 | #[doc = "Receive FIFO empty This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes full."] |
| 1508 | pub fn set_ct(&mut self, val: super::vals::Ct) { | 1246 | pub fn set_rxfifoe(&mut self, val: bool) { |
| 1509 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize); | 1247 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); |
| 1510 | } | 1248 | } |
| 1511 | #[doc = "Peripheral burst transfer configuration"] | 1249 | #[doc = "Inverted value of SDMMC_D0 line (Busy), sampled at the end of a CMD response and a second time 2 SDMMC_CK cycles after the CMD response. This bit is reset to not busy when the SDMMCD0 line changes from busy to not busy. This bit does not signal busy due to data transfer. This is a hardware status flag only, it does not generate an interrupt."] |
| 1512 | pub const fn pburst(&self) -> super::vals::Burst { | 1250 | pub const fn busyd0(&self) -> bool { |
| 1513 | let val = (self.0 >> 21usize) & 0x03; | 1251 | let val = (self.0 >> 20usize) & 0x01; |
| 1514 | super::vals::Burst(val as u8) | 1252 | val != 0 |
| 1515 | } | 1253 | } |
| 1516 | #[doc = "Peripheral burst transfer configuration"] | 1254 | #[doc = "Inverted value of SDMMC_D0 line (Busy), sampled at the end of a CMD response and a second time 2 SDMMC_CK cycles after the CMD response. This bit is reset to not busy when the SDMMCD0 line changes from busy to not busy. This bit does not signal busy due to data transfer. This is a hardware status flag only, it does not generate an interrupt."] |
| 1517 | pub fn set_pburst(&mut self, val: super::vals::Burst) { | 1255 | pub fn set_busyd0(&mut self, val: bool) { |
| 1518 | self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize); | 1256 | self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); |
| 1519 | } | 1257 | } |
| 1520 | #[doc = "Memory burst transfer configuration"] | 1258 | #[doc = "end of SDMMC_D0 Busy following a CMD response detected. This indicates only end of busy following a CMD response. This bit does not signal busy due to data transfer. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1521 | pub const fn mburst(&self) -> super::vals::Burst { | 1259 | pub const fn busyd0end(&self) -> bool { |
| 1522 | let val = (self.0 >> 23usize) & 0x03; | 1260 | let val = (self.0 >> 21usize) & 0x01; |
| 1523 | super::vals::Burst(val as u8) | 1261 | val != 0 |
| 1524 | } | 1262 | } |
| 1525 | #[doc = "Memory burst transfer configuration"] | 1263 | #[doc = "end of SDMMC_D0 Busy following a CMD response detected. This indicates only end of busy following a CMD response. This bit does not signal busy due to data transfer. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1526 | pub fn set_mburst(&mut self, val: super::vals::Burst) { | 1264 | pub fn set_busyd0end(&mut self, val: bool) { |
| 1527 | self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize); | 1265 | self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); |
| 1528 | } | 1266 | } |
| 1529 | #[doc = "Channel selection"] | 1267 | #[doc = "SDIO interrupt received. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1530 | pub const fn chsel(&self) -> u8 { | 1268 | pub const fn sdioit(&self) -> bool { |
| 1531 | let val = (self.0 >> 25usize) & 0x0f; | 1269 | let val = (self.0 >> 22usize) & 0x01; |
| 1532 | val as u8 | 1270 | val != 0 |
| 1533 | } | 1271 | } |
| 1534 | #[doc = "Channel selection"] | 1272 | #[doc = "SDIO interrupt received. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] |
| 1535 | pub fn set_chsel(&mut self, val: u8) { | 1273 | pub fn set_sdioit(&mut self, val: bool) { |
| 1536 | self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize); | 1274 | self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); |
| 1275 | } | ||
| 1276 | #[doc = "Boot acknowledgment received (boot acknowledgment check fail). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1277 | pub const fn ackfail(&self) -> bool { | ||
| 1278 | let val = (self.0 >> 23usize) & 0x01; | ||
| 1279 | val != 0 | ||
| 1280 | } | ||
| 1281 | #[doc = "Boot acknowledgment received (boot acknowledgment check fail). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1282 | pub fn set_ackfail(&mut self, val: bool) { | ||
| 1283 | self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); | ||
| 1284 | } | ||
| 1285 | #[doc = "Boot acknowledgment timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1286 | pub const fn acktimeout(&self) -> bool { | ||
| 1287 | let val = (self.0 >> 24usize) & 0x01; | ||
| 1288 | val != 0 | ||
| 1289 | } | ||
| 1290 | #[doc = "Boot acknowledgment timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1291 | pub fn set_acktimeout(&mut self, val: bool) { | ||
| 1292 | self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); | ||
| 1293 | } | ||
| 1294 | #[doc = "Voltage switch critical timing section completion. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1295 | pub const fn vswend(&self) -> bool { | ||
| 1296 | let val = (self.0 >> 25usize) & 0x01; | ||
| 1297 | val != 0 | ||
| 1298 | } | ||
| 1299 | #[doc = "Voltage switch critical timing section completion. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1300 | pub fn set_vswend(&mut self, val: bool) { | ||
| 1301 | self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); | ||
| 1302 | } | ||
| 1303 | #[doc = "SDMMC_CK stopped in Voltage switch procedure. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1304 | pub const fn ckstop(&self) -> bool { | ||
| 1305 | let val = (self.0 >> 26usize) & 0x01; | ||
| 1306 | val != 0 | ||
| 1307 | } | ||
| 1308 | #[doc = "SDMMC_CK stopped in Voltage switch procedure. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1309 | pub fn set_ckstop(&mut self, val: bool) { | ||
| 1310 | self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); | ||
| 1311 | } | ||
| 1312 | #[doc = "IDMA transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1313 | pub const fn idmate(&self) -> bool { | ||
| 1314 | let val = (self.0 >> 27usize) & 0x01; | ||
| 1315 | val != 0 | ||
| 1316 | } | ||
| 1317 | #[doc = "IDMA transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1318 | pub fn set_idmate(&mut self, val: bool) { | ||
| 1319 | self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); | ||
| 1320 | } | ||
| 1321 | #[doc = "IDMA buffer transfer complete. interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1322 | pub const fn idmabtc(&self) -> bool { | ||
| 1323 | let val = (self.0 >> 28usize) & 0x01; | ||
| 1324 | val != 0 | ||
| 1325 | } | ||
| 1326 | #[doc = "IDMA buffer transfer complete. interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 1327 | pub fn set_idmabtc(&mut self, val: bool) { | ||
| 1328 | self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); | ||
| 1537 | } | 1329 | } |
| 1538 | } | 1330 | } |
| 1539 | impl Default for Cr { | 1331 | impl Default for Star { |
| 1540 | fn default() -> Cr { | 1332 | fn default() -> Star { |
| 1541 | Cr(0) | 1333 | Star(0) |
| 1542 | } | 1334 | } |
| 1543 | } | 1335 | } |
| 1544 | #[doc = "low interrupt status register"] | 1336 | #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."] |
| 1545 | #[repr(transparent)] | 1337 | #[repr(transparent)] |
| 1546 | #[derive(Copy, Clone, Eq, PartialEq)] | 1338 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1547 | pub struct Isr(pub u32); | 1339 | pub struct Clkcr(pub u32); |
| 1548 | impl Isr { | 1340 | impl Clkcr { |
| 1549 | #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] | 1341 | #[doc = "Clock divide factor This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). This field defines the divide factor between the input clock (SDMMCCLK) and the output clock (SDMMC_CK): SDMMC_CK frequency = SDMMCCLK / [2 * CLKDIV]. 0xx: etc.. xxx: etc.."] |
| 1550 | pub fn feif(&self, n: usize) -> bool { | 1342 | pub const fn clkdiv(&self) -> u16 { |
| 1551 | assert!(n < 4usize); | 1343 | let val = (self.0 >> 0usize) & 0x03ff; |
| 1552 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 1344 | val as u16 |
| 1553 | let val = (self.0 >> offs) & 0x01; | 1345 | } |
| 1346 | #[doc = "Clock divide factor This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). This field defines the divide factor between the input clock (SDMMCCLK) and the output clock (SDMMC_CK): SDMMC_CK frequency = SDMMCCLK / [2 * CLKDIV]. 0xx: etc.. xxx: etc.."] | ||
| 1347 | pub fn set_clkdiv(&mut self, val: u16) { | ||
| 1348 | self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize); | ||
| 1349 | } | ||
| 1350 | #[doc = "Power saving configuration bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) For power saving, the SDMMC_CK clock output can be disabled when the bus is idle by setting PWRSAV:"] | ||
| 1351 | pub const fn pwrsav(&self) -> bool { | ||
| 1352 | let val = (self.0 >> 12usize) & 0x01; | ||
| 1554 | val != 0 | 1353 | val != 0 |
| 1555 | } | 1354 | } |
| 1556 | #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] | 1355 | #[doc = "Power saving configuration bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) For power saving, the SDMMC_CK clock output can be disabled when the bus is idle by setting PWRSAV:"] |
| 1557 | pub fn set_feif(&mut self, n: usize, val: bool) { | 1356 | pub fn set_pwrsav(&mut self, val: bool) { |
| 1558 | assert!(n < 4usize); | 1357 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); |
| 1559 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 1560 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1561 | } | 1358 | } |
| 1562 | #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] | 1359 | #[doc = "Wide bus mode enable bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] |
| 1563 | pub fn dmeif(&self, n: usize) -> bool { | 1360 | pub const fn widbus(&self) -> u8 { |
| 1564 | assert!(n < 4usize); | 1361 | let val = (self.0 >> 14usize) & 0x03; |
| 1565 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | 1362 | val as u8 |
| 1566 | let val = (self.0 >> offs) & 0x01; | 1363 | } |
| 1364 | #[doc = "Wide bus mode enable bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] | ||
| 1365 | pub fn set_widbus(&mut self, val: u8) { | ||
| 1366 | self.0 = (self.0 & !(0x03 << 14usize)) | (((val as u32) & 0x03) << 14usize); | ||
| 1367 | } | ||
| 1368 | #[doc = "SDMMC_CK dephasing selection bit for data and Command. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). When clock division = 1 (CLKDIV = 0), this bit has no effect. Data and Command change on SDMMC_CK falling edge. When clock division >1 (CLKDIV > 0) & DDR = 0: - SDMMC_CK edge occurs on SDMMCCLK rising edge. When clock division >1 (CLKDIV > 0) & DDR = 1: - Data changed on the SDMMCCLK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge. - Data changed on the SDMMC_CK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge."] | ||
| 1369 | pub const fn negedge(&self) -> bool { | ||
| 1370 | let val = (self.0 >> 16usize) & 0x01; | ||
| 1567 | val != 0 | 1371 | val != 0 |
| 1568 | } | 1372 | } |
| 1569 | #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] | 1373 | #[doc = "SDMMC_CK dephasing selection bit for data and Command. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). When clock division = 1 (CLKDIV = 0), this bit has no effect. Data and Command change on SDMMC_CK falling edge. When clock division >1 (CLKDIV > 0) & DDR = 0: - SDMMC_CK edge occurs on SDMMCCLK rising edge. When clock division >1 (CLKDIV > 0) & DDR = 1: - Data changed on the SDMMCCLK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge. - Data changed on the SDMMC_CK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge."] |
| 1570 | pub fn set_dmeif(&mut self, n: usize, val: bool) { | 1374 | pub fn set_negedge(&mut self, val: bool) { |
| 1571 | assert!(n < 4usize); | 1375 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 1572 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 1573 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1574 | } | 1376 | } |
| 1575 | #[doc = "Stream x transfer error interrupt flag (x=3..0)"] | 1377 | #[doc = "Hardware flow control enable This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) When Hardware flow control is enabled, the meaning of the TXFIFOE and RXFIFOF flags change, please see SDMMC status register definition in Section56.8.11."] |
| 1576 | pub fn teif(&self, n: usize) -> bool { | 1378 | pub const fn hwfc_en(&self) -> bool { |
| 1577 | assert!(n < 4usize); | 1379 | let val = (self.0 >> 17usize) & 0x01; |
| 1578 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 1579 | let val = (self.0 >> offs) & 0x01; | ||
| 1580 | val != 0 | 1380 | val != 0 |
| 1581 | } | 1381 | } |
| 1582 | #[doc = "Stream x transfer error interrupt flag (x=3..0)"] | 1382 | #[doc = "Hardware flow control enable This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) When Hardware flow control is enabled, the meaning of the TXFIFOE and RXFIFOF flags change, please see SDMMC status register definition in Section56.8.11."] |
| 1583 | pub fn set_teif(&mut self, n: usize, val: bool) { | 1383 | pub fn set_hwfc_en(&mut self, val: bool) { |
| 1584 | assert!(n < 4usize); | 1384 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); |
| 1585 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 1586 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1587 | } | 1385 | } |
| 1588 | #[doc = "Stream x half transfer interrupt flag (x=3..0)"] | 1386 | #[doc = "Data rate signaling selection This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) DDR rate shall only be selected with 4-bit or 8-bit wide bus mode. (WIDBUS > 00). DDR = 1 has no effect when WIDBUS = 00 (1-bit wide bus). DDR rate shall only be selected with clock division >1. (CLKDIV > 0)"] |
| 1589 | pub fn htif(&self, n: usize) -> bool { | 1387 | pub const fn ddr(&self) -> bool { |
| 1590 | assert!(n < 4usize); | 1388 | let val = (self.0 >> 18usize) & 0x01; |
| 1591 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 1592 | let val = (self.0 >> offs) & 0x01; | ||
| 1593 | val != 0 | 1389 | val != 0 |
| 1594 | } | 1390 | } |
| 1595 | #[doc = "Stream x half transfer interrupt flag (x=3..0)"] | 1391 | #[doc = "Data rate signaling selection This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) DDR rate shall only be selected with 4-bit or 8-bit wide bus mode. (WIDBUS > 00). DDR = 1 has no effect when WIDBUS = 00 (1-bit wide bus). DDR rate shall only be selected with clock division >1. (CLKDIV > 0)"] |
| 1596 | pub fn set_htif(&mut self, n: usize, val: bool) { | 1392 | pub fn set_ddr(&mut self, val: bool) { |
| 1597 | assert!(n < 4usize); | 1393 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); |
| 1598 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 1599 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1600 | } | 1394 | } |
| 1601 | #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] | 1395 | #[doc = "Bus speed mode selection between DS, HS, SDR12, SDR25 and SDR50, DDR50, SDR104. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] |
| 1602 | pub fn tcif(&self, n: usize) -> bool { | 1396 | pub const fn busspeed(&self) -> bool { |
| 1603 | assert!(n < 4usize); | 1397 | let val = (self.0 >> 19usize) & 0x01; |
| 1604 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 1605 | let val = (self.0 >> offs) & 0x01; | ||
| 1606 | val != 0 | 1398 | val != 0 |
| 1607 | } | 1399 | } |
| 1608 | #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] | 1400 | #[doc = "Bus speed mode selection between DS, HS, SDR12, SDR25 and SDR50, DDR50, SDR104. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] |
| 1609 | pub fn set_tcif(&mut self, n: usize, val: bool) { | 1401 | pub fn set_busspeed(&mut self, val: bool) { |
| 1610 | assert!(n < 4usize); | 1402 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); |
| 1611 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 1612 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 1613 | } | 1403 | } |
| 1614 | } | 1404 | #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] |
| 1615 | impl Default for Isr { | 1405 | pub const fn selclkrx(&self) -> u8 { |
| 1616 | fn default() -> Isr { | 1406 | let val = (self.0 >> 20usize) & 0x03; |
| 1617 | Isr(0) | 1407 | val as u8 |
| 1408 | } | ||
| 1409 | #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] | ||
| 1410 | pub fn set_selclkrx(&mut self, val: u8) { | ||
| 1411 | self.0 = (self.0 & !(0x03 << 20usize)) | (((val as u32) & 0x03) << 20usize); | ||
| 1618 | } | 1412 | } |
| 1619 | } | 1413 | } |
| 1620 | } | 1414 | impl Default for Clkcr { |
| 1621 | pub mod vals { | 1415 | fn default() -> Clkcr { |
| 1622 | use crate::generic::*; | 1416 | Clkcr(0) |
| 1623 | #[repr(transparent)] | 1417 | } |
| 1624 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1625 | pub struct Burst(pub u8); | ||
| 1626 | impl Burst { | ||
| 1627 | #[doc = "Single transfer"] | ||
| 1628 | pub const SINGLE: Self = Self(0); | ||
| 1629 | #[doc = "Incremental burst of 4 beats"] | ||
| 1630 | pub const INCR4: Self = Self(0x01); | ||
| 1631 | #[doc = "Incremental burst of 8 beats"] | ||
| 1632 | pub const INCR8: Self = Self(0x02); | ||
| 1633 | #[doc = "Incremental burst of 16 beats"] | ||
| 1634 | pub const INCR16: Self = Self(0x03); | ||
| 1635 | } | ||
| 1636 | #[repr(transparent)] | ||
| 1637 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1638 | pub struct Pincos(pub u8); | ||
| 1639 | impl Pincos { | ||
| 1640 | #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"] | ||
| 1641 | pub const PSIZE: Self = Self(0); | ||
| 1642 | #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"] | ||
| 1643 | pub const FIXED4: Self = Self(0x01); | ||
| 1644 | } | ||
| 1645 | #[repr(transparent)] | ||
| 1646 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1647 | pub struct Size(pub u8); | ||
| 1648 | impl Size { | ||
| 1649 | #[doc = "Byte (8-bit)"] | ||
| 1650 | pub const BITS8: Self = Self(0); | ||
| 1651 | #[doc = "Half-word (16-bit)"] | ||
| 1652 | pub const BITS16: Self = Self(0x01); | ||
| 1653 | #[doc = "Word (32-bit)"] | ||
| 1654 | pub const BITS32: Self = Self(0x02); | ||
| 1655 | } | ||
| 1656 | #[repr(transparent)] | ||
| 1657 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1658 | pub struct Dmdis(pub u8); | ||
| 1659 | impl Dmdis { | ||
| 1660 | #[doc = "Direct mode is enabled"] | ||
| 1661 | pub const ENABLED: Self = Self(0); | ||
| 1662 | #[doc = "Direct mode is disabled"] | ||
| 1663 | pub const DISABLED: Self = Self(0x01); | ||
| 1664 | } | ||
| 1665 | #[repr(transparent)] | ||
| 1666 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 1667 | pub struct Fth(pub u8); | ||
| 1668 | impl Fth { | ||
| 1669 | #[doc = "1/4 full FIFO"] | ||
| 1670 | pub const QUARTER: Self = Self(0); | ||
| 1671 | #[doc = "1/2 full FIFO"] | ||
| 1672 | pub const HALF: Self = Self(0x01); | ||
| 1673 | #[doc = "3/4 full FIFO"] | ||
| 1674 | pub const THREEQUARTERS: Self = Self(0x02); | ||
| 1675 | #[doc = "Full FIFO"] | ||
| 1676 | pub const FULL: Self = Self(0x03); | ||
| 1677 | } | 1418 | } |
| 1419 | #[doc = "The SDMMC_IDMABASE0R register contains the memory buffer base address in single buffer configuration and the buffer 0 base address in double buffer configuration."] | ||
| 1678 | #[repr(transparent)] | 1420 | #[repr(transparent)] |
| 1679 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 1421 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1680 | pub struct Inc(pub u8); | 1422 | pub struct Idmabase0r(pub u32); |
| 1681 | impl Inc { | 1423 | impl Idmabase0r { |
| 1682 | #[doc = "Address pointer is fixed"] | 1424 | #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0] |
| 1683 | pub const FIXED: Self = Self(0); | 1425 | are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 0 is inactive (IDMABACT = 1)."] |
| 1684 | #[doc = "Address pointer is incremented after each data transfer"] | 1426 | pub const fn idmabase0(&self) -> u32 { |
| 1685 | pub const INCREMENTED: Self = Self(0x01); | 1427 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 1428 | val as u32 | ||
| 1429 | } | ||
| 1430 | #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0] | ||
| 1431 | are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 0 is inactive (IDMABACT = 1)."] | ||
| 1432 | pub fn set_idmabase0(&mut self, val: u32) { | ||
| 1433 | self.0 = | ||
| 1434 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 1435 | } | ||
| 1686 | } | 1436 | } |
| 1687 | #[repr(transparent)] | 1437 | impl Default for Idmabase0r { |
| 1688 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 1438 | fn default() -> Idmabase0r { |
| 1689 | pub struct Dir(pub u8); | 1439 | Idmabase0r(0) |
| 1690 | impl Dir { | 1440 | } |
| 1691 | #[doc = "Peripheral-to-memory"] | ||
| 1692 | pub const PERIPHERALTOMEMORY: Self = Self(0); | ||
| 1693 | #[doc = "Memory-to-peripheral"] | ||
| 1694 | pub const MEMORYTOPERIPHERAL: Self = Self(0x01); | ||
| 1695 | #[doc = "Memory-to-memory"] | ||
| 1696 | pub const MEMORYTOMEMORY: Self = Self(0x02); | ||
| 1697 | } | 1441 | } |
| 1442 | #[doc = "The SDMMC_DCNTR register loads the value from the data length register (see SDMMC_DLENR) when the DPSM moves from the Idle state to the Wait_R or Wait_S state. As data is transferred, the counter decrements the value until it reaches 0. The DPSM then moves to the Idle state and when there has been no error, the data status end flag (DATAEND) is set."] | ||
| 1698 | #[repr(transparent)] | 1443 | #[repr(transparent)] |
| 1699 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 1444 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1700 | pub struct Dbm(pub u8); | 1445 | pub struct Dcntr(pub u32); |
| 1701 | impl Dbm { | 1446 | impl Dcntr { |
| 1702 | #[doc = "No buffer switching at the end of transfer"] | 1447 | #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."] |
| 1703 | pub const DISABLED: Self = Self(0); | 1448 | pub const fn datacount(&self) -> u32 { |
| 1704 | #[doc = "Memory target switched at the end of the DMA transfer"] | 1449 | let val = (self.0 >> 0usize) & 0x01ff_ffff; |
| 1705 | pub const ENABLED: Self = Self(0x01); | 1450 | val as u32 |
| 1451 | } | ||
| 1452 | #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."] | ||
| 1453 | pub fn set_datacount(&mut self, val: u32) { | ||
| 1454 | self.0 = | ||
| 1455 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); | ||
| 1456 | } | ||
| 1706 | } | 1457 | } |
| 1707 | #[repr(transparent)] | 1458 | impl Default for Dcntr { |
| 1708 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 1459 | fn default() -> Dcntr { |
| 1709 | pub struct Pfctrl(pub u8); | 1460 | Dcntr(0) |
| 1710 | impl Pfctrl { | 1461 | } |
| 1711 | #[doc = "The DMA is the flow controller"] | ||
| 1712 | pub const DMA: Self = Self(0); | ||
| 1713 | #[doc = "The peripheral is the flow controller"] | ||
| 1714 | pub const PERIPHERAL: Self = Self(0x01); | ||
| 1715 | } | 1462 | } |
| 1463 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | ||
| 1716 | #[repr(transparent)] | 1464 | #[repr(transparent)] |
| 1717 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 1465 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1718 | pub struct Circ(pub u8); | 1466 | pub struct Resp3r(pub u32); |
| 1719 | impl Circ { | 1467 | impl Resp3r { |
| 1720 | #[doc = "Circular mode disabled"] | 1468 | #[doc = "see Table404."] |
| 1721 | pub const DISABLED: Self = Self(0); | 1469 | pub const fn cardstatus3(&self) -> u32 { |
| 1722 | #[doc = "Circular mode enabled"] | 1470 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 1723 | pub const ENABLED: Self = Self(0x01); | 1471 | val as u32 |
| 1472 | } | ||
| 1473 | #[doc = "see Table404."] | ||
| 1474 | pub fn set_cardstatus3(&mut self, val: u32) { | ||
| 1475 | self.0 = | ||
| 1476 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 1477 | } | ||
| 1724 | } | 1478 | } |
| 1725 | #[repr(transparent)] | 1479 | impl Default for Resp3r { |
| 1726 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 1480 | fn default() -> Resp3r { |
| 1727 | pub struct Fs(pub u8); | 1481 | Resp3r(0) |
| 1728 | impl Fs { | 1482 | } |
| 1729 | #[doc = "0 < fifo_level < 1/4"] | ||
| 1730 | pub const QUARTER1: Self = Self(0); | ||
| 1731 | #[doc = "1/4 <= fifo_level < 1/2"] | ||
| 1732 | pub const QUARTER2: Self = Self(0x01); | ||
| 1733 | #[doc = "1/2 <= fifo_level < 3/4"] | ||
| 1734 | pub const QUARTER3: Self = Self(0x02); | ||
| 1735 | #[doc = "3/4 <= fifo_level < full"] | ||
| 1736 | pub const QUARTER4: Self = Self(0x03); | ||
| 1737 | #[doc = "FIFO is empty"] | ||
| 1738 | pub const EMPTY: Self = Self(0x04); | ||
| 1739 | #[doc = "FIFO is full"] | ||
| 1740 | pub const FULL: Self = Self(0x05); | ||
| 1741 | } | 1483 | } |
| 1484 | #[doc = "The SDMMC_DTIMER register contains the data timeout period, in card bus clock periods. A counter loads the value from the SDMMC_DTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_R or Busy state. If the timer reaches 0 while the DPSM is in either of these states, the timeout status flag is set."] | ||
| 1742 | #[repr(transparent)] | 1485 | #[repr(transparent)] |
| 1743 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 1486 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 1744 | pub struct Pl(pub u8); | 1487 | pub struct Dtimer(pub u32); |
| 1745 | impl Pl { | 1488 | impl Dtimer { |
| 1746 | #[doc = "Low"] | 1489 | #[doc = "Data and R1b busy timeout period This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). Data and R1b busy timeout period expressed in card bus clock periods."] |
| 1747 | pub const LOW: Self = Self(0); | 1490 | pub const fn datatime(&self) -> u32 { |
| 1748 | #[doc = "Medium"] | 1491 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 1749 | pub const MEDIUM: Self = Self(0x01); | 1492 | val as u32 |
| 1750 | #[doc = "High"] | 1493 | } |
| 1751 | pub const HIGH: Self = Self(0x02); | 1494 | #[doc = "Data and R1b busy timeout period This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). Data and R1b busy timeout period expressed in card bus clock periods."] |
| 1752 | #[doc = "Very high"] | 1495 | pub fn set_datatime(&mut self, val: u32) { |
| 1753 | pub const VERYHIGH: Self = Self(0x03); | 1496 | self.0 = |
| 1497 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 1498 | } | ||
| 1754 | } | 1499 | } |
| 1755 | #[repr(transparent)] | 1500 | impl Default for Dtimer { |
| 1756 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 1501 | fn default() -> Dtimer { |
| 1757 | pub struct Ct(pub u8); | 1502 | Dtimer(0) |
| 1758 | impl Ct { | 1503 | } |
| 1759 | #[doc = "The current target memory is Memory 0"] | ||
| 1760 | pub const MEMORY0: Self = Self(0); | ||
| 1761 | #[doc = "The current target memory is Memory 1"] | ||
| 1762 | pub const MEMORY1: Self = Self(0x01); | ||
| 1763 | } | 1504 | } |
| 1764 | } | 1505 | } |
| 1765 | } | 1506 | } |
| 1766 | pub mod timer_v1 { | 1507 | pub mod timer_v1 { |
| 1767 | use crate::generic::*; | 1508 | use crate::generic::*; |
| 1768 | #[doc = "Advanced-timers"] | 1509 | #[doc = "General purpose 32-bit timer"] |
| 1769 | #[derive(Copy, Clone)] | 1510 | #[derive(Copy, Clone)] |
| 1770 | pub struct TimAdv(pub *mut u8); | 1511 | pub struct TimGp32(pub *mut u8); |
| 1771 | unsafe impl Send for TimAdv {} | 1512 | unsafe impl Send for TimGp32 {} |
| 1772 | unsafe impl Sync for TimAdv {} | 1513 | unsafe impl Sync for TimGp32 {} |
| 1773 | impl TimAdv { | 1514 | impl TimGp32 { |
| 1774 | #[doc = "control register 1"] | 1515 | #[doc = "control register 1"] |
| 1775 | pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { | 1516 | pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { |
| 1776 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 1517 | unsafe { Reg::from_ptr(self.0.add(0usize)) } |
| 1777 | } | 1518 | } |
| 1778 | #[doc = "control register 2"] | 1519 | #[doc = "control register 2"] |
| 1779 | pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> { | 1520 | pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> { |
| 1780 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 1521 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 1781 | } | 1522 | } |
| 1782 | #[doc = "slave mode control register"] | 1523 | #[doc = "slave mode control register"] |
| @@ -1784,15 +1525,15 @@ pub mod timer_v1 { | |||
| 1784 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 1525 | unsafe { Reg::from_ptr(self.0.add(8usize)) } |
| 1785 | } | 1526 | } |
| 1786 | #[doc = "DMA/Interrupt enable register"] | 1527 | #[doc = "DMA/Interrupt enable register"] |
| 1787 | pub fn dier(self) -> Reg<regs::DierAdv, RW> { | 1528 | pub fn dier(self) -> Reg<regs::DierGp, RW> { |
| 1788 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 1529 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 1789 | } | 1530 | } |
| 1790 | #[doc = "status register"] | 1531 | #[doc = "status register"] |
| 1791 | pub fn sr(self) -> Reg<regs::SrAdv, RW> { | 1532 | pub fn sr(self) -> Reg<regs::SrGp, RW> { |
| 1792 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 1533 | unsafe { Reg::from_ptr(self.0.add(16usize)) } |
| 1793 | } | 1534 | } |
| 1794 | #[doc = "event generation register"] | 1535 | #[doc = "event generation register"] |
| 1795 | pub fn egr(self) -> Reg<regs::EgrAdv, W> { | 1536 | pub fn egr(self) -> Reg<regs::EgrGp, W> { |
| 1796 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 1537 | unsafe { Reg::from_ptr(self.0.add(20usize)) } |
| 1797 | } | 1538 | } |
| 1798 | #[doc = "capture/compare mode register 1 (input mode)"] | 1539 | #[doc = "capture/compare mode register 1 (input mode)"] |
| @@ -1806,11 +1547,11 @@ pub mod timer_v1 { | |||
| 1806 | unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } | 1547 | unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } |
| 1807 | } | 1548 | } |
| 1808 | #[doc = "capture/compare enable register"] | 1549 | #[doc = "capture/compare enable register"] |
| 1809 | pub fn ccer(self) -> Reg<regs::CcerAdv, RW> { | 1550 | pub fn ccer(self) -> Reg<regs::CcerGp, RW> { |
| 1810 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | 1551 | unsafe { Reg::from_ptr(self.0.add(32usize)) } |
| 1811 | } | 1552 | } |
| 1812 | #[doc = "counter"] | 1553 | #[doc = "counter"] |
| 1813 | pub fn cnt(self) -> Reg<regs::Cnt16, RW> { | 1554 | pub fn cnt(self) -> Reg<regs::Cnt32, RW> { |
| 1814 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | 1555 | unsafe { Reg::from_ptr(self.0.add(36usize)) } |
| 1815 | } | 1556 | } |
| 1816 | #[doc = "prescaler"] | 1557 | #[doc = "prescaler"] |
| @@ -1818,22 +1559,14 @@ pub mod timer_v1 { | |||
| 1818 | unsafe { Reg::from_ptr(self.0.add(40usize)) } | 1559 | unsafe { Reg::from_ptr(self.0.add(40usize)) } |
| 1819 | } | 1560 | } |
| 1820 | #[doc = "auto-reload register"] | 1561 | #[doc = "auto-reload register"] |
| 1821 | pub fn arr(self) -> Reg<regs::Arr16, RW> { | 1562 | pub fn arr(self) -> Reg<regs::Arr32, RW> { |
| 1822 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | 1563 | unsafe { Reg::from_ptr(self.0.add(44usize)) } |
| 1823 | } | 1564 | } |
| 1824 | #[doc = "repetition counter register"] | ||
| 1825 | pub fn rcr(self) -> Reg<regs::Rcr, RW> { | ||
| 1826 | unsafe { Reg::from_ptr(self.0.add(48usize)) } | ||
| 1827 | } | ||
| 1828 | #[doc = "capture/compare register"] | 1565 | #[doc = "capture/compare register"] |
| 1829 | pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> { | 1566 | pub fn ccr(self, n: usize) -> Reg<regs::Ccr32, RW> { |
| 1830 | assert!(n < 4usize); | 1567 | assert!(n < 4usize); |
| 1831 | unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } | 1568 | unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } |
| 1832 | } | 1569 | } |
| 1833 | #[doc = "break and dead-time register"] | ||
| 1834 | pub fn bdtr(self) -> Reg<regs::Bdtr, RW> { | ||
| 1835 | unsafe { Reg::from_ptr(self.0.add(68usize)) } | ||
| 1836 | } | ||
| 1837 | #[doc = "DMA control register"] | 1570 | #[doc = "DMA control register"] |
| 1838 | pub fn dcr(self) -> Reg<regs::Dcr, RW> { | 1571 | pub fn dcr(self) -> Reg<regs::Dcr, RW> { |
| 1839 | unsafe { Reg::from_ptr(self.0.add(72usize)) } | 1572 | unsafe { Reg::from_ptr(self.0.add(72usize)) } |
| @@ -1843,52 +1576,34 @@ pub mod timer_v1 { | |||
| 1843 | unsafe { Reg::from_ptr(self.0.add(76usize)) } | 1576 | unsafe { Reg::from_ptr(self.0.add(76usize)) } |
| 1844 | } | 1577 | } |
| 1845 | } | 1578 | } |
| 1846 | #[doc = "General purpose 32-bit timer"] | 1579 | #[doc = "Basic timer"] |
| 1847 | #[derive(Copy, Clone)] | 1580 | #[derive(Copy, Clone)] |
| 1848 | pub struct TimGp32(pub *mut u8); | 1581 | pub struct TimBasic(pub *mut u8); |
| 1849 | unsafe impl Send for TimGp32 {} | 1582 | unsafe impl Send for TimBasic {} |
| 1850 | unsafe impl Sync for TimGp32 {} | 1583 | unsafe impl Sync for TimBasic {} |
| 1851 | impl TimGp32 { | 1584 | impl TimBasic { |
| 1852 | #[doc = "control register 1"] | 1585 | #[doc = "control register 1"] |
| 1853 | pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { | 1586 | pub fn cr1(self) -> Reg<regs::Cr1Basic, RW> { |
| 1854 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 1587 | unsafe { Reg::from_ptr(self.0.add(0usize)) } |
| 1855 | } | 1588 | } |
| 1856 | #[doc = "control register 2"] | 1589 | #[doc = "control register 2"] |
| 1857 | pub fn cr2(self) -> Reg<regs::Cr2Gp, RW> { | 1590 | pub fn cr2(self) -> Reg<regs::Cr2Basic, RW> { |
| 1858 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 1591 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 1859 | } | 1592 | } |
| 1860 | #[doc = "slave mode control register"] | ||
| 1861 | pub fn smcr(self) -> Reg<regs::Smcr, RW> { | ||
| 1862 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 1863 | } | ||
| 1864 | #[doc = "DMA/Interrupt enable register"] | 1593 | #[doc = "DMA/Interrupt enable register"] |
| 1865 | pub fn dier(self) -> Reg<regs::DierGp, RW> { | 1594 | pub fn dier(self) -> Reg<regs::DierBasic, RW> { |
| 1866 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 1595 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 1867 | } | 1596 | } |
| 1868 | #[doc = "status register"] | 1597 | #[doc = "status register"] |
| 1869 | pub fn sr(self) -> Reg<regs::SrGp, RW> { | 1598 | pub fn sr(self) -> Reg<regs::SrBasic, RW> { |
| 1870 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 1599 | unsafe { Reg::from_ptr(self.0.add(16usize)) } |
| 1871 | } | 1600 | } |
| 1872 | #[doc = "event generation register"] | 1601 | #[doc = "event generation register"] |
| 1873 | pub fn egr(self) -> Reg<regs::EgrGp, W> { | 1602 | pub fn egr(self) -> Reg<regs::EgrBasic, W> { |
| 1874 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 1603 | unsafe { Reg::from_ptr(self.0.add(20usize)) } |
| 1875 | } | 1604 | } |
| 1876 | #[doc = "capture/compare mode register 1 (input mode)"] | ||
| 1877 | pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> { | ||
| 1878 | assert!(n < 2usize); | ||
| 1879 | unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } | ||
| 1880 | } | ||
| 1881 | #[doc = "capture/compare mode register 1 (output mode)"] | ||
| 1882 | pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> { | ||
| 1883 | assert!(n < 2usize); | ||
| 1884 | unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } | ||
| 1885 | } | ||
| 1886 | #[doc = "capture/compare enable register"] | ||
| 1887 | pub fn ccer(self) -> Reg<regs::CcerGp, RW> { | ||
| 1888 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | ||
| 1889 | } | ||
| 1890 | #[doc = "counter"] | 1605 | #[doc = "counter"] |
| 1891 | pub fn cnt(self) -> Reg<regs::Cnt32, RW> { | 1606 | pub fn cnt(self) -> Reg<regs::Cnt16, RW> { |
| 1892 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | 1607 | unsafe { Reg::from_ptr(self.0.add(36usize)) } |
| 1893 | } | 1608 | } |
| 1894 | #[doc = "prescaler"] | 1609 | #[doc = "prescaler"] |
| @@ -1896,22 +1611,9 @@ pub mod timer_v1 { | |||
| 1896 | unsafe { Reg::from_ptr(self.0.add(40usize)) } | 1611 | unsafe { Reg::from_ptr(self.0.add(40usize)) } |
| 1897 | } | 1612 | } |
| 1898 | #[doc = "auto-reload register"] | 1613 | #[doc = "auto-reload register"] |
| 1899 | pub fn arr(self) -> Reg<regs::Arr32, RW> { | 1614 | pub fn arr(self) -> Reg<regs::Arr16, RW> { |
| 1900 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | 1615 | unsafe { Reg::from_ptr(self.0.add(44usize)) } |
| 1901 | } | 1616 | } |
| 1902 | #[doc = "capture/compare register"] | ||
| 1903 | pub fn ccr(self, n: usize) -> Reg<regs::Ccr32, RW> { | ||
| 1904 | assert!(n < 4usize); | ||
| 1905 | unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } | ||
| 1906 | } | ||
| 1907 | #[doc = "DMA control register"] | ||
| 1908 | pub fn dcr(self) -> Reg<regs::Dcr, RW> { | ||
| 1909 | unsafe { Reg::from_ptr(self.0.add(72usize)) } | ||
| 1910 | } | ||
| 1911 | #[doc = "DMA address for full transfer"] | ||
| 1912 | pub fn dmar(self) -> Reg<regs::Dmar, RW> { | ||
| 1913 | unsafe { Reg::from_ptr(self.0.add(76usize)) } | ||
| 1914 | } | ||
| 1915 | } | 1617 | } |
| 1916 | #[doc = "General purpose 16-bit timer"] | 1618 | #[doc = "General purpose 16-bit timer"] |
| 1917 | #[derive(Copy, Clone)] | 1619 | #[derive(Copy, Clone)] |
| @@ -1983,32 +1685,50 @@ pub mod timer_v1 { | |||
| 1983 | unsafe { Reg::from_ptr(self.0.add(76usize)) } | 1685 | unsafe { Reg::from_ptr(self.0.add(76usize)) } |
| 1984 | } | 1686 | } |
| 1985 | } | 1687 | } |
| 1986 | #[doc = "Basic timer"] | 1688 | #[doc = "Advanced-timers"] |
| 1987 | #[derive(Copy, Clone)] | 1689 | #[derive(Copy, Clone)] |
| 1988 | pub struct TimBasic(pub *mut u8); | 1690 | pub struct TimAdv(pub *mut u8); |
| 1989 | unsafe impl Send for TimBasic {} | 1691 | unsafe impl Send for TimAdv {} |
| 1990 | unsafe impl Sync for TimBasic {} | 1692 | unsafe impl Sync for TimAdv {} |
| 1991 | impl TimBasic { | 1693 | impl TimAdv { |
| 1992 | #[doc = "control register 1"] | 1694 | #[doc = "control register 1"] |
| 1993 | pub fn cr1(self) -> Reg<regs::Cr1Basic, RW> { | 1695 | pub fn cr1(self) -> Reg<regs::Cr1Gp, RW> { |
| 1994 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 1696 | unsafe { Reg::from_ptr(self.0.add(0usize)) } |
| 1995 | } | 1697 | } |
| 1996 | #[doc = "control register 2"] | 1698 | #[doc = "control register 2"] |
| 1997 | pub fn cr2(self) -> Reg<regs::Cr2Basic, RW> { | 1699 | pub fn cr2(self) -> Reg<regs::Cr2Adv, RW> { |
| 1998 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 1700 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 1999 | } | 1701 | } |
| 1702 | #[doc = "slave mode control register"] | ||
| 1703 | pub fn smcr(self) -> Reg<regs::Smcr, RW> { | ||
| 1704 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 1705 | } | ||
| 2000 | #[doc = "DMA/Interrupt enable register"] | 1706 | #[doc = "DMA/Interrupt enable register"] |
| 2001 | pub fn dier(self) -> Reg<regs::DierBasic, RW> { | 1707 | pub fn dier(self) -> Reg<regs::DierAdv, RW> { |
| 2002 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 1708 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 2003 | } | 1709 | } |
| 2004 | #[doc = "status register"] | 1710 | #[doc = "status register"] |
| 2005 | pub fn sr(self) -> Reg<regs::SrBasic, RW> { | 1711 | pub fn sr(self) -> Reg<regs::SrAdv, RW> { |
| 2006 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 1712 | unsafe { Reg::from_ptr(self.0.add(16usize)) } |
| 2007 | } | 1713 | } |
| 2008 | #[doc = "event generation register"] | 1714 | #[doc = "event generation register"] |
| 2009 | pub fn egr(self) -> Reg<regs::EgrBasic, W> { | 1715 | pub fn egr(self) -> Reg<regs::EgrAdv, W> { |
| 2010 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 1716 | unsafe { Reg::from_ptr(self.0.add(20usize)) } |
| 2011 | } | 1717 | } |
| 1718 | #[doc = "capture/compare mode register 1 (input mode)"] | ||
| 1719 | pub fn ccmr_input(self, n: usize) -> Reg<regs::CcmrInput, RW> { | ||
| 1720 | assert!(n < 2usize); | ||
| 1721 | unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } | ||
| 1722 | } | ||
| 1723 | #[doc = "capture/compare mode register 1 (output mode)"] | ||
| 1724 | pub fn ccmr_output(self, n: usize) -> Reg<regs::CcmrOutput, RW> { | ||
| 1725 | assert!(n < 2usize); | ||
| 1726 | unsafe { Reg::from_ptr(self.0.add(24usize + n * 4usize)) } | ||
| 1727 | } | ||
| 1728 | #[doc = "capture/compare enable register"] | ||
| 1729 | pub fn ccer(self) -> Reg<regs::CcerAdv, RW> { | ||
| 1730 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | ||
| 1731 | } | ||
| 2012 | #[doc = "counter"] | 1732 | #[doc = "counter"] |
| 2013 | pub fn cnt(self) -> Reg<regs::Cnt16, RW> { | 1733 | pub fn cnt(self) -> Reg<regs::Cnt16, RW> { |
| 2014 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | 1734 | unsafe { Reg::from_ptr(self.0.add(36usize)) } |
| @@ -2021,109 +1741,30 @@ pub mod timer_v1 { | |||
| 2021 | pub fn arr(self) -> Reg<regs::Arr16, RW> { | 1741 | pub fn arr(self) -> Reg<regs::Arr16, RW> { |
| 2022 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | 1742 | unsafe { Reg::from_ptr(self.0.add(44usize)) } |
| 2023 | } | 1743 | } |
| 2024 | } | 1744 | #[doc = "repetition counter register"] |
| 2025 | pub mod regs { | 1745 | pub fn rcr(self) -> Reg<regs::Rcr, RW> { |
| 2026 | use crate::generic::*; | 1746 | unsafe { Reg::from_ptr(self.0.add(48usize)) } |
| 2027 | #[doc = "event generation register"] | ||
| 2028 | #[repr(transparent)] | ||
| 2029 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2030 | pub struct EgrBasic(pub u32); | ||
| 2031 | impl EgrBasic { | ||
| 2032 | #[doc = "Update generation"] | ||
| 2033 | pub const fn ug(&self) -> bool { | ||
| 2034 | let val = (self.0 >> 0usize) & 0x01; | ||
| 2035 | val != 0 | ||
| 2036 | } | ||
| 2037 | #[doc = "Update generation"] | ||
| 2038 | pub fn set_ug(&mut self, val: bool) { | ||
| 2039 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 2040 | } | ||
| 2041 | } | ||
| 2042 | impl Default for EgrBasic { | ||
| 2043 | fn default() -> EgrBasic { | ||
| 2044 | EgrBasic(0) | ||
| 2045 | } | ||
| 2046 | } | 1747 | } |
| 2047 | #[doc = "DMA address for full transfer"] | 1748 | #[doc = "capture/compare register"] |
| 2048 | #[repr(transparent)] | 1749 | pub fn ccr(self, n: usize) -> Reg<regs::Ccr16, RW> { |
| 2049 | #[derive(Copy, Clone, Eq, PartialEq)] | 1750 | assert!(n < 4usize); |
| 2050 | pub struct Dmar(pub u32); | 1751 | unsafe { Reg::from_ptr(self.0.add(52usize + n * 4usize)) } |
| 2051 | impl Dmar { | ||
| 2052 | #[doc = "DMA register for burst accesses"] | ||
| 2053 | pub const fn dmab(&self) -> u16 { | ||
| 2054 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 2055 | val as u16 | ||
| 2056 | } | ||
| 2057 | #[doc = "DMA register for burst accesses"] | ||
| 2058 | pub fn set_dmab(&mut self, val: u16) { | ||
| 2059 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 2060 | } | ||
| 2061 | } | 1752 | } |
| 2062 | impl Default for Dmar { | 1753 | #[doc = "break and dead-time register"] |
| 2063 | fn default() -> Dmar { | 1754 | pub fn bdtr(self) -> Reg<regs::Bdtr, RW> { |
| 2064 | Dmar(0) | 1755 | unsafe { Reg::from_ptr(self.0.add(68usize)) } |
| 2065 | } | ||
| 2066 | } | 1756 | } |
| 2067 | #[doc = "event generation register"] | 1757 | #[doc = "DMA control register"] |
| 2068 | #[repr(transparent)] | 1758 | pub fn dcr(self) -> Reg<regs::Dcr, RW> { |
| 2069 | #[derive(Copy, Clone, Eq, PartialEq)] | 1759 | unsafe { Reg::from_ptr(self.0.add(72usize)) } |
| 2070 | pub struct EgrGp(pub u32); | ||
| 2071 | impl EgrGp { | ||
| 2072 | #[doc = "Update generation"] | ||
| 2073 | pub const fn ug(&self) -> bool { | ||
| 2074 | let val = (self.0 >> 0usize) & 0x01; | ||
| 2075 | val != 0 | ||
| 2076 | } | ||
| 2077 | #[doc = "Update generation"] | ||
| 2078 | pub fn set_ug(&mut self, val: bool) { | ||
| 2079 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 2080 | } | ||
| 2081 | #[doc = "Capture/compare 1 generation"] | ||
| 2082 | pub fn ccg(&self, n: usize) -> bool { | ||
| 2083 | assert!(n < 4usize); | ||
| 2084 | let offs = 1usize + n * 1usize; | ||
| 2085 | let val = (self.0 >> offs) & 0x01; | ||
| 2086 | val != 0 | ||
| 2087 | } | ||
| 2088 | #[doc = "Capture/compare 1 generation"] | ||
| 2089 | pub fn set_ccg(&mut self, n: usize, val: bool) { | ||
| 2090 | assert!(n < 4usize); | ||
| 2091 | let offs = 1usize + n * 1usize; | ||
| 2092 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2093 | } | ||
| 2094 | #[doc = "Capture/Compare control update generation"] | ||
| 2095 | pub const fn comg(&self) -> bool { | ||
| 2096 | let val = (self.0 >> 5usize) & 0x01; | ||
| 2097 | val != 0 | ||
| 2098 | } | ||
| 2099 | #[doc = "Capture/Compare control update generation"] | ||
| 2100 | pub fn set_comg(&mut self, val: bool) { | ||
| 2101 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 2102 | } | ||
| 2103 | #[doc = "Trigger generation"] | ||
| 2104 | pub const fn tg(&self) -> bool { | ||
| 2105 | let val = (self.0 >> 6usize) & 0x01; | ||
| 2106 | val != 0 | ||
| 2107 | } | ||
| 2108 | #[doc = "Trigger generation"] | ||
| 2109 | pub fn set_tg(&mut self, val: bool) { | ||
| 2110 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 2111 | } | ||
| 2112 | #[doc = "Break generation"] | ||
| 2113 | pub const fn bg(&self) -> bool { | ||
| 2114 | let val = (self.0 >> 7usize) & 0x01; | ||
| 2115 | val != 0 | ||
| 2116 | } | ||
| 2117 | #[doc = "Break generation"] | ||
| 2118 | pub fn set_bg(&mut self, val: bool) { | ||
| 2119 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 2120 | } | ||
| 2121 | } | 1760 | } |
| 2122 | impl Default for EgrGp { | 1761 | #[doc = "DMA address for full transfer"] |
| 2123 | fn default() -> EgrGp { | 1762 | pub fn dmar(self) -> Reg<regs::Dmar, RW> { |
| 2124 | EgrGp(0) | 1763 | unsafe { Reg::from_ptr(self.0.add(76usize)) } |
| 2125 | } | ||
| 2126 | } | 1764 | } |
| 1765 | } | ||
| 1766 | pub mod regs { | ||
| 1767 | use crate::generic::*; | ||
| 2127 | #[doc = "control register 2"] | 1768 | #[doc = "control register 2"] |
| 2128 | #[repr(transparent)] | 1769 | #[repr(transparent)] |
| 2129 | #[derive(Copy, Clone, Eq, PartialEq)] | 1770 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -2162,107 +1803,54 @@ pub mod timer_v1 { | |||
| 2162 | Cr2Gp(0) | 1803 | Cr2Gp(0) |
| 2163 | } | 1804 | } |
| 2164 | } | 1805 | } |
| 2165 | #[doc = "break and dead-time register"] | 1806 | #[doc = "capture/compare mode register 1 (input mode)"] |
| 2166 | #[repr(transparent)] | 1807 | #[repr(transparent)] |
| 2167 | #[derive(Copy, Clone, Eq, PartialEq)] | 1808 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2168 | pub struct Bdtr(pub u32); | 1809 | pub struct CcmrInput(pub u32); |
| 2169 | impl Bdtr { | 1810 | impl CcmrInput { |
| 2170 | #[doc = "Dead-time generator setup"] | 1811 | #[doc = "Capture/Compare 1 selection"] |
| 2171 | pub const fn dtg(&self) -> u8 { | 1812 | pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs { |
| 2172 | let val = (self.0 >> 0usize) & 0xff; | 1813 | assert!(n < 2usize); |
| 2173 | val as u8 | 1814 | let offs = 0usize + n * 8usize; |
| 1815 | let val = (self.0 >> offs) & 0x03; | ||
| 1816 | super::vals::CcmrInputCcs(val as u8) | ||
| 2174 | } | 1817 | } |
| 2175 | #[doc = "Dead-time generator setup"] | 1818 | #[doc = "Capture/Compare 1 selection"] |
| 2176 | pub fn set_dtg(&mut self, val: u8) { | 1819 | pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) { |
| 2177 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | 1820 | assert!(n < 2usize); |
| 1821 | let offs = 0usize + n * 8usize; | ||
| 1822 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 2178 | } | 1823 | } |
| 2179 | #[doc = "Lock configuration"] | 1824 | #[doc = "Input capture 1 prescaler"] |
| 2180 | pub const fn lock(&self) -> u8 { | 1825 | pub fn icpsc(&self, n: usize) -> u8 { |
| 2181 | let val = (self.0 >> 8usize) & 0x03; | 1826 | assert!(n < 2usize); |
| 1827 | let offs = 2usize + n * 8usize; | ||
| 1828 | let val = (self.0 >> offs) & 0x03; | ||
| 2182 | val as u8 | 1829 | val as u8 |
| 2183 | } | 1830 | } |
| 2184 | #[doc = "Lock configuration"] | 1831 | #[doc = "Input capture 1 prescaler"] |
| 2185 | pub fn set_lock(&mut self, val: u8) { | 1832 | pub fn set_icpsc(&mut self, n: usize, val: u8) { |
| 2186 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); | 1833 | assert!(n < 2usize); |
| 2187 | } | 1834 | let offs = 2usize + n * 8usize; |
| 2188 | #[doc = "Off-state selection for Idle mode"] | 1835 | self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs); |
| 2189 | pub const fn ossi(&self) -> super::vals::Ossi { | ||
| 2190 | let val = (self.0 >> 10usize) & 0x01; | ||
| 2191 | super::vals::Ossi(val as u8) | ||
| 2192 | } | ||
| 2193 | #[doc = "Off-state selection for Idle mode"] | ||
| 2194 | pub fn set_ossi(&mut self, val: super::vals::Ossi) { | ||
| 2195 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | ||
| 2196 | } | ||
| 2197 | #[doc = "Off-state selection for Run mode"] | ||
| 2198 | pub const fn ossr(&self) -> super::vals::Ossr { | ||
| 2199 | let val = (self.0 >> 11usize) & 0x01; | ||
| 2200 | super::vals::Ossr(val as u8) | ||
| 2201 | } | ||
| 2202 | #[doc = "Off-state selection for Run mode"] | ||
| 2203 | pub fn set_ossr(&mut self, val: super::vals::Ossr) { | ||
| 2204 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); | ||
| 2205 | } | ||
| 2206 | #[doc = "Break enable"] | ||
| 2207 | pub const fn bke(&self) -> bool { | ||
| 2208 | let val = (self.0 >> 12usize) & 0x01; | ||
| 2209 | val != 0 | ||
| 2210 | } | ||
| 2211 | #[doc = "Break enable"] | ||
| 2212 | pub fn set_bke(&mut self, val: bool) { | ||
| 2213 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); | ||
| 2214 | } | ||
| 2215 | #[doc = "Break polarity"] | ||
| 2216 | pub const fn bkp(&self) -> bool { | ||
| 2217 | let val = (self.0 >> 13usize) & 0x01; | ||
| 2218 | val != 0 | ||
| 2219 | } | ||
| 2220 | #[doc = "Break polarity"] | ||
| 2221 | pub fn set_bkp(&mut self, val: bool) { | ||
| 2222 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | ||
| 2223 | } | ||
| 2224 | #[doc = "Automatic output enable"] | ||
| 2225 | pub const fn aoe(&self) -> bool { | ||
| 2226 | let val = (self.0 >> 14usize) & 0x01; | ||
| 2227 | val != 0 | ||
| 2228 | } | ||
| 2229 | #[doc = "Automatic output enable"] | ||
| 2230 | pub fn set_aoe(&mut self, val: bool) { | ||
| 2231 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | ||
| 2232 | } | ||
| 2233 | #[doc = "Main output enable"] | ||
| 2234 | pub const fn moe(&self) -> bool { | ||
| 2235 | let val = (self.0 >> 15usize) & 0x01; | ||
| 2236 | val != 0 | ||
| 2237 | } | ||
| 2238 | #[doc = "Main output enable"] | ||
| 2239 | pub fn set_moe(&mut self, val: bool) { | ||
| 2240 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); | ||
| 2241 | } | ||
| 2242 | } | ||
| 2243 | impl Default for Bdtr { | ||
| 2244 | fn default() -> Bdtr { | ||
| 2245 | Bdtr(0) | ||
| 2246 | } | 1836 | } |
| 2247 | } | 1837 | #[doc = "Input capture 1 filter"] |
| 2248 | #[doc = "repetition counter register"] | 1838 | pub fn icf(&self, n: usize) -> super::vals::Icf { |
| 2249 | #[repr(transparent)] | 1839 | assert!(n < 2usize); |
| 2250 | #[derive(Copy, Clone, Eq, PartialEq)] | 1840 | let offs = 4usize + n * 8usize; |
| 2251 | pub struct Rcr(pub u32); | 1841 | let val = (self.0 >> offs) & 0x0f; |
| 2252 | impl Rcr { | 1842 | super::vals::Icf(val as u8) |
| 2253 | #[doc = "Repetition counter value"] | ||
| 2254 | pub const fn rep(&self) -> u8 { | ||
| 2255 | let val = (self.0 >> 0usize) & 0xff; | ||
| 2256 | val as u8 | ||
| 2257 | } | 1843 | } |
| 2258 | #[doc = "Repetition counter value"] | 1844 | #[doc = "Input capture 1 filter"] |
| 2259 | pub fn set_rep(&mut self, val: u8) { | 1845 | pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) { |
| 2260 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | 1846 | assert!(n < 2usize); |
| 1847 | let offs = 4usize + n * 8usize; | ||
| 1848 | self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs); | ||
| 2261 | } | 1849 | } |
| 2262 | } | 1850 | } |
| 2263 | impl Default for Rcr { | 1851 | impl Default for CcmrInput { |
| 2264 | fn default() -> Rcr { | 1852 | fn default() -> CcmrInput { |
| 2265 | Rcr(0) | 1853 | CcmrInput(0) |
| 2266 | } | 1854 | } |
| 2267 | } | 1855 | } |
| 2268 | #[doc = "DMA/Interrupt enable register"] | 1856 | #[doc = "DMA/Interrupt enable register"] |
| @@ -2365,6 +1953,268 @@ pub mod timer_v1 { | |||
| 2365 | DierAdv(0) | 1953 | DierAdv(0) |
| 2366 | } | 1954 | } |
| 2367 | } | 1955 | } |
| 1956 | #[doc = "prescaler"] | ||
| 1957 | #[repr(transparent)] | ||
| 1958 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1959 | pub struct Psc(pub u32); | ||
| 1960 | impl Psc { | ||
| 1961 | #[doc = "Prescaler value"] | ||
| 1962 | pub const fn psc(&self) -> u16 { | ||
| 1963 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 1964 | val as u16 | ||
| 1965 | } | ||
| 1966 | #[doc = "Prescaler value"] | ||
| 1967 | pub fn set_psc(&mut self, val: u16) { | ||
| 1968 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 1969 | } | ||
| 1970 | } | ||
| 1971 | impl Default for Psc { | ||
| 1972 | fn default() -> Psc { | ||
| 1973 | Psc(0) | ||
| 1974 | } | ||
| 1975 | } | ||
| 1976 | #[doc = "event generation register"] | ||
| 1977 | #[repr(transparent)] | ||
| 1978 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 1979 | pub struct EgrAdv(pub u32); | ||
| 1980 | impl EgrAdv { | ||
| 1981 | #[doc = "Update generation"] | ||
| 1982 | pub const fn ug(&self) -> bool { | ||
| 1983 | let val = (self.0 >> 0usize) & 0x01; | ||
| 1984 | val != 0 | ||
| 1985 | } | ||
| 1986 | #[doc = "Update generation"] | ||
| 1987 | pub fn set_ug(&mut self, val: bool) { | ||
| 1988 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 1989 | } | ||
| 1990 | #[doc = "Capture/compare 1 generation"] | ||
| 1991 | pub fn ccg(&self, n: usize) -> bool { | ||
| 1992 | assert!(n < 4usize); | ||
| 1993 | let offs = 1usize + n * 1usize; | ||
| 1994 | let val = (self.0 >> offs) & 0x01; | ||
| 1995 | val != 0 | ||
| 1996 | } | ||
| 1997 | #[doc = "Capture/compare 1 generation"] | ||
| 1998 | pub fn set_ccg(&mut self, n: usize, val: bool) { | ||
| 1999 | assert!(n < 4usize); | ||
| 2000 | let offs = 1usize + n * 1usize; | ||
| 2001 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2002 | } | ||
| 2003 | #[doc = "Capture/Compare control update generation"] | ||
| 2004 | pub const fn comg(&self) -> bool { | ||
| 2005 | let val = (self.0 >> 5usize) & 0x01; | ||
| 2006 | val != 0 | ||
| 2007 | } | ||
| 2008 | #[doc = "Capture/Compare control update generation"] | ||
| 2009 | pub fn set_comg(&mut self, val: bool) { | ||
| 2010 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 2011 | } | ||
| 2012 | #[doc = "Trigger generation"] | ||
| 2013 | pub const fn tg(&self) -> bool { | ||
| 2014 | let val = (self.0 >> 6usize) & 0x01; | ||
| 2015 | val != 0 | ||
| 2016 | } | ||
| 2017 | #[doc = "Trigger generation"] | ||
| 2018 | pub fn set_tg(&mut self, val: bool) { | ||
| 2019 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 2020 | } | ||
| 2021 | #[doc = "Break generation"] | ||
| 2022 | pub const fn bg(&self) -> bool { | ||
| 2023 | let val = (self.0 >> 7usize) & 0x01; | ||
| 2024 | val != 0 | ||
| 2025 | } | ||
| 2026 | #[doc = "Break generation"] | ||
| 2027 | pub fn set_bg(&mut self, val: bool) { | ||
| 2028 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 2029 | } | ||
| 2030 | } | ||
| 2031 | impl Default for EgrAdv { | ||
| 2032 | fn default() -> EgrAdv { | ||
| 2033 | EgrAdv(0) | ||
| 2034 | } | ||
| 2035 | } | ||
| 2036 | #[doc = "capture/compare mode register 2 (output mode)"] | ||
| 2037 | #[repr(transparent)] | ||
| 2038 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2039 | pub struct CcmrOutput(pub u32); | ||
| 2040 | impl CcmrOutput { | ||
| 2041 | #[doc = "Capture/Compare 3 selection"] | ||
| 2042 | pub fn ccs(&self, n: usize) -> super::vals::CcmrOutputCcs { | ||
| 2043 | assert!(n < 2usize); | ||
| 2044 | let offs = 0usize + n * 8usize; | ||
| 2045 | let val = (self.0 >> offs) & 0x03; | ||
| 2046 | super::vals::CcmrOutputCcs(val as u8) | ||
| 2047 | } | ||
| 2048 | #[doc = "Capture/Compare 3 selection"] | ||
| 2049 | pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrOutputCcs) { | ||
| 2050 | assert!(n < 2usize); | ||
| 2051 | let offs = 0usize + n * 8usize; | ||
| 2052 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 2053 | } | ||
| 2054 | #[doc = "Output compare 3 fast enable"] | ||
| 2055 | pub fn ocfe(&self, n: usize) -> bool { | ||
| 2056 | assert!(n < 2usize); | ||
| 2057 | let offs = 2usize + n * 8usize; | ||
| 2058 | let val = (self.0 >> offs) & 0x01; | ||
| 2059 | val != 0 | ||
| 2060 | } | ||
| 2061 | #[doc = "Output compare 3 fast enable"] | ||
| 2062 | pub fn set_ocfe(&mut self, n: usize, val: bool) { | ||
| 2063 | assert!(n < 2usize); | ||
| 2064 | let offs = 2usize + n * 8usize; | ||
| 2065 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2066 | } | ||
| 2067 | #[doc = "Output compare 3 preload enable"] | ||
| 2068 | pub fn ocpe(&self, n: usize) -> super::vals::Ocpe { | ||
| 2069 | assert!(n < 2usize); | ||
| 2070 | let offs = 3usize + n * 8usize; | ||
| 2071 | let val = (self.0 >> offs) & 0x01; | ||
| 2072 | super::vals::Ocpe(val as u8) | ||
| 2073 | } | ||
| 2074 | #[doc = "Output compare 3 preload enable"] | ||
| 2075 | pub fn set_ocpe(&mut self, n: usize, val: super::vals::Ocpe) { | ||
| 2076 | assert!(n < 2usize); | ||
| 2077 | let offs = 3usize + n * 8usize; | ||
| 2078 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 2079 | } | ||
| 2080 | #[doc = "Output compare 3 mode"] | ||
| 2081 | pub fn ocm(&self, n: usize) -> super::vals::Ocm { | ||
| 2082 | assert!(n < 2usize); | ||
| 2083 | let offs = 4usize + n * 8usize; | ||
| 2084 | let val = (self.0 >> offs) & 0x07; | ||
| 2085 | super::vals::Ocm(val as u8) | ||
| 2086 | } | ||
| 2087 | #[doc = "Output compare 3 mode"] | ||
| 2088 | pub fn set_ocm(&mut self, n: usize, val: super::vals::Ocm) { | ||
| 2089 | assert!(n < 2usize); | ||
| 2090 | let offs = 4usize + n * 8usize; | ||
| 2091 | self.0 = (self.0 & !(0x07 << offs)) | (((val.0 as u32) & 0x07) << offs); | ||
| 2092 | } | ||
| 2093 | #[doc = "Output compare 3 clear enable"] | ||
| 2094 | pub fn occe(&self, n: usize) -> bool { | ||
| 2095 | assert!(n < 2usize); | ||
| 2096 | let offs = 7usize + n * 8usize; | ||
| 2097 | let val = (self.0 >> offs) & 0x01; | ||
| 2098 | val != 0 | ||
| 2099 | } | ||
| 2100 | #[doc = "Output compare 3 clear enable"] | ||
| 2101 | pub fn set_occe(&mut self, n: usize, val: bool) { | ||
| 2102 | assert!(n < 2usize); | ||
| 2103 | let offs = 7usize + n * 8usize; | ||
| 2104 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2105 | } | ||
| 2106 | } | ||
| 2107 | impl Default for CcmrOutput { | ||
| 2108 | fn default() -> CcmrOutput { | ||
| 2109 | CcmrOutput(0) | ||
| 2110 | } | ||
| 2111 | } | ||
| 2112 | #[doc = "auto-reload register"] | ||
| 2113 | #[repr(transparent)] | ||
| 2114 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2115 | pub struct Arr32(pub u32); | ||
| 2116 | impl Arr32 { | ||
| 2117 | #[doc = "Auto-reload value"] | ||
| 2118 | pub const fn arr(&self) -> u32 { | ||
| 2119 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 2120 | val as u32 | ||
| 2121 | } | ||
| 2122 | #[doc = "Auto-reload value"] | ||
| 2123 | pub fn set_arr(&mut self, val: u32) { | ||
| 2124 | self.0 = | ||
| 2125 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 2126 | } | ||
| 2127 | } | ||
| 2128 | impl Default for Arr32 { | ||
| 2129 | fn default() -> Arr32 { | ||
| 2130 | Arr32(0) | ||
| 2131 | } | ||
| 2132 | } | ||
| 2133 | #[doc = "control register 1"] | ||
| 2134 | #[repr(transparent)] | ||
| 2135 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2136 | pub struct Cr1Basic(pub u32); | ||
| 2137 | impl Cr1Basic { | ||
| 2138 | #[doc = "Counter enable"] | ||
| 2139 | pub const fn cen(&self) -> bool { | ||
| 2140 | let val = (self.0 >> 0usize) & 0x01; | ||
| 2141 | val != 0 | ||
| 2142 | } | ||
| 2143 | #[doc = "Counter enable"] | ||
| 2144 | pub fn set_cen(&mut self, val: bool) { | ||
| 2145 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 2146 | } | ||
| 2147 | #[doc = "Update disable"] | ||
| 2148 | pub const fn udis(&self) -> bool { | ||
| 2149 | let val = (self.0 >> 1usize) & 0x01; | ||
| 2150 | val != 0 | ||
| 2151 | } | ||
| 2152 | #[doc = "Update disable"] | ||
| 2153 | pub fn set_udis(&mut self, val: bool) { | ||
| 2154 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 2155 | } | ||
| 2156 | #[doc = "Update request source"] | ||
| 2157 | pub const fn urs(&self) -> super::vals::Urs { | ||
| 2158 | let val = (self.0 >> 2usize) & 0x01; | ||
| 2159 | super::vals::Urs(val as u8) | ||
| 2160 | } | ||
| 2161 | #[doc = "Update request source"] | ||
| 2162 | pub fn set_urs(&mut self, val: super::vals::Urs) { | ||
| 2163 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | ||
| 2164 | } | ||
| 2165 | #[doc = "One-pulse mode"] | ||
| 2166 | pub const fn opm(&self) -> super::vals::Opm { | ||
| 2167 | let val = (self.0 >> 3usize) & 0x01; | ||
| 2168 | super::vals::Opm(val as u8) | ||
| 2169 | } | ||
| 2170 | #[doc = "One-pulse mode"] | ||
| 2171 | pub fn set_opm(&mut self, val: super::vals::Opm) { | ||
| 2172 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | ||
| 2173 | } | ||
| 2174 | #[doc = "Auto-reload preload enable"] | ||
| 2175 | pub const fn arpe(&self) -> super::vals::Arpe { | ||
| 2176 | let val = (self.0 >> 7usize) & 0x01; | ||
| 2177 | super::vals::Arpe(val as u8) | ||
| 2178 | } | ||
| 2179 | #[doc = "Auto-reload preload enable"] | ||
| 2180 | pub fn set_arpe(&mut self, val: super::vals::Arpe) { | ||
| 2181 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | ||
| 2182 | } | ||
| 2183 | } | ||
| 2184 | impl Default for Cr1Basic { | ||
| 2185 | fn default() -> Cr1Basic { | ||
| 2186 | Cr1Basic(0) | ||
| 2187 | } | ||
| 2188 | } | ||
| 2189 | #[doc = "DMA control register"] | ||
| 2190 | #[repr(transparent)] | ||
| 2191 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2192 | pub struct Dcr(pub u32); | ||
| 2193 | impl Dcr { | ||
| 2194 | #[doc = "DMA base address"] | ||
| 2195 | pub const fn dba(&self) -> u8 { | ||
| 2196 | let val = (self.0 >> 0usize) & 0x1f; | ||
| 2197 | val as u8 | ||
| 2198 | } | ||
| 2199 | #[doc = "DMA base address"] | ||
| 2200 | pub fn set_dba(&mut self, val: u8) { | ||
| 2201 | self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); | ||
| 2202 | } | ||
| 2203 | #[doc = "DMA burst length"] | ||
| 2204 | pub const fn dbl(&self) -> u8 { | ||
| 2205 | let val = (self.0 >> 8usize) & 0x1f; | ||
| 2206 | val as u8 | ||
| 2207 | } | ||
| 2208 | #[doc = "DMA burst length"] | ||
| 2209 | pub fn set_dbl(&mut self, val: u8) { | ||
| 2210 | self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); | ||
| 2211 | } | ||
| 2212 | } | ||
| 2213 | impl Default for Dcr { | ||
| 2214 | fn default() -> Dcr { | ||
| 2215 | Dcr(0) | ||
| 2216 | } | ||
| 2217 | } | ||
| 2368 | #[doc = "slave mode control register"] | 2218 | #[doc = "slave mode control register"] |
| 2369 | #[repr(transparent)] | 2219 | #[repr(transparent)] |
| 2370 | #[derive(Copy, Clone, Eq, PartialEq)] | 2220 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -2439,47 +2289,6 @@ pub mod timer_v1 { | |||
| 2439 | Smcr(0) | 2289 | Smcr(0) |
| 2440 | } | 2290 | } |
| 2441 | } | 2291 | } |
| 2442 | #[doc = "capture/compare register 1"] | ||
| 2443 | #[repr(transparent)] | ||
| 2444 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2445 | pub struct Ccr32(pub u32); | ||
| 2446 | impl Ccr32 { | ||
| 2447 | #[doc = "Capture/Compare 1 value"] | ||
| 2448 | pub const fn ccr(&self) -> u32 { | ||
| 2449 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 2450 | val as u32 | ||
| 2451 | } | ||
| 2452 | #[doc = "Capture/Compare 1 value"] | ||
| 2453 | pub fn set_ccr(&mut self, val: u32) { | ||
| 2454 | self.0 = | ||
| 2455 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 2456 | } | ||
| 2457 | } | ||
| 2458 | impl Default for Ccr32 { | ||
| 2459 | fn default() -> Ccr32 { | ||
| 2460 | Ccr32(0) | ||
| 2461 | } | ||
| 2462 | } | ||
| 2463 | #[doc = "control register 2"] | ||
| 2464 | #[repr(transparent)] | ||
| 2465 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2466 | pub struct Cr2Basic(pub u32); | ||
| 2467 | impl Cr2Basic { | ||
| 2468 | #[doc = "Master mode selection"] | ||
| 2469 | pub const fn mms(&self) -> super::vals::Mms { | ||
| 2470 | let val = (self.0 >> 4usize) & 0x07; | ||
| 2471 | super::vals::Mms(val as u8) | ||
| 2472 | } | ||
| 2473 | #[doc = "Master mode selection"] | ||
| 2474 | pub fn set_mms(&mut self, val: super::vals::Mms) { | ||
| 2475 | self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); | ||
| 2476 | } | ||
| 2477 | } | ||
| 2478 | impl Default for Cr2Basic { | ||
| 2479 | fn default() -> Cr2Basic { | ||
| 2480 | Cr2Basic(0) | ||
| 2481 | } | ||
| 2482 | } | ||
| 2483 | #[doc = "counter"] | 2292 | #[doc = "counter"] |
| 2484 | #[repr(transparent)] | 2293 | #[repr(transparent)] |
| 2485 | #[derive(Copy, Clone, Eq, PartialEq)] | 2294 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -2501,183 +2310,154 @@ pub mod timer_v1 { | |||
| 2501 | Cnt32(0) | 2310 | Cnt32(0) |
| 2502 | } | 2311 | } |
| 2503 | } | 2312 | } |
| 2504 | #[doc = "status register"] | 2313 | #[doc = "control register 1"] |
| 2505 | #[repr(transparent)] | 2314 | #[repr(transparent)] |
| 2506 | #[derive(Copy, Clone, Eq, PartialEq)] | 2315 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2507 | pub struct SrGp(pub u32); | 2316 | pub struct Cr1Gp(pub u32); |
| 2508 | impl SrGp { | 2317 | impl Cr1Gp { |
| 2509 | #[doc = "Update interrupt flag"] | 2318 | #[doc = "Counter enable"] |
| 2510 | pub const fn uif(&self) -> bool { | 2319 | pub const fn cen(&self) -> bool { |
| 2511 | let val = (self.0 >> 0usize) & 0x01; | 2320 | let val = (self.0 >> 0usize) & 0x01; |
| 2512 | val != 0 | 2321 | val != 0 |
| 2513 | } | 2322 | } |
| 2514 | #[doc = "Update interrupt flag"] | 2323 | #[doc = "Counter enable"] |
| 2515 | pub fn set_uif(&mut self, val: bool) { | 2324 | pub fn set_cen(&mut self, val: bool) { |
| 2516 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 2325 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 2517 | } | 2326 | } |
| 2518 | #[doc = "Capture/compare 1 interrupt flag"] | 2327 | #[doc = "Update disable"] |
| 2519 | pub fn ccif(&self, n: usize) -> bool { | 2328 | pub const fn udis(&self) -> bool { |
| 2520 | assert!(n < 4usize); | 2329 | let val = (self.0 >> 1usize) & 0x01; |
| 2521 | let offs = 1usize + n * 1usize; | ||
| 2522 | let val = (self.0 >> offs) & 0x01; | ||
| 2523 | val != 0 | 2330 | val != 0 |
| 2524 | } | 2331 | } |
| 2525 | #[doc = "Capture/compare 1 interrupt flag"] | 2332 | #[doc = "Update disable"] |
| 2526 | pub fn set_ccif(&mut self, n: usize, val: bool) { | 2333 | pub fn set_udis(&mut self, val: bool) { |
| 2527 | assert!(n < 4usize); | 2334 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 2528 | let offs = 1usize + n * 1usize; | ||
| 2529 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2530 | } | 2335 | } |
| 2531 | #[doc = "COM interrupt flag"] | 2336 | #[doc = "Update request source"] |
| 2532 | pub const fn comif(&self) -> bool { | 2337 | pub const fn urs(&self) -> super::vals::Urs { |
| 2533 | let val = (self.0 >> 5usize) & 0x01; | 2338 | let val = (self.0 >> 2usize) & 0x01; |
| 2534 | val != 0 | 2339 | super::vals::Urs(val as u8) |
| 2535 | } | 2340 | } |
| 2536 | #[doc = "COM interrupt flag"] | 2341 | #[doc = "Update request source"] |
| 2537 | pub fn set_comif(&mut self, val: bool) { | 2342 | pub fn set_urs(&mut self, val: super::vals::Urs) { |
| 2538 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 2343 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); |
| 2539 | } | 2344 | } |
| 2540 | #[doc = "Trigger interrupt flag"] | 2345 | #[doc = "One-pulse mode"] |
| 2541 | pub const fn tif(&self) -> bool { | 2346 | pub const fn opm(&self) -> super::vals::Opm { |
| 2542 | let val = (self.0 >> 6usize) & 0x01; | 2347 | let val = (self.0 >> 3usize) & 0x01; |
| 2543 | val != 0 | 2348 | super::vals::Opm(val as u8) |
| 2544 | } | 2349 | } |
| 2545 | #[doc = "Trigger interrupt flag"] | 2350 | #[doc = "One-pulse mode"] |
| 2546 | pub fn set_tif(&mut self, val: bool) { | 2351 | pub fn set_opm(&mut self, val: super::vals::Opm) { |
| 2547 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 2352 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); |
| 2548 | } | 2353 | } |
| 2549 | #[doc = "Break interrupt flag"] | 2354 | #[doc = "Direction"] |
| 2550 | pub const fn bif(&self) -> bool { | 2355 | pub const fn dir(&self) -> super::vals::Dir { |
| 2356 | let val = (self.0 >> 4usize) & 0x01; | ||
| 2357 | super::vals::Dir(val as u8) | ||
| 2358 | } | ||
| 2359 | #[doc = "Direction"] | ||
| 2360 | pub fn set_dir(&mut self, val: super::vals::Dir) { | ||
| 2361 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | ||
| 2362 | } | ||
| 2363 | #[doc = "Center-aligned mode selection"] | ||
| 2364 | pub const fn cms(&self) -> super::vals::Cms { | ||
| 2365 | let val = (self.0 >> 5usize) & 0x03; | ||
| 2366 | super::vals::Cms(val as u8) | ||
| 2367 | } | ||
| 2368 | #[doc = "Center-aligned mode selection"] | ||
| 2369 | pub fn set_cms(&mut self, val: super::vals::Cms) { | ||
| 2370 | self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize); | ||
| 2371 | } | ||
| 2372 | #[doc = "Auto-reload preload enable"] | ||
| 2373 | pub const fn arpe(&self) -> super::vals::Arpe { | ||
| 2551 | let val = (self.0 >> 7usize) & 0x01; | 2374 | let val = (self.0 >> 7usize) & 0x01; |
| 2552 | val != 0 | 2375 | super::vals::Arpe(val as u8) |
| 2553 | } | 2376 | } |
| 2554 | #[doc = "Break interrupt flag"] | 2377 | #[doc = "Auto-reload preload enable"] |
| 2555 | pub fn set_bif(&mut self, val: bool) { | 2378 | pub fn set_arpe(&mut self, val: super::vals::Arpe) { |
| 2556 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 2379 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); |
| 2557 | } | 2380 | } |
| 2558 | #[doc = "Capture/Compare 1 overcapture flag"] | 2381 | #[doc = "Clock division"] |
| 2559 | pub fn ccof(&self, n: usize) -> bool { | 2382 | pub const fn ckd(&self) -> super::vals::Ckd { |
| 2560 | assert!(n < 4usize); | 2383 | let val = (self.0 >> 8usize) & 0x03; |
| 2561 | let offs = 9usize + n * 1usize; | 2384 | super::vals::Ckd(val as u8) |
| 2562 | let val = (self.0 >> offs) & 0x01; | ||
| 2563 | val != 0 | ||
| 2564 | } | 2385 | } |
| 2565 | #[doc = "Capture/Compare 1 overcapture flag"] | 2386 | #[doc = "Clock division"] |
| 2566 | pub fn set_ccof(&mut self, n: usize, val: bool) { | 2387 | pub fn set_ckd(&mut self, val: super::vals::Ckd) { |
| 2567 | assert!(n < 4usize); | 2388 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); |
| 2568 | let offs = 9usize + n * 1usize; | ||
| 2569 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2570 | } | 2389 | } |
| 2571 | } | 2390 | } |
| 2572 | impl Default for SrGp { | 2391 | impl Default for Cr1Gp { |
| 2573 | fn default() -> SrGp { | 2392 | fn default() -> Cr1Gp { |
| 2574 | SrGp(0) | 2393 | Cr1Gp(0) |
| 2575 | } | 2394 | } |
| 2576 | } | 2395 | } |
| 2577 | #[doc = "prescaler"] | 2396 | #[doc = "DMA address for full transfer"] |
| 2578 | #[repr(transparent)] | 2397 | #[repr(transparent)] |
| 2579 | #[derive(Copy, Clone, Eq, PartialEq)] | 2398 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2580 | pub struct Psc(pub u32); | 2399 | pub struct Dmar(pub u32); |
| 2581 | impl Psc { | 2400 | impl Dmar { |
| 2582 | #[doc = "Prescaler value"] | 2401 | #[doc = "DMA register for burst accesses"] |
| 2583 | pub const fn psc(&self) -> u16 { | 2402 | pub const fn dmab(&self) -> u16 { |
| 2584 | let val = (self.0 >> 0usize) & 0xffff; | 2403 | let val = (self.0 >> 0usize) & 0xffff; |
| 2585 | val as u16 | 2404 | val as u16 |
| 2586 | } | 2405 | } |
| 2587 | #[doc = "Prescaler value"] | 2406 | #[doc = "DMA register for burst accesses"] |
| 2588 | pub fn set_psc(&mut self, val: u16) { | 2407 | pub fn set_dmab(&mut self, val: u16) { |
| 2589 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 2408 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 2590 | } | 2409 | } |
| 2591 | } | 2410 | } |
| 2592 | impl Default for Psc { | 2411 | impl Default for Dmar { |
| 2593 | fn default() -> Psc { | 2412 | fn default() -> Dmar { |
| 2594 | Psc(0) | 2413 | Dmar(0) |
| 2595 | } | 2414 | } |
| 2596 | } | 2415 | } |
| 2597 | #[doc = "DMA control register"] | 2416 | #[doc = "counter"] |
| 2598 | #[repr(transparent)] | 2417 | #[repr(transparent)] |
| 2599 | #[derive(Copy, Clone, Eq, PartialEq)] | 2418 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2600 | pub struct Dcr(pub u32); | 2419 | pub struct Cnt16(pub u32); |
| 2601 | impl Dcr { | 2420 | impl Cnt16 { |
| 2602 | #[doc = "DMA base address"] | 2421 | #[doc = "counter value"] |
| 2603 | pub const fn dba(&self) -> u8 { | 2422 | pub const fn cnt(&self) -> u16 { |
| 2604 | let val = (self.0 >> 0usize) & 0x1f; | 2423 | let val = (self.0 >> 0usize) & 0xffff; |
| 2605 | val as u8 | 2424 | val as u16 |
| 2606 | } | ||
| 2607 | #[doc = "DMA base address"] | ||
| 2608 | pub fn set_dba(&mut self, val: u8) { | ||
| 2609 | self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); | ||
| 2610 | } | ||
| 2611 | #[doc = "DMA burst length"] | ||
| 2612 | pub const fn dbl(&self) -> u8 { | ||
| 2613 | let val = (self.0 >> 8usize) & 0x1f; | ||
| 2614 | val as u8 | ||
| 2615 | } | 2425 | } |
| 2616 | #[doc = "DMA burst length"] | 2426 | #[doc = "counter value"] |
| 2617 | pub fn set_dbl(&mut self, val: u8) { | 2427 | pub fn set_cnt(&mut self, val: u16) { |
| 2618 | self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); | 2428 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 2619 | } | 2429 | } |
| 2620 | } | 2430 | } |
| 2621 | impl Default for Dcr { | 2431 | impl Default for Cnt16 { |
| 2622 | fn default() -> Dcr { | 2432 | fn default() -> Cnt16 { |
| 2623 | Dcr(0) | 2433 | Cnt16(0) |
| 2624 | } | 2434 | } |
| 2625 | } | 2435 | } |
| 2626 | #[doc = "capture/compare enable register"] | 2436 | #[doc = "event generation register"] |
| 2627 | #[repr(transparent)] | 2437 | #[repr(transparent)] |
| 2628 | #[derive(Copy, Clone, Eq, PartialEq)] | 2438 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2629 | pub struct CcerGp(pub u32); | 2439 | pub struct EgrBasic(pub u32); |
| 2630 | impl CcerGp { | 2440 | impl EgrBasic { |
| 2631 | #[doc = "Capture/Compare 1 output enable"] | 2441 | #[doc = "Update generation"] |
| 2632 | pub fn cce(&self, n: usize) -> bool { | 2442 | pub const fn ug(&self) -> bool { |
| 2633 | assert!(n < 4usize); | 2443 | let val = (self.0 >> 0usize) & 0x01; |
| 2634 | let offs = 0usize + n * 4usize; | ||
| 2635 | let val = (self.0 >> offs) & 0x01; | ||
| 2636 | val != 0 | ||
| 2637 | } | ||
| 2638 | #[doc = "Capture/Compare 1 output enable"] | ||
| 2639 | pub fn set_cce(&mut self, n: usize, val: bool) { | ||
| 2640 | assert!(n < 4usize); | ||
| 2641 | let offs = 0usize + n * 4usize; | ||
| 2642 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2643 | } | ||
| 2644 | #[doc = "Capture/Compare 1 output Polarity"] | ||
| 2645 | pub fn ccp(&self, n: usize) -> bool { | ||
| 2646 | assert!(n < 4usize); | ||
| 2647 | let offs = 1usize + n * 4usize; | ||
| 2648 | let val = (self.0 >> offs) & 0x01; | ||
| 2649 | val != 0 | ||
| 2650 | } | ||
| 2651 | #[doc = "Capture/Compare 1 output Polarity"] | ||
| 2652 | pub fn set_ccp(&mut self, n: usize, val: bool) { | ||
| 2653 | assert!(n < 4usize); | ||
| 2654 | let offs = 1usize + n * 4usize; | ||
| 2655 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2656 | } | ||
| 2657 | #[doc = "Capture/Compare 1 output Polarity"] | ||
| 2658 | pub fn ccnp(&self, n: usize) -> bool { | ||
| 2659 | assert!(n < 4usize); | ||
| 2660 | let offs = 3usize + n * 4usize; | ||
| 2661 | let val = (self.0 >> offs) & 0x01; | ||
| 2662 | val != 0 | 2444 | val != 0 |
| 2663 | } | 2445 | } |
| 2664 | #[doc = "Capture/Compare 1 output Polarity"] | 2446 | #[doc = "Update generation"] |
| 2665 | pub fn set_ccnp(&mut self, n: usize, val: bool) { | 2447 | pub fn set_ug(&mut self, val: bool) { |
| 2666 | assert!(n < 4usize); | 2448 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 2667 | let offs = 3usize + n * 4usize; | ||
| 2668 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2669 | } | 2449 | } |
| 2670 | } | 2450 | } |
| 2671 | impl Default for CcerGp { | 2451 | impl Default for EgrBasic { |
| 2672 | fn default() -> CcerGp { | 2452 | fn default() -> EgrBasic { |
| 2673 | CcerGp(0) | 2453 | EgrBasic(0) |
| 2674 | } | 2454 | } |
| 2675 | } | 2455 | } |
| 2676 | #[doc = "status register"] | 2456 | #[doc = "status register"] |
| 2677 | #[repr(transparent)] | 2457 | #[repr(transparent)] |
| 2678 | #[derive(Copy, Clone, Eq, PartialEq)] | 2458 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2679 | pub struct SrAdv(pub u32); | 2459 | pub struct SrGp(pub u32); |
| 2680 | impl SrAdv { | 2460 | impl SrGp { |
| 2681 | #[doc = "Update interrupt flag"] | 2461 | #[doc = "Update interrupt flag"] |
| 2682 | pub const fn uif(&self) -> bool { | 2462 | pub const fn uif(&self) -> bool { |
| 2683 | let val = (self.0 >> 0usize) & 0x01; | 2463 | let val = (self.0 >> 0usize) & 0x01; |
| @@ -2741,110 +2521,29 @@ pub mod timer_v1 { | |||
| 2741 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 2521 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 2742 | } | 2522 | } |
| 2743 | } | 2523 | } |
| 2744 | impl Default for SrAdv { | 2524 | impl Default for SrGp { |
| 2745 | fn default() -> SrAdv { | 2525 | fn default() -> SrGp { |
| 2746 | SrAdv(0) | 2526 | SrGp(0) |
| 2747 | } | ||
| 2748 | } | ||
| 2749 | #[doc = "capture/compare register 1"] | ||
| 2750 | #[repr(transparent)] | ||
| 2751 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2752 | pub struct Ccr16(pub u32); | ||
| 2753 | impl Ccr16 { | ||
| 2754 | #[doc = "Capture/Compare 1 value"] | ||
| 2755 | pub const fn ccr(&self) -> u16 { | ||
| 2756 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 2757 | val as u16 | ||
| 2758 | } | ||
| 2759 | #[doc = "Capture/Compare 1 value"] | ||
| 2760 | pub fn set_ccr(&mut self, val: u16) { | ||
| 2761 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 2762 | } | ||
| 2763 | } | ||
| 2764 | impl Default for Ccr16 { | ||
| 2765 | fn default() -> Ccr16 { | ||
| 2766 | Ccr16(0) | ||
| 2767 | } | ||
| 2768 | } | ||
| 2769 | #[doc = "event generation register"] | ||
| 2770 | #[repr(transparent)] | ||
| 2771 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2772 | pub struct EgrAdv(pub u32); | ||
| 2773 | impl EgrAdv { | ||
| 2774 | #[doc = "Update generation"] | ||
| 2775 | pub const fn ug(&self) -> bool { | ||
| 2776 | let val = (self.0 >> 0usize) & 0x01; | ||
| 2777 | val != 0 | ||
| 2778 | } | ||
| 2779 | #[doc = "Update generation"] | ||
| 2780 | pub fn set_ug(&mut self, val: bool) { | ||
| 2781 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 2782 | } | ||
| 2783 | #[doc = "Capture/compare 1 generation"] | ||
| 2784 | pub fn ccg(&self, n: usize) -> bool { | ||
| 2785 | assert!(n < 4usize); | ||
| 2786 | let offs = 1usize + n * 1usize; | ||
| 2787 | let val = (self.0 >> offs) & 0x01; | ||
| 2788 | val != 0 | ||
| 2789 | } | ||
| 2790 | #[doc = "Capture/compare 1 generation"] | ||
| 2791 | pub fn set_ccg(&mut self, n: usize, val: bool) { | ||
| 2792 | assert!(n < 4usize); | ||
| 2793 | let offs = 1usize + n * 1usize; | ||
| 2794 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2795 | } | ||
| 2796 | #[doc = "Capture/Compare control update generation"] | ||
| 2797 | pub const fn comg(&self) -> bool { | ||
| 2798 | let val = (self.0 >> 5usize) & 0x01; | ||
| 2799 | val != 0 | ||
| 2800 | } | ||
| 2801 | #[doc = "Capture/Compare control update generation"] | ||
| 2802 | pub fn set_comg(&mut self, val: bool) { | ||
| 2803 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 2804 | } | ||
| 2805 | #[doc = "Trigger generation"] | ||
| 2806 | pub const fn tg(&self) -> bool { | ||
| 2807 | let val = (self.0 >> 6usize) & 0x01; | ||
| 2808 | val != 0 | ||
| 2809 | } | ||
| 2810 | #[doc = "Trigger generation"] | ||
| 2811 | pub fn set_tg(&mut self, val: bool) { | ||
| 2812 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 2813 | } | ||
| 2814 | #[doc = "Break generation"] | ||
| 2815 | pub const fn bg(&self) -> bool { | ||
| 2816 | let val = (self.0 >> 7usize) & 0x01; | ||
| 2817 | val != 0 | ||
| 2818 | } | ||
| 2819 | #[doc = "Break generation"] | ||
| 2820 | pub fn set_bg(&mut self, val: bool) { | ||
| 2821 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 2822 | } | ||
| 2823 | } | ||
| 2824 | impl Default for EgrAdv { | ||
| 2825 | fn default() -> EgrAdv { | ||
| 2826 | EgrAdv(0) | ||
| 2827 | } | 2527 | } |
| 2828 | } | 2528 | } |
| 2829 | #[doc = "auto-reload register"] | 2529 | #[doc = "control register 2"] |
| 2830 | #[repr(transparent)] | 2530 | #[repr(transparent)] |
| 2831 | #[derive(Copy, Clone, Eq, PartialEq)] | 2531 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2832 | pub struct Arr32(pub u32); | 2532 | pub struct Cr2Basic(pub u32); |
| 2833 | impl Arr32 { | 2533 | impl Cr2Basic { |
| 2834 | #[doc = "Auto-reload value"] | 2534 | #[doc = "Master mode selection"] |
| 2835 | pub const fn arr(&self) -> u32 { | 2535 | pub const fn mms(&self) -> super::vals::Mms { |
| 2836 | let val = (self.0 >> 0usize) & 0xffff_ffff; | 2536 | let val = (self.0 >> 4usize) & 0x07; |
| 2837 | val as u32 | 2537 | super::vals::Mms(val as u8) |
| 2838 | } | 2538 | } |
| 2839 | #[doc = "Auto-reload value"] | 2539 | #[doc = "Master mode selection"] |
| 2840 | pub fn set_arr(&mut self, val: u32) { | 2540 | pub fn set_mms(&mut self, val: super::vals::Mms) { |
| 2841 | self.0 = | 2541 | self.0 = (self.0 & !(0x07 << 4usize)) | (((val.0 as u32) & 0x07) << 4usize); |
| 2842 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 2843 | } | 2542 | } |
| 2844 | } | 2543 | } |
| 2845 | impl Default for Arr32 { | 2544 | impl Default for Cr2Basic { |
| 2846 | fn default() -> Arr32 { | 2545 | fn default() -> Cr2Basic { |
| 2847 | Arr32(0) | 2546 | Cr2Basic(0) |
| 2848 | } | 2547 | } |
| 2849 | } | 2548 | } |
| 2850 | #[doc = "control register 2"] | 2549 | #[doc = "control register 2"] |
| @@ -2943,136 +2642,77 @@ pub mod timer_v1 { | |||
| 2943 | Cr2Adv(0) | 2642 | Cr2Adv(0) |
| 2944 | } | 2643 | } |
| 2945 | } | 2644 | } |
| 2946 | #[doc = "capture/compare mode register 2 (output mode)"] | 2645 | #[doc = "DMA/Interrupt enable register"] |
| 2947 | #[repr(transparent)] | 2646 | #[repr(transparent)] |
| 2948 | #[derive(Copy, Clone, Eq, PartialEq)] | 2647 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 2949 | pub struct CcmrOutput(pub u32); | 2648 | pub struct DierGp(pub u32); |
| 2950 | impl CcmrOutput { | 2649 | impl DierGp { |
| 2951 | #[doc = "Capture/Compare 3 selection"] | 2650 | #[doc = "Update interrupt enable"] |
| 2952 | pub fn ccs(&self, n: usize) -> super::vals::CcmrOutputCcs { | 2651 | pub const fn uie(&self) -> bool { |
| 2953 | assert!(n < 2usize); | 2652 | let val = (self.0 >> 0usize) & 0x01; |
| 2954 | let offs = 0usize + n * 8usize; | 2653 | val != 0 |
| 2955 | let val = (self.0 >> offs) & 0x03; | ||
| 2956 | super::vals::CcmrOutputCcs(val as u8) | ||
| 2957 | } | 2654 | } |
| 2958 | #[doc = "Capture/Compare 3 selection"] | 2655 | #[doc = "Update interrupt enable"] |
| 2959 | pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrOutputCcs) { | 2656 | pub fn set_uie(&mut self, val: bool) { |
| 2960 | assert!(n < 2usize); | 2657 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 2961 | let offs = 0usize + n * 8usize; | ||
| 2962 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 2963 | } | 2658 | } |
| 2964 | #[doc = "Output compare 3 fast enable"] | 2659 | #[doc = "Capture/Compare 1 interrupt enable"] |
| 2965 | pub fn ocfe(&self, n: usize) -> bool { | 2660 | pub fn ccie(&self, n: usize) -> bool { |
| 2966 | assert!(n < 2usize); | 2661 | assert!(n < 4usize); |
| 2967 | let offs = 2usize + n * 8usize; | 2662 | let offs = 1usize + n * 1usize; |
| 2968 | let val = (self.0 >> offs) & 0x01; | 2663 | let val = (self.0 >> offs) & 0x01; |
| 2969 | val != 0 | 2664 | val != 0 |
| 2970 | } | 2665 | } |
| 2971 | #[doc = "Output compare 3 fast enable"] | 2666 | #[doc = "Capture/Compare 1 interrupt enable"] |
| 2972 | pub fn set_ocfe(&mut self, n: usize, val: bool) { | 2667 | pub fn set_ccie(&mut self, n: usize, val: bool) { |
| 2973 | assert!(n < 2usize); | 2668 | assert!(n < 4usize); |
| 2974 | let offs = 2usize + n * 8usize; | 2669 | let offs = 1usize + n * 1usize; |
| 2975 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 2670 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 2976 | } | 2671 | } |
| 2977 | #[doc = "Output compare 3 preload enable"] | 2672 | #[doc = "Trigger interrupt enable"] |
| 2978 | pub fn ocpe(&self, n: usize) -> super::vals::Ocpe { | 2673 | pub const fn tie(&self) -> bool { |
| 2979 | assert!(n < 2usize); | 2674 | let val = (self.0 >> 6usize) & 0x01; |
| 2980 | let offs = 3usize + n * 8usize; | 2675 | val != 0 |
| 2981 | let val = (self.0 >> offs) & 0x01; | ||
| 2982 | super::vals::Ocpe(val as u8) | ||
| 2983 | } | 2676 | } |
| 2984 | #[doc = "Output compare 3 preload enable"] | 2677 | #[doc = "Trigger interrupt enable"] |
| 2985 | pub fn set_ocpe(&mut self, n: usize, val: super::vals::Ocpe) { | 2678 | pub fn set_tie(&mut self, val: bool) { |
| 2986 | assert!(n < 2usize); | 2679 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 2987 | let offs = 3usize + n * 8usize; | ||
| 2988 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 2989 | } | 2680 | } |
| 2990 | #[doc = "Output compare 3 mode"] | 2681 | #[doc = "Update DMA request enable"] |
| 2991 | pub fn ocm(&self, n: usize) -> super::vals::Ocm { | 2682 | pub const fn ude(&self) -> bool { |
| 2992 | assert!(n < 2usize); | 2683 | let val = (self.0 >> 8usize) & 0x01; |
| 2993 | let offs = 4usize + n * 8usize; | 2684 | val != 0 |
| 2994 | let val = (self.0 >> offs) & 0x07; | ||
| 2995 | super::vals::Ocm(val as u8) | ||
| 2996 | } | 2685 | } |
| 2997 | #[doc = "Output compare 3 mode"] | 2686 | #[doc = "Update DMA request enable"] |
| 2998 | pub fn set_ocm(&mut self, n: usize, val: super::vals::Ocm) { | 2687 | pub fn set_ude(&mut self, val: bool) { |
| 2999 | assert!(n < 2usize); | 2688 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 3000 | let offs = 4usize + n * 8usize; | ||
| 3001 | self.0 = (self.0 & !(0x07 << offs)) | (((val.0 as u32) & 0x07) << offs); | ||
| 3002 | } | 2689 | } |
| 3003 | #[doc = "Output compare 3 clear enable"] | 2690 | #[doc = "Capture/Compare 1 DMA request enable"] |
| 3004 | pub fn occe(&self, n: usize) -> bool { | 2691 | pub fn ccde(&self, n: usize) -> bool { |
| 3005 | assert!(n < 2usize); | 2692 | assert!(n < 4usize); |
| 3006 | let offs = 7usize + n * 8usize; | 2693 | let offs = 9usize + n * 1usize; |
| 3007 | let val = (self.0 >> offs) & 0x01; | 2694 | let val = (self.0 >> offs) & 0x01; |
| 3008 | val != 0 | 2695 | val != 0 |
| 3009 | } | 2696 | } |
| 3010 | #[doc = "Output compare 3 clear enable"] | 2697 | #[doc = "Capture/Compare 1 DMA request enable"] |
| 3011 | pub fn set_occe(&mut self, n: usize, val: bool) { | 2698 | pub fn set_ccde(&mut self, n: usize, val: bool) { |
| 3012 | assert!(n < 2usize); | 2699 | assert!(n < 4usize); |
| 3013 | let offs = 7usize + n * 8usize; | 2700 | let offs = 9usize + n * 1usize; |
| 3014 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 2701 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 3015 | } | 2702 | } |
| 3016 | } | 2703 | #[doc = "Trigger DMA request enable"] |
| 3017 | impl Default for CcmrOutput { | 2704 | pub const fn tde(&self) -> bool { |
| 3018 | fn default() -> CcmrOutput { | 2705 | let val = (self.0 >> 14usize) & 0x01; |
| 3019 | CcmrOutput(0) | ||
| 3020 | } | ||
| 3021 | } | ||
| 3022 | #[doc = "control register 1"] | ||
| 3023 | #[repr(transparent)] | ||
| 3024 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 3025 | pub struct Cr1Basic(pub u32); | ||
| 3026 | impl Cr1Basic { | ||
| 3027 | #[doc = "Counter enable"] | ||
| 3028 | pub const fn cen(&self) -> bool { | ||
| 3029 | let val = (self.0 >> 0usize) & 0x01; | ||
| 3030 | val != 0 | ||
| 3031 | } | ||
| 3032 | #[doc = "Counter enable"] | ||
| 3033 | pub fn set_cen(&mut self, val: bool) { | ||
| 3034 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 3035 | } | ||
| 3036 | #[doc = "Update disable"] | ||
| 3037 | pub const fn udis(&self) -> bool { | ||
| 3038 | let val = (self.0 >> 1usize) & 0x01; | ||
| 3039 | val != 0 | 2706 | val != 0 |
| 3040 | } | 2707 | } |
| 3041 | #[doc = "Update disable"] | 2708 | #[doc = "Trigger DMA request enable"] |
| 3042 | pub fn set_udis(&mut self, val: bool) { | 2709 | pub fn set_tde(&mut self, val: bool) { |
| 3043 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 2710 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); |
| 3044 | } | ||
| 3045 | #[doc = "Update request source"] | ||
| 3046 | pub const fn urs(&self) -> super::vals::Urs { | ||
| 3047 | let val = (self.0 >> 2usize) & 0x01; | ||
| 3048 | super::vals::Urs(val as u8) | ||
| 3049 | } | ||
| 3050 | #[doc = "Update request source"] | ||
| 3051 | pub fn set_urs(&mut self, val: super::vals::Urs) { | ||
| 3052 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | ||
| 3053 | } | ||
| 3054 | #[doc = "One-pulse mode"] | ||
| 3055 | pub const fn opm(&self) -> super::vals::Opm { | ||
| 3056 | let val = (self.0 >> 3usize) & 0x01; | ||
| 3057 | super::vals::Opm(val as u8) | ||
| 3058 | } | ||
| 3059 | #[doc = "One-pulse mode"] | ||
| 3060 | pub fn set_opm(&mut self, val: super::vals::Opm) { | ||
| 3061 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | ||
| 3062 | } | ||
| 3063 | #[doc = "Auto-reload preload enable"] | ||
| 3064 | pub const fn arpe(&self) -> super::vals::Arpe { | ||
| 3065 | let val = (self.0 >> 7usize) & 0x01; | ||
| 3066 | super::vals::Arpe(val as u8) | ||
| 3067 | } | ||
| 3068 | #[doc = "Auto-reload preload enable"] | ||
| 3069 | pub fn set_arpe(&mut self, val: super::vals::Arpe) { | ||
| 3070 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | ||
| 3071 | } | 2711 | } |
| 3072 | } | 2712 | } |
| 3073 | impl Default for Cr1Basic { | 2713 | impl Default for DierGp { |
| 3074 | fn default() -> Cr1Basic { | 2714 | fn default() -> DierGp { |
| 3075 | Cr1Basic(0) | 2715 | DierGp(0) |
| 3076 | } | 2716 | } |
| 3077 | } | 2717 | } |
| 3078 | #[doc = "auto-reload register"] | 2718 | #[doc = "auto-reload register"] |
| @@ -3095,127 +2735,250 @@ pub mod timer_v1 { | |||
| 3095 | Arr16(0) | 2735 | Arr16(0) |
| 3096 | } | 2736 | } |
| 3097 | } | 2737 | } |
| 3098 | #[doc = "DMA/Interrupt enable register"] | 2738 | #[doc = "capture/compare enable register"] |
| 3099 | #[repr(transparent)] | 2739 | #[repr(transparent)] |
| 3100 | #[derive(Copy, Clone, Eq, PartialEq)] | 2740 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3101 | pub struct DierGp(pub u32); | 2741 | pub struct CcerGp(pub u32); |
| 3102 | impl DierGp { | 2742 | impl CcerGp { |
| 3103 | #[doc = "Update interrupt enable"] | 2743 | #[doc = "Capture/Compare 1 output enable"] |
| 3104 | pub const fn uie(&self) -> bool { | 2744 | pub fn cce(&self, n: usize) -> bool { |
| 2745 | assert!(n < 4usize); | ||
| 2746 | let offs = 0usize + n * 4usize; | ||
| 2747 | let val = (self.0 >> offs) & 0x01; | ||
| 2748 | val != 0 | ||
| 2749 | } | ||
| 2750 | #[doc = "Capture/Compare 1 output enable"] | ||
| 2751 | pub fn set_cce(&mut self, n: usize, val: bool) { | ||
| 2752 | assert!(n < 4usize); | ||
| 2753 | let offs = 0usize + n * 4usize; | ||
| 2754 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2755 | } | ||
| 2756 | #[doc = "Capture/Compare 1 output Polarity"] | ||
| 2757 | pub fn ccp(&self, n: usize) -> bool { | ||
| 2758 | assert!(n < 4usize); | ||
| 2759 | let offs = 1usize + n * 4usize; | ||
| 2760 | let val = (self.0 >> offs) & 0x01; | ||
| 2761 | val != 0 | ||
| 2762 | } | ||
| 2763 | #[doc = "Capture/Compare 1 output Polarity"] | ||
| 2764 | pub fn set_ccp(&mut self, n: usize, val: bool) { | ||
| 2765 | assert!(n < 4usize); | ||
| 2766 | let offs = 1usize + n * 4usize; | ||
| 2767 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2768 | } | ||
| 2769 | #[doc = "Capture/Compare 1 output Polarity"] | ||
| 2770 | pub fn ccnp(&self, n: usize) -> bool { | ||
| 2771 | assert!(n < 4usize); | ||
| 2772 | let offs = 3usize + n * 4usize; | ||
| 2773 | let val = (self.0 >> offs) & 0x01; | ||
| 2774 | val != 0 | ||
| 2775 | } | ||
| 2776 | #[doc = "Capture/Compare 1 output Polarity"] | ||
| 2777 | pub fn set_ccnp(&mut self, n: usize, val: bool) { | ||
| 2778 | assert!(n < 4usize); | ||
| 2779 | let offs = 3usize + n * 4usize; | ||
| 2780 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 2781 | } | ||
| 2782 | } | ||
| 2783 | impl Default for CcerGp { | ||
| 2784 | fn default() -> CcerGp { | ||
| 2785 | CcerGp(0) | ||
| 2786 | } | ||
| 2787 | } | ||
| 2788 | #[doc = "status register"] | ||
| 2789 | #[repr(transparent)] | ||
| 2790 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2791 | pub struct SrAdv(pub u32); | ||
| 2792 | impl SrAdv { | ||
| 2793 | #[doc = "Update interrupt flag"] | ||
| 2794 | pub const fn uif(&self) -> bool { | ||
| 3105 | let val = (self.0 >> 0usize) & 0x01; | 2795 | let val = (self.0 >> 0usize) & 0x01; |
| 3106 | val != 0 | 2796 | val != 0 |
| 3107 | } | 2797 | } |
| 3108 | #[doc = "Update interrupt enable"] | 2798 | #[doc = "Update interrupt flag"] |
| 3109 | pub fn set_uie(&mut self, val: bool) { | 2799 | pub fn set_uif(&mut self, val: bool) { |
| 3110 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 2800 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 3111 | } | 2801 | } |
| 3112 | #[doc = "Capture/Compare 1 interrupt enable"] | 2802 | #[doc = "Capture/compare 1 interrupt flag"] |
| 3113 | pub fn ccie(&self, n: usize) -> bool { | 2803 | pub fn ccif(&self, n: usize) -> bool { |
| 3114 | assert!(n < 4usize); | 2804 | assert!(n < 4usize); |
| 3115 | let offs = 1usize + n * 1usize; | 2805 | let offs = 1usize + n * 1usize; |
| 3116 | let val = (self.0 >> offs) & 0x01; | 2806 | let val = (self.0 >> offs) & 0x01; |
| 3117 | val != 0 | 2807 | val != 0 |
| 3118 | } | 2808 | } |
| 3119 | #[doc = "Capture/Compare 1 interrupt enable"] | 2809 | #[doc = "Capture/compare 1 interrupt flag"] |
| 3120 | pub fn set_ccie(&mut self, n: usize, val: bool) { | 2810 | pub fn set_ccif(&mut self, n: usize, val: bool) { |
| 3121 | assert!(n < 4usize); | 2811 | assert!(n < 4usize); |
| 3122 | let offs = 1usize + n * 1usize; | 2812 | let offs = 1usize + n * 1usize; |
| 3123 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 2813 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 3124 | } | 2814 | } |
| 3125 | #[doc = "Trigger interrupt enable"] | 2815 | #[doc = "COM interrupt flag"] |
| 3126 | pub const fn tie(&self) -> bool { | 2816 | pub const fn comif(&self) -> bool { |
| 2817 | let val = (self.0 >> 5usize) & 0x01; | ||
| 2818 | val != 0 | ||
| 2819 | } | ||
| 2820 | #[doc = "COM interrupt flag"] | ||
| 2821 | pub fn set_comif(&mut self, val: bool) { | ||
| 2822 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 2823 | } | ||
| 2824 | #[doc = "Trigger interrupt flag"] | ||
| 2825 | pub const fn tif(&self) -> bool { | ||
| 3127 | let val = (self.0 >> 6usize) & 0x01; | 2826 | let val = (self.0 >> 6usize) & 0x01; |
| 3128 | val != 0 | 2827 | val != 0 |
| 3129 | } | 2828 | } |
| 3130 | #[doc = "Trigger interrupt enable"] | 2829 | #[doc = "Trigger interrupt flag"] |
| 3131 | pub fn set_tie(&mut self, val: bool) { | 2830 | pub fn set_tif(&mut self, val: bool) { |
| 3132 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 2831 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 3133 | } | 2832 | } |
| 3134 | #[doc = "Update DMA request enable"] | 2833 | #[doc = "Break interrupt flag"] |
| 3135 | pub const fn ude(&self) -> bool { | 2834 | pub const fn bif(&self) -> bool { |
| 3136 | let val = (self.0 >> 8usize) & 0x01; | 2835 | let val = (self.0 >> 7usize) & 0x01; |
| 3137 | val != 0 | 2836 | val != 0 |
| 3138 | } | 2837 | } |
| 3139 | #[doc = "Update DMA request enable"] | 2838 | #[doc = "Break interrupt flag"] |
| 3140 | pub fn set_ude(&mut self, val: bool) { | 2839 | pub fn set_bif(&mut self, val: bool) { |
| 3141 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 2840 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 3142 | } | 2841 | } |
| 3143 | #[doc = "Capture/Compare 1 DMA request enable"] | 2842 | #[doc = "Capture/Compare 1 overcapture flag"] |
| 3144 | pub fn ccde(&self, n: usize) -> bool { | 2843 | pub fn ccof(&self, n: usize) -> bool { |
| 3145 | assert!(n < 4usize); | 2844 | assert!(n < 4usize); |
| 3146 | let offs = 9usize + n * 1usize; | 2845 | let offs = 9usize + n * 1usize; |
| 3147 | let val = (self.0 >> offs) & 0x01; | 2846 | let val = (self.0 >> offs) & 0x01; |
| 3148 | val != 0 | 2847 | val != 0 |
| 3149 | } | 2848 | } |
| 3150 | #[doc = "Capture/Compare 1 DMA request enable"] | 2849 | #[doc = "Capture/Compare 1 overcapture flag"] |
| 3151 | pub fn set_ccde(&mut self, n: usize, val: bool) { | 2850 | pub fn set_ccof(&mut self, n: usize, val: bool) { |
| 3152 | assert!(n < 4usize); | 2851 | assert!(n < 4usize); |
| 3153 | let offs = 9usize + n * 1usize; | 2852 | let offs = 9usize + n * 1usize; |
| 3154 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 2853 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 3155 | } | 2854 | } |
| 3156 | #[doc = "Trigger DMA request enable"] | 2855 | } |
| 3157 | pub const fn tde(&self) -> bool { | 2856 | impl Default for SrAdv { |
| 3158 | let val = (self.0 >> 14usize) & 0x01; | 2857 | fn default() -> SrAdv { |
| 3159 | val != 0 | 2858 | SrAdv(0) |
| 3160 | } | 2859 | } |
| 3161 | #[doc = "Trigger DMA request enable"] | 2860 | } |
| 3162 | pub fn set_tde(&mut self, val: bool) { | 2861 | #[doc = "capture/compare register 1"] |
| 3163 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | 2862 | #[repr(transparent)] |
| 2863 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2864 | pub struct Ccr16(pub u32); | ||
| 2865 | impl Ccr16 { | ||
| 2866 | #[doc = "Capture/Compare 1 value"] | ||
| 2867 | pub const fn ccr(&self) -> u16 { | ||
| 2868 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 2869 | val as u16 | ||
| 2870 | } | ||
| 2871 | #[doc = "Capture/Compare 1 value"] | ||
| 2872 | pub fn set_ccr(&mut self, val: u16) { | ||
| 2873 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 3164 | } | 2874 | } |
| 3165 | } | 2875 | } |
| 3166 | impl Default for DierGp { | 2876 | impl Default for Ccr16 { |
| 3167 | fn default() -> DierGp { | 2877 | fn default() -> Ccr16 { |
| 3168 | DierGp(0) | 2878 | Ccr16(0) |
| 3169 | } | 2879 | } |
| 3170 | } | 2880 | } |
| 3171 | #[doc = "capture/compare mode register 1 (input mode)"] | 2881 | #[doc = "repetition counter register"] |
| 3172 | #[repr(transparent)] | 2882 | #[repr(transparent)] |
| 3173 | #[derive(Copy, Clone, Eq, PartialEq)] | 2883 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3174 | pub struct CcmrInput(pub u32); | 2884 | pub struct Rcr(pub u32); |
| 3175 | impl CcmrInput { | 2885 | impl Rcr { |
| 3176 | #[doc = "Capture/Compare 1 selection"] | 2886 | #[doc = "Repetition counter value"] |
| 3177 | pub fn ccs(&self, n: usize) -> super::vals::CcmrInputCcs { | 2887 | pub const fn rep(&self) -> u8 { |
| 3178 | assert!(n < 2usize); | 2888 | let val = (self.0 >> 0usize) & 0xff; |
| 3179 | let offs = 0usize + n * 8usize; | 2889 | val as u8 |
| 3180 | let val = (self.0 >> offs) & 0x03; | ||
| 3181 | super::vals::CcmrInputCcs(val as u8) | ||
| 3182 | } | 2890 | } |
| 3183 | #[doc = "Capture/Compare 1 selection"] | 2891 | #[doc = "Repetition counter value"] |
| 3184 | pub fn set_ccs(&mut self, n: usize, val: super::vals::CcmrInputCcs) { | 2892 | pub fn set_rep(&mut self, val: u8) { |
| 3185 | assert!(n < 2usize); | 2893 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); |
| 3186 | let offs = 0usize + n * 8usize; | ||
| 3187 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 3188 | } | 2894 | } |
| 3189 | #[doc = "Input capture 1 prescaler"] | 2895 | } |
| 3190 | pub fn icpsc(&self, n: usize) -> u8 { | 2896 | impl Default for Rcr { |
| 3191 | assert!(n < 2usize); | 2897 | fn default() -> Rcr { |
| 3192 | let offs = 2usize + n * 8usize; | 2898 | Rcr(0) |
| 3193 | let val = (self.0 >> offs) & 0x03; | 2899 | } |
| 2900 | } | ||
| 2901 | #[doc = "break and dead-time register"] | ||
| 2902 | #[repr(transparent)] | ||
| 2903 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 2904 | pub struct Bdtr(pub u32); | ||
| 2905 | impl Bdtr { | ||
| 2906 | #[doc = "Dead-time generator setup"] | ||
| 2907 | pub const fn dtg(&self) -> u8 { | ||
| 2908 | let val = (self.0 >> 0usize) & 0xff; | ||
| 3194 | val as u8 | 2909 | val as u8 |
| 3195 | } | 2910 | } |
| 3196 | #[doc = "Input capture 1 prescaler"] | 2911 | #[doc = "Dead-time generator setup"] |
| 3197 | pub fn set_icpsc(&mut self, n: usize, val: u8) { | 2912 | pub fn set_dtg(&mut self, val: u8) { |
| 3198 | assert!(n < 2usize); | 2913 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); |
| 3199 | let offs = 2usize + n * 8usize; | ||
| 3200 | self.0 = (self.0 & !(0x03 << offs)) | (((val as u32) & 0x03) << offs); | ||
| 3201 | } | 2914 | } |
| 3202 | #[doc = "Input capture 1 filter"] | 2915 | #[doc = "Lock configuration"] |
| 3203 | pub fn icf(&self, n: usize) -> super::vals::Icf { | 2916 | pub const fn lock(&self) -> u8 { |
| 3204 | assert!(n < 2usize); | 2917 | let val = (self.0 >> 8usize) & 0x03; |
| 3205 | let offs = 4usize + n * 8usize; | 2918 | val as u8 |
| 3206 | let val = (self.0 >> offs) & 0x0f; | ||
| 3207 | super::vals::Icf(val as u8) | ||
| 3208 | } | 2919 | } |
| 3209 | #[doc = "Input capture 1 filter"] | 2920 | #[doc = "Lock configuration"] |
| 3210 | pub fn set_icf(&mut self, n: usize, val: super::vals::Icf) { | 2921 | pub fn set_lock(&mut self, val: u8) { |
| 3211 | assert!(n < 2usize); | 2922 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); |
| 3212 | let offs = 4usize + n * 8usize; | 2923 | } |
| 3213 | self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs); | 2924 | #[doc = "Off-state selection for Idle mode"] |
| 2925 | pub const fn ossi(&self) -> super::vals::Ossi { | ||
| 2926 | let val = (self.0 >> 10usize) & 0x01; | ||
| 2927 | super::vals::Ossi(val as u8) | ||
| 2928 | } | ||
| 2929 | #[doc = "Off-state selection for Idle mode"] | ||
| 2930 | pub fn set_ossi(&mut self, val: super::vals::Ossi) { | ||
| 2931 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | ||
| 2932 | } | ||
| 2933 | #[doc = "Off-state selection for Run mode"] | ||
| 2934 | pub const fn ossr(&self) -> super::vals::Ossr { | ||
| 2935 | let val = (self.0 >> 11usize) & 0x01; | ||
| 2936 | super::vals::Ossr(val as u8) | ||
| 2937 | } | ||
| 2938 | #[doc = "Off-state selection for Run mode"] | ||
| 2939 | pub fn set_ossr(&mut self, val: super::vals::Ossr) { | ||
| 2940 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); | ||
| 2941 | } | ||
| 2942 | #[doc = "Break enable"] | ||
| 2943 | pub const fn bke(&self) -> bool { | ||
| 2944 | let val = (self.0 >> 12usize) & 0x01; | ||
| 2945 | val != 0 | ||
| 2946 | } | ||
| 2947 | #[doc = "Break enable"] | ||
| 2948 | pub fn set_bke(&mut self, val: bool) { | ||
| 2949 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); | ||
| 2950 | } | ||
| 2951 | #[doc = "Break polarity"] | ||
| 2952 | pub const fn bkp(&self) -> bool { | ||
| 2953 | let val = (self.0 >> 13usize) & 0x01; | ||
| 2954 | val != 0 | ||
| 2955 | } | ||
| 2956 | #[doc = "Break polarity"] | ||
| 2957 | pub fn set_bkp(&mut self, val: bool) { | ||
| 2958 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | ||
| 2959 | } | ||
| 2960 | #[doc = "Automatic output enable"] | ||
| 2961 | pub const fn aoe(&self) -> bool { | ||
| 2962 | let val = (self.0 >> 14usize) & 0x01; | ||
| 2963 | val != 0 | ||
| 2964 | } | ||
| 2965 | #[doc = "Automatic output enable"] | ||
| 2966 | pub fn set_aoe(&mut self, val: bool) { | ||
| 2967 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | ||
| 2968 | } | ||
| 2969 | #[doc = "Main output enable"] | ||
| 2970 | pub const fn moe(&self) -> bool { | ||
| 2971 | let val = (self.0 >> 15usize) & 0x01; | ||
| 2972 | val != 0 | ||
| 2973 | } | ||
| 2974 | #[doc = "Main output enable"] | ||
| 2975 | pub fn set_moe(&mut self, val: bool) { | ||
| 2976 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); | ||
| 3214 | } | 2977 | } |
| 3215 | } | 2978 | } |
| 3216 | impl Default for CcmrInput { | 2979 | impl Default for Bdtr { |
| 3217 | fn default() -> CcmrInput { | 2980 | fn default() -> Bdtr { |
| 3218 | CcmrInput(0) | 2981 | Bdtr(0) |
| 3219 | } | 2982 | } |
| 3220 | } | 2983 | } |
| 3221 | #[doc = "DMA/Interrupt enable register"] | 2984 | #[doc = "DMA/Interrupt enable register"] |
| @@ -3247,6 +3010,26 @@ pub mod timer_v1 { | |||
| 3247 | DierBasic(0) | 3010 | DierBasic(0) |
| 3248 | } | 3011 | } |
| 3249 | } | 3012 | } |
| 3013 | #[doc = "status register"] | ||
| 3014 | #[repr(transparent)] | ||
| 3015 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 3016 | pub struct SrBasic(pub u32); | ||
| 3017 | impl SrBasic { | ||
| 3018 | #[doc = "Update interrupt flag"] | ||
| 3019 | pub const fn uif(&self) -> bool { | ||
| 3020 | let val = (self.0 >> 0usize) & 0x01; | ||
| 3021 | val != 0 | ||
| 3022 | } | ||
| 3023 | #[doc = "Update interrupt flag"] | ||
| 3024 | pub fn set_uif(&mut self, val: bool) { | ||
| 3025 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 3026 | } | ||
| 3027 | } | ||
| 3028 | impl Default for SrBasic { | ||
| 3029 | fn default() -> SrBasic { | ||
| 3030 | SrBasic(0) | ||
| 3031 | } | ||
| 3032 | } | ||
| 3250 | #[doc = "capture/compare enable register"] | 3033 | #[doc = "capture/compare enable register"] |
| 3251 | #[repr(transparent)] | 3034 | #[repr(transparent)] |
| 3252 | #[derive(Copy, Clone, Eq, PartialEq)] | 3035 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -3310,127 +3093,85 @@ pub mod timer_v1 { | |||
| 3310 | CcerAdv(0) | 3093 | CcerAdv(0) |
| 3311 | } | 3094 | } |
| 3312 | } | 3095 | } |
| 3313 | #[doc = "status register"] | 3096 | #[doc = "event generation register"] |
| 3314 | #[repr(transparent)] | 3097 | #[repr(transparent)] |
| 3315 | #[derive(Copy, Clone, Eq, PartialEq)] | 3098 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3316 | pub struct SrBasic(pub u32); | 3099 | pub struct EgrGp(pub u32); |
| 3317 | impl SrBasic { | 3100 | impl EgrGp { |
| 3318 | #[doc = "Update interrupt flag"] | 3101 | #[doc = "Update generation"] |
| 3319 | pub const fn uif(&self) -> bool { | 3102 | pub const fn ug(&self) -> bool { |
| 3320 | let val = (self.0 >> 0usize) & 0x01; | 3103 | let val = (self.0 >> 0usize) & 0x01; |
| 3321 | val != 0 | 3104 | val != 0 |
| 3322 | } | 3105 | } |
| 3323 | #[doc = "Update interrupt flag"] | 3106 | #[doc = "Update generation"] |
| 3324 | pub fn set_uif(&mut self, val: bool) { | 3107 | pub fn set_ug(&mut self, val: bool) { |
| 3325 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 3108 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 3326 | } | 3109 | } |
| 3327 | } | 3110 | #[doc = "Capture/compare 1 generation"] |
| 3328 | impl Default for SrBasic { | 3111 | pub fn ccg(&self, n: usize) -> bool { |
| 3329 | fn default() -> SrBasic { | 3112 | assert!(n < 4usize); |
| 3330 | SrBasic(0) | 3113 | let offs = 1usize + n * 1usize; |
| 3331 | } | 3114 | let val = (self.0 >> offs) & 0x01; |
| 3332 | } | ||
| 3333 | #[doc = "control register 1"] | ||
| 3334 | #[repr(transparent)] | ||
| 3335 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 3336 | pub struct Cr1Gp(pub u32); | ||
| 3337 | impl Cr1Gp { | ||
| 3338 | #[doc = "Counter enable"] | ||
| 3339 | pub const fn cen(&self) -> bool { | ||
| 3340 | let val = (self.0 >> 0usize) & 0x01; | ||
| 3341 | val != 0 | 3115 | val != 0 |
| 3342 | } | 3116 | } |
| 3343 | #[doc = "Counter enable"] | 3117 | #[doc = "Capture/compare 1 generation"] |
| 3344 | pub fn set_cen(&mut self, val: bool) { | 3118 | pub fn set_ccg(&mut self, n: usize, val: bool) { |
| 3345 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 3119 | assert!(n < 4usize); |
| 3120 | let offs = 1usize + n * 1usize; | ||
| 3121 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3346 | } | 3122 | } |
| 3347 | #[doc = "Update disable"] | 3123 | #[doc = "Capture/Compare control update generation"] |
| 3348 | pub const fn udis(&self) -> bool { | 3124 | pub const fn comg(&self) -> bool { |
| 3349 | let val = (self.0 >> 1usize) & 0x01; | 3125 | let val = (self.0 >> 5usize) & 0x01; |
| 3350 | val != 0 | 3126 | val != 0 |
| 3351 | } | 3127 | } |
| 3352 | #[doc = "Update disable"] | 3128 | #[doc = "Capture/Compare control update generation"] |
| 3353 | pub fn set_udis(&mut self, val: bool) { | 3129 | pub fn set_comg(&mut self, val: bool) { |
| 3354 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 3130 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 3355 | } | ||
| 3356 | #[doc = "Update request source"] | ||
| 3357 | pub const fn urs(&self) -> super::vals::Urs { | ||
| 3358 | let val = (self.0 >> 2usize) & 0x01; | ||
| 3359 | super::vals::Urs(val as u8) | ||
| 3360 | } | ||
| 3361 | #[doc = "Update request source"] | ||
| 3362 | pub fn set_urs(&mut self, val: super::vals::Urs) { | ||
| 3363 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | ||
| 3364 | } | ||
| 3365 | #[doc = "One-pulse mode"] | ||
| 3366 | pub const fn opm(&self) -> super::vals::Opm { | ||
| 3367 | let val = (self.0 >> 3usize) & 0x01; | ||
| 3368 | super::vals::Opm(val as u8) | ||
| 3369 | } | ||
| 3370 | #[doc = "One-pulse mode"] | ||
| 3371 | pub fn set_opm(&mut self, val: super::vals::Opm) { | ||
| 3372 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | ||
| 3373 | } | ||
| 3374 | #[doc = "Direction"] | ||
| 3375 | pub const fn dir(&self) -> super::vals::Dir { | ||
| 3376 | let val = (self.0 >> 4usize) & 0x01; | ||
| 3377 | super::vals::Dir(val as u8) | ||
| 3378 | } | ||
| 3379 | #[doc = "Direction"] | ||
| 3380 | pub fn set_dir(&mut self, val: super::vals::Dir) { | ||
| 3381 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | ||
| 3382 | } | 3131 | } |
| 3383 | #[doc = "Center-aligned mode selection"] | 3132 | #[doc = "Trigger generation"] |
| 3384 | pub const fn cms(&self) -> super::vals::Cms { | 3133 | pub const fn tg(&self) -> bool { |
| 3385 | let val = (self.0 >> 5usize) & 0x03; | 3134 | let val = (self.0 >> 6usize) & 0x01; |
| 3386 | super::vals::Cms(val as u8) | 3135 | val != 0 |
| 3387 | } | 3136 | } |
| 3388 | #[doc = "Center-aligned mode selection"] | 3137 | #[doc = "Trigger generation"] |
| 3389 | pub fn set_cms(&mut self, val: super::vals::Cms) { | 3138 | pub fn set_tg(&mut self, val: bool) { |
| 3390 | self.0 = (self.0 & !(0x03 << 5usize)) | (((val.0 as u32) & 0x03) << 5usize); | 3139 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 3391 | } | 3140 | } |
| 3392 | #[doc = "Auto-reload preload enable"] | 3141 | #[doc = "Break generation"] |
| 3393 | pub const fn arpe(&self) -> super::vals::Arpe { | 3142 | pub const fn bg(&self) -> bool { |
| 3394 | let val = (self.0 >> 7usize) & 0x01; | 3143 | let val = (self.0 >> 7usize) & 0x01; |
| 3395 | super::vals::Arpe(val as u8) | 3144 | val != 0 |
| 3396 | } | ||
| 3397 | #[doc = "Auto-reload preload enable"] | ||
| 3398 | pub fn set_arpe(&mut self, val: super::vals::Arpe) { | ||
| 3399 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | ||
| 3400 | } | ||
| 3401 | #[doc = "Clock division"] | ||
| 3402 | pub const fn ckd(&self) -> super::vals::Ckd { | ||
| 3403 | let val = (self.0 >> 8usize) & 0x03; | ||
| 3404 | super::vals::Ckd(val as u8) | ||
| 3405 | } | 3145 | } |
| 3406 | #[doc = "Clock division"] | 3146 | #[doc = "Break generation"] |
| 3407 | pub fn set_ckd(&mut self, val: super::vals::Ckd) { | 3147 | pub fn set_bg(&mut self, val: bool) { |
| 3408 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); | 3148 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 3409 | } | 3149 | } |
| 3410 | } | 3150 | } |
| 3411 | impl Default for Cr1Gp { | 3151 | impl Default for EgrGp { |
| 3412 | fn default() -> Cr1Gp { | 3152 | fn default() -> EgrGp { |
| 3413 | Cr1Gp(0) | 3153 | EgrGp(0) |
| 3414 | } | 3154 | } |
| 3415 | } | 3155 | } |
| 3416 | #[doc = "counter"] | 3156 | #[doc = "capture/compare register 1"] |
| 3417 | #[repr(transparent)] | 3157 | #[repr(transparent)] |
| 3418 | #[derive(Copy, Clone, Eq, PartialEq)] | 3158 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3419 | pub struct Cnt16(pub u32); | 3159 | pub struct Ccr32(pub u32); |
| 3420 | impl Cnt16 { | 3160 | impl Ccr32 { |
| 3421 | #[doc = "counter value"] | 3161 | #[doc = "Capture/Compare 1 value"] |
| 3422 | pub const fn cnt(&self) -> u16 { | 3162 | pub const fn ccr(&self) -> u32 { |
| 3423 | let val = (self.0 >> 0usize) & 0xffff; | 3163 | let val = (self.0 >> 0usize) & 0xffff_ffff; |
| 3424 | val as u16 | 3164 | val as u32 |
| 3425 | } | 3165 | } |
| 3426 | #[doc = "counter value"] | 3166 | #[doc = "Capture/Compare 1 value"] |
| 3427 | pub fn set_cnt(&mut self, val: u16) { | 3167 | pub fn set_ccr(&mut self, val: u32) { |
| 3428 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 3168 | self.0 = |
| 3169 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 3429 | } | 3170 | } |
| 3430 | } | 3171 | } |
| 3431 | impl Default for Cnt16 { | 3172 | impl Default for Ccr32 { |
| 3432 | fn default() -> Cnt16 { | 3173 | fn default() -> Ccr32 { |
| 3433 | Cnt16(0) | 3174 | Ccr32(0) |
| 3434 | } | 3175 | } |
| 3435 | } | 3176 | } |
| 3436 | } | 3177 | } |
| @@ -3438,33 +3179,6 @@ pub mod timer_v1 { | |||
| 3438 | use crate::generic::*; | 3179 | use crate::generic::*; |
| 3439 | #[repr(transparent)] | 3180 | #[repr(transparent)] |
| 3440 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3181 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3441 | pub struct Etp(pub u8); | ||
| 3442 | impl Etp { | ||
| 3443 | #[doc = "ETR is noninverted, active at high level or rising edge"] | ||
| 3444 | pub const NOTINVERTED: Self = Self(0); | ||
| 3445 | #[doc = "ETR is inverted, active at low level or falling edge"] | ||
| 3446 | pub const INVERTED: Self = Self(0x01); | ||
| 3447 | } | ||
| 3448 | #[repr(transparent)] | ||
| 3449 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3450 | pub struct Opm(pub u8); | ||
| 3451 | impl Opm { | ||
| 3452 | #[doc = "Counter is not stopped at update event"] | ||
| 3453 | pub const DISABLED: Self = Self(0); | ||
| 3454 | #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"] | ||
| 3455 | pub const ENABLED: Self = Self(0x01); | ||
| 3456 | } | ||
| 3457 | #[repr(transparent)] | ||
| 3458 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3459 | pub struct Arpe(pub u8); | ||
| 3460 | impl Arpe { | ||
| 3461 | #[doc = "TIMx_APRR register is not buffered"] | ||
| 3462 | pub const DISABLED: Self = Self(0); | ||
| 3463 | #[doc = "TIMx_APRR register is buffered"] | ||
| 3464 | pub const ENABLED: Self = Self(0x01); | ||
| 3465 | } | ||
| 3466 | #[repr(transparent)] | ||
| 3467 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3468 | pub struct Etf(pub u8); | 3182 | pub struct Etf(pub u8); |
| 3469 | impl Etf { | 3183 | impl Etf { |
| 3470 | #[doc = "No filter, sampling is done at fDTS"] | 3184 | #[doc = "No filter, sampling is done at fDTS"] |
| @@ -3502,91 +3216,6 @@ pub mod timer_v1 { | |||
| 3502 | } | 3216 | } |
| 3503 | #[repr(transparent)] | 3217 | #[repr(transparent)] |
| 3504 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3218 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3505 | pub struct Ocm(pub u8); | ||
| 3506 | impl Ocm { | ||
| 3507 | #[doc = "The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs"] | ||
| 3508 | pub const FROZEN: Self = Self(0); | ||
| 3509 | #[doc = "Set channel to active level on match. OCyREF signal is forced high when the counter matches the capture/compare register"] | ||
| 3510 | pub const ACTIVEONMATCH: Self = Self(0x01); | ||
| 3511 | #[doc = "Set channel to inactive level on match. OCyREF signal is forced low when the counter matches the capture/compare register"] | ||
| 3512 | pub const INACTIVEONMATCH: Self = Self(0x02); | ||
| 3513 | #[doc = "OCyREF toggles when TIMx_CNT=TIMx_CCRy"] | ||
| 3514 | pub const TOGGLE: Self = Self(0x03); | ||
| 3515 | #[doc = "OCyREF is forced low"] | ||
| 3516 | pub const FORCEINACTIVE: Self = Self(0x04); | ||
| 3517 | #[doc = "OCyREF is forced high"] | ||
| 3518 | pub const FORCEACTIVE: Self = Self(0x05); | ||
| 3519 | #[doc = "In upcounting, channel is active as long as TIMx_CNT<TIMx_CCRy else inactive. In downcounting, channel is inactive as long as TIMx_CNT>TIMx_CCRy else active"] | ||
| 3520 | pub const PWMMODE1: Self = Self(0x06); | ||
| 3521 | #[doc = "Inversely to PwmMode1"] | ||
| 3522 | pub const PWMMODE2: Self = Self(0x07); | ||
| 3523 | } | ||
| 3524 | #[repr(transparent)] | ||
| 3525 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3526 | pub struct Urs(pub u8); | ||
| 3527 | impl Urs { | ||
| 3528 | #[doc = "Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request"] | ||
| 3529 | pub const ANYEVENT: Self = Self(0); | ||
| 3530 | #[doc = "Only counter overflow/underflow generates an update interrupt or DMA request"] | ||
| 3531 | pub const COUNTERONLY: Self = Self(0x01); | ||
| 3532 | } | ||
| 3533 | #[repr(transparent)] | ||
| 3534 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3535 | pub struct Icf(pub u8); | ||
| 3536 | impl Icf { | ||
| 3537 | #[doc = "No filter, sampling is done at fDTS"] | ||
| 3538 | pub const NOFILTER: Self = Self(0); | ||
| 3539 | #[doc = "fSAMPLING=fCK_INT, N=2"] | ||
| 3540 | pub const FCK_INT_N2: Self = Self(0x01); | ||
| 3541 | #[doc = "fSAMPLING=fCK_INT, N=4"] | ||
| 3542 | pub const FCK_INT_N4: Self = Self(0x02); | ||
| 3543 | #[doc = "fSAMPLING=fCK_INT, N=8"] | ||
| 3544 | pub const FCK_INT_N8: Self = Self(0x03); | ||
| 3545 | #[doc = "fSAMPLING=fDTS/2, N=6"] | ||
| 3546 | pub const FDTS_DIV2_N6: Self = Self(0x04); | ||
| 3547 | #[doc = "fSAMPLING=fDTS/2, N=8"] | ||
| 3548 | pub const FDTS_DIV2_N8: Self = Self(0x05); | ||
| 3549 | #[doc = "fSAMPLING=fDTS/4, N=6"] | ||
| 3550 | pub const FDTS_DIV4_N6: Self = Self(0x06); | ||
| 3551 | #[doc = "fSAMPLING=fDTS/4, N=8"] | ||
| 3552 | pub const FDTS_DIV4_N8: Self = Self(0x07); | ||
| 3553 | #[doc = "fSAMPLING=fDTS/8, N=6"] | ||
| 3554 | pub const FDTS_DIV8_N6: Self = Self(0x08); | ||
| 3555 | #[doc = "fSAMPLING=fDTS/8, N=8"] | ||
| 3556 | pub const FDTS_DIV8_N8: Self = Self(0x09); | ||
| 3557 | #[doc = "fSAMPLING=fDTS/16, N=5"] | ||
| 3558 | pub const FDTS_DIV16_N5: Self = Self(0x0a); | ||
| 3559 | #[doc = "fSAMPLING=fDTS/16, N=6"] | ||
| 3560 | pub const FDTS_DIV16_N6: Self = Self(0x0b); | ||
| 3561 | #[doc = "fSAMPLING=fDTS/16, N=8"] | ||
| 3562 | pub const FDTS_DIV16_N8: Self = Self(0x0c); | ||
| 3563 | #[doc = "fSAMPLING=fDTS/32, N=5"] | ||
| 3564 | pub const FDTS_DIV32_N5: Self = Self(0x0d); | ||
| 3565 | #[doc = "fSAMPLING=fDTS/32, N=6"] | ||
| 3566 | pub const FDTS_DIV32_N6: Self = Self(0x0e); | ||
| 3567 | #[doc = "fSAMPLING=fDTS/32, N=8"] | ||
| 3568 | pub const FDTS_DIV32_N8: Self = Self(0x0f); | ||
| 3569 | } | ||
| 3570 | #[repr(transparent)] | ||
| 3571 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3572 | pub struct Msm(pub u8); | ||
| 3573 | impl Msm { | ||
| 3574 | #[doc = "No action"] | ||
| 3575 | pub const NOSYNC: Self = Self(0); | ||
| 3576 | #[doc = "The effect of an event on the trigger input (TRGI) is delayed to allow a perfect synchronization between the current timer and its slaves (through TRGO). It is useful if we want to synchronize several timers on a single external event."] | ||
| 3577 | pub const SYNC: Self = Self(0x01); | ||
| 3578 | } | ||
| 3579 | #[repr(transparent)] | ||
| 3580 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3581 | pub struct Ece(pub u8); | ||
| 3582 | impl Ece { | ||
| 3583 | #[doc = "External clock mode 2 disabled"] | ||
| 3584 | pub const DISABLED: Self = Self(0); | ||
| 3585 | #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."] | ||
| 3586 | pub const ENABLED: Self = Self(0x01); | ||
| 3587 | } | ||
| 3588 | #[repr(transparent)] | ||
| 3589 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3590 | pub struct Tis(pub u8); | 3219 | pub struct Tis(pub u8); |
| 3591 | impl Tis { | 3220 | impl Tis { |
| 3592 | #[doc = "The TIMx_CH1 pin is connected to TI1 input"] | 3221 | #[doc = "The TIMx_CH1 pin is connected to TI1 input"] |
| @@ -3596,12 +3225,33 @@ pub mod timer_v1 { | |||
| 3596 | } | 3225 | } |
| 3597 | #[repr(transparent)] | 3226 | #[repr(transparent)] |
| 3598 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3227 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3599 | pub struct Ossr(pub u8); | 3228 | pub struct Ccds(pub u8); |
| 3600 | impl Ossr { | 3229 | impl Ccds { |
| 3601 | #[doc = "When inactive, OC/OCN outputs are disabled"] | 3230 | #[doc = "CCx DMA request sent when CCx event occurs"] |
| 3231 | pub const ONCOMPARE: Self = Self(0); | ||
| 3232 | #[doc = "CCx DMA request sent when update event occurs"] | ||
| 3233 | pub const ONUPDATE: Self = Self(0x01); | ||
| 3234 | } | ||
| 3235 | #[repr(transparent)] | ||
| 3236 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3237 | pub struct Sms(pub u8); | ||
| 3238 | impl Sms { | ||
| 3239 | #[doc = "Slave mode disabled - if CEN = ‘1 then the prescaler is clocked directly by the internal clock."] | ||
| 3602 | pub const DISABLED: Self = Self(0); | 3240 | pub const DISABLED: Self = Self(0); |
| 3603 | #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"] | 3241 | #[doc = "Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level."] |
| 3604 | pub const IDLELEVEL: Self = Self(0x01); | 3242 | pub const ENCODER_MODE_1: Self = Self(0x01); |
| 3243 | #[doc = "Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level."] | ||
| 3244 | pub const ENCODER_MODE_2: Self = Self(0x02); | ||
| 3245 | #[doc = "Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input."] | ||
| 3246 | pub const ENCODER_MODE_3: Self = Self(0x03); | ||
| 3247 | #[doc = "Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and generates an update of the registers."] | ||
| 3248 | pub const RESET_MODE: Self = Self(0x04); | ||
| 3249 | #[doc = "Gated Mode - The counter clock is enabled when the trigger input (TRGI) is high. The counter stops (but is not reset) as soon as the trigger becomes low. Both start and stop of the counter are controlled."] | ||
| 3250 | pub const GATED_MODE: Self = Self(0x05); | ||
| 3251 | #[doc = "Trigger Mode - The counter starts at a rising edge of the trigger TRGI (but it is not reset). Only the start of the counter is controlled."] | ||
| 3252 | pub const TRIGGER_MODE: Self = Self(0x06); | ||
| 3253 | #[doc = "External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter."] | ||
| 3254 | pub const EXT_CLOCK_MODE: Self = Self(0x07); | ||
| 3605 | } | 3255 | } |
| 3606 | #[repr(transparent)] | 3256 | #[repr(transparent)] |
| 3607 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3257 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| @@ -3635,26 +3285,6 @@ pub mod timer_v1 { | |||
| 3635 | } | 3285 | } |
| 3636 | #[repr(transparent)] | 3286 | #[repr(transparent)] |
| 3637 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3287 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3638 | pub struct Ckd(pub u8); | ||
| 3639 | impl Ckd { | ||
| 3640 | #[doc = "t_DTS = t_CK_INT"] | ||
| 3641 | pub const DIV1: Self = Self(0); | ||
| 3642 | #[doc = "t_DTS = 2 × t_CK_INT"] | ||
| 3643 | pub const DIV2: Self = Self(0x01); | ||
| 3644 | #[doc = "t_DTS = 4 × t_CK_INT"] | ||
| 3645 | pub const DIV4: Self = Self(0x02); | ||
| 3646 | } | ||
| 3647 | #[repr(transparent)] | ||
| 3648 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3649 | pub struct Ocpe(pub u8); | ||
| 3650 | impl Ocpe { | ||
| 3651 | #[doc = "Preload register on CCR2 disabled. New values written to CCR2 are taken into account immediately"] | ||
| 3652 | pub const DISABLED: Self = Self(0); | ||
| 3653 | #[doc = "Preload register on CCR2 enabled. Preload value is loaded into active register on each update event"] | ||
| 3654 | pub const ENABLED: Self = Self(0x01); | ||
| 3655 | } | ||
| 3656 | #[repr(transparent)] | ||
| 3657 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3658 | pub struct Ossi(pub u8); | 3288 | pub struct Ossi(pub u8); |
| 3659 | impl Ossi { | 3289 | impl Ossi { |
| 3660 | #[doc = "When inactive, OC/OCN outputs are disabled"] | 3290 | #[doc = "When inactive, OC/OCN outputs are disabled"] |
| @@ -3664,27 +3294,28 @@ pub mod timer_v1 { | |||
| 3664 | } | 3294 | } |
| 3665 | #[repr(transparent)] | 3295 | #[repr(transparent)] |
| 3666 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3296 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3667 | pub struct Etps(pub u8); | 3297 | pub struct Urs(pub u8); |
| 3668 | impl Etps { | 3298 | impl Urs { |
| 3669 | #[doc = "Prescaler OFF"] | 3299 | #[doc = "Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request"] |
| 3670 | pub const DIV1: Self = Self(0); | 3300 | pub const ANYEVENT: Self = Self(0); |
| 3671 | #[doc = "ETRP frequency divided by 2"] | 3301 | #[doc = "Only counter overflow/underflow generates an update interrupt or DMA request"] |
| 3672 | pub const DIV2: Self = Self(0x01); | 3302 | pub const COUNTERONLY: Self = Self(0x01); |
| 3673 | #[doc = "ETRP frequency divided by 4"] | ||
| 3674 | pub const DIV4: Self = Self(0x02); | ||
| 3675 | #[doc = "ETRP frequency divided by 8"] | ||
| 3676 | pub const DIV8: Self = Self(0x03); | ||
| 3677 | } | 3303 | } |
| 3678 | #[repr(transparent)] | 3304 | #[repr(transparent)] |
| 3679 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3305 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3680 | pub struct CcmrInputCcs(pub u8); | 3306 | pub struct CcmrOutputCcs(pub u8); |
| 3681 | impl CcmrInputCcs { | 3307 | impl CcmrOutputCcs { |
| 3682 | #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"] | 3308 | #[doc = "CCx channel is configured as output"] |
| 3683 | pub const TI4: Self = Self(0x01); | 3309 | pub const OUTPUT: Self = Self(0); |
| 3684 | #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"] | 3310 | } |
| 3685 | pub const TI3: Self = Self(0x02); | 3311 | #[repr(transparent)] |
| 3686 | #[doc = "CCx channel is configured as input, ICx is mapped on TRC"] | 3312 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3687 | pub const TRC: Self = Self(0x03); | 3313 | pub struct Ossr(pub u8); |
| 3314 | impl Ossr { | ||
| 3315 | #[doc = "When inactive, OC/OCN outputs are disabled"] | ||
| 3316 | pub const DISABLED: Self = Self(0); | ||
| 3317 | #[doc = "When inactive, OC/OCN outputs are enabled with their inactive level"] | ||
| 3318 | pub const IDLELEVEL: Self = Self(0x01); | ||
| 3688 | } | 3319 | } |
| 3689 | #[repr(transparent)] | 3320 | #[repr(transparent)] |
| 3690 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3321 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| @@ -3701,6 +3332,17 @@ pub mod timer_v1 { | |||
| 3701 | } | 3332 | } |
| 3702 | #[repr(transparent)] | 3333 | #[repr(transparent)] |
| 3703 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3334 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3335 | pub struct CcmrInputCcs(pub u8); | ||
| 3336 | impl CcmrInputCcs { | ||
| 3337 | #[doc = "CCx channel is configured as input, normal mapping: ICx mapped to TIx"] | ||
| 3338 | pub const TI4: Self = Self(0x01); | ||
| 3339 | #[doc = "CCx channel is configured as input, alternate mapping (switches 1 with 2, 3 with 4)"] | ||
| 3340 | pub const TI3: Self = Self(0x02); | ||
| 3341 | #[doc = "CCx channel is configured as input, ICx is mapped on TRC"] | ||
| 3342 | pub const TRC: Self = Self(0x03); | ||
| 3343 | } | ||
| 3344 | #[repr(transparent)] | ||
| 3345 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3704 | pub struct Ts(pub u8); | 3346 | pub struct Ts(pub u8); |
| 3705 | impl Ts { | 3347 | impl Ts { |
| 3706 | #[doc = "Internal Trigger 0 (ITR0)"] | 3348 | #[doc = "Internal Trigger 0 (ITR0)"] |
| @@ -3720,77 +3362,173 @@ pub mod timer_v1 { | |||
| 3720 | } | 3362 | } |
| 3721 | #[repr(transparent)] | 3363 | #[repr(transparent)] |
| 3722 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3364 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3723 | pub struct Sms(pub u8); | 3365 | pub struct Ocm(pub u8); |
| 3724 | impl Sms { | 3366 | impl Ocm { |
| 3725 | #[doc = "Slave mode disabled - if CEN = ‘1 then the prescaler is clocked directly by the internal clock."] | 3367 | #[doc = "The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs"] |
| 3368 | pub const FROZEN: Self = Self(0); | ||
| 3369 | #[doc = "Set channel to active level on match. OCyREF signal is forced high when the counter matches the capture/compare register"] | ||
| 3370 | pub const ACTIVEONMATCH: Self = Self(0x01); | ||
| 3371 | #[doc = "Set channel to inactive level on match. OCyREF signal is forced low when the counter matches the capture/compare register"] | ||
| 3372 | pub const INACTIVEONMATCH: Self = Self(0x02); | ||
| 3373 | #[doc = "OCyREF toggles when TIMx_CNT=TIMx_CCRy"] | ||
| 3374 | pub const TOGGLE: Self = Self(0x03); | ||
| 3375 | #[doc = "OCyREF is forced low"] | ||
| 3376 | pub const FORCEINACTIVE: Self = Self(0x04); | ||
| 3377 | #[doc = "OCyREF is forced high"] | ||
| 3378 | pub const FORCEACTIVE: Self = Self(0x05); | ||
| 3379 | #[doc = "In upcounting, channel is active as long as TIMx_CNT<TIMx_CCRy else inactive. In downcounting, channel is inactive as long as TIMx_CNT>TIMx_CCRy else active"] | ||
| 3380 | pub const PWMMODE1: Self = Self(0x06); | ||
| 3381 | #[doc = "Inversely to PwmMode1"] | ||
| 3382 | pub const PWMMODE2: Self = Self(0x07); | ||
| 3383 | } | ||
| 3384 | #[repr(transparent)] | ||
| 3385 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3386 | pub struct Ckd(pub u8); | ||
| 3387 | impl Ckd { | ||
| 3388 | #[doc = "t_DTS = t_CK_INT"] | ||
| 3389 | pub const DIV1: Self = Self(0); | ||
| 3390 | #[doc = "t_DTS = 2 × t_CK_INT"] | ||
| 3391 | pub const DIV2: Self = Self(0x01); | ||
| 3392 | #[doc = "t_DTS = 4 × t_CK_INT"] | ||
| 3393 | pub const DIV4: Self = Self(0x02); | ||
| 3394 | } | ||
| 3395 | #[repr(transparent)] | ||
| 3396 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3397 | pub struct Ece(pub u8); | ||
| 3398 | impl Ece { | ||
| 3399 | #[doc = "External clock mode 2 disabled"] | ||
| 3726 | pub const DISABLED: Self = Self(0); | 3400 | pub const DISABLED: Self = Self(0); |
| 3727 | #[doc = "Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level."] | 3401 | #[doc = "External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal."] |
| 3728 | pub const ENCODER_MODE_1: Self = Self(0x01); | 3402 | pub const ENABLED: Self = Self(0x01); |
| 3729 | #[doc = "Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level."] | ||
| 3730 | pub const ENCODER_MODE_2: Self = Self(0x02); | ||
| 3731 | #[doc = "Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input."] | ||
| 3732 | pub const ENCODER_MODE_3: Self = Self(0x03); | ||
| 3733 | #[doc = "Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and generates an update of the registers."] | ||
| 3734 | pub const RESET_MODE: Self = Self(0x04); | ||
| 3735 | #[doc = "Gated Mode - The counter clock is enabled when the trigger input (TRGI) is high. The counter stops (but is not reset) as soon as the trigger becomes low. Both start and stop of the counter are controlled."] | ||
| 3736 | pub const GATED_MODE: Self = Self(0x05); | ||
| 3737 | #[doc = "Trigger Mode - The counter starts at a rising edge of the trigger TRGI (but it is not reset). Only the start of the counter is controlled."] | ||
| 3738 | pub const TRIGGER_MODE: Self = Self(0x06); | ||
| 3739 | #[doc = "External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter."] | ||
| 3740 | pub const EXT_CLOCK_MODE: Self = Self(0x07); | ||
| 3741 | } | 3403 | } |
| 3742 | #[repr(transparent)] | 3404 | #[repr(transparent)] |
| 3743 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3405 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3744 | pub struct Ccds(pub u8); | 3406 | pub struct Msm(pub u8); |
| 3745 | impl Ccds { | 3407 | impl Msm { |
| 3746 | #[doc = "CCx DMA request sent when CCx event occurs"] | 3408 | #[doc = "No action"] |
| 3747 | pub const ONCOMPARE: Self = Self(0); | 3409 | pub const NOSYNC: Self = Self(0); |
| 3748 | #[doc = "CCx DMA request sent when update event occurs"] | 3410 | #[doc = "The effect of an event on the trigger input (TRGI) is delayed to allow a perfect synchronization between the current timer and its slaves (through TRGO). It is useful if we want to synchronize several timers on a single external event."] |
| 3749 | pub const ONUPDATE: Self = Self(0x01); | 3411 | pub const SYNC: Self = Self(0x01); |
| 3750 | } | 3412 | } |
| 3751 | #[repr(transparent)] | 3413 | #[repr(transparent)] |
| 3752 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3414 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3753 | pub struct CcmrOutputCcs(pub u8); | 3415 | pub struct Etps(pub u8); |
| 3754 | impl CcmrOutputCcs { | 3416 | impl Etps { |
| 3755 | #[doc = "CCx channel is configured as output"] | 3417 | #[doc = "Prescaler OFF"] |
| 3756 | pub const OUTPUT: Self = Self(0); | 3418 | pub const DIV1: Self = Self(0); |
| 3419 | #[doc = "ETRP frequency divided by 2"] | ||
| 3420 | pub const DIV2: Self = Self(0x01); | ||
| 3421 | #[doc = "ETRP frequency divided by 4"] | ||
| 3422 | pub const DIV4: Self = Self(0x02); | ||
| 3423 | #[doc = "ETRP frequency divided by 8"] | ||
| 3424 | pub const DIV8: Self = Self(0x03); | ||
| 3425 | } | ||
| 3426 | #[repr(transparent)] | ||
| 3427 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3428 | pub struct Ocpe(pub u8); | ||
| 3429 | impl Ocpe { | ||
| 3430 | #[doc = "Preload register on CCR2 disabled. New values written to CCR2 are taken into account immediately"] | ||
| 3431 | pub const DISABLED: Self = Self(0); | ||
| 3432 | #[doc = "Preload register on CCR2 enabled. Preload value is loaded into active register on each update event"] | ||
| 3433 | pub const ENABLED: Self = Self(0x01); | ||
| 3434 | } | ||
| 3435 | #[repr(transparent)] | ||
| 3436 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3437 | pub struct Arpe(pub u8); | ||
| 3438 | impl Arpe { | ||
| 3439 | #[doc = "TIMx_APRR register is not buffered"] | ||
| 3440 | pub const DISABLED: Self = Self(0); | ||
| 3441 | #[doc = "TIMx_APRR register is buffered"] | ||
| 3442 | pub const ENABLED: Self = Self(0x01); | ||
| 3443 | } | ||
| 3444 | #[repr(transparent)] | ||
| 3445 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3446 | pub struct Icf(pub u8); | ||
| 3447 | impl Icf { | ||
| 3448 | #[doc = "No filter, sampling is done at fDTS"] | ||
| 3449 | pub const NOFILTER: Self = Self(0); | ||
| 3450 | #[doc = "fSAMPLING=fCK_INT, N=2"] | ||
| 3451 | pub const FCK_INT_N2: Self = Self(0x01); | ||
| 3452 | #[doc = "fSAMPLING=fCK_INT, N=4"] | ||
| 3453 | pub const FCK_INT_N4: Self = Self(0x02); | ||
| 3454 | #[doc = "fSAMPLING=fCK_INT, N=8"] | ||
| 3455 | pub const FCK_INT_N8: Self = Self(0x03); | ||
| 3456 | #[doc = "fSAMPLING=fDTS/2, N=6"] | ||
| 3457 | pub const FDTS_DIV2_N6: Self = Self(0x04); | ||
| 3458 | #[doc = "fSAMPLING=fDTS/2, N=8"] | ||
| 3459 | pub const FDTS_DIV2_N8: Self = Self(0x05); | ||
| 3460 | #[doc = "fSAMPLING=fDTS/4, N=6"] | ||
| 3461 | pub const FDTS_DIV4_N6: Self = Self(0x06); | ||
| 3462 | #[doc = "fSAMPLING=fDTS/4, N=8"] | ||
| 3463 | pub const FDTS_DIV4_N8: Self = Self(0x07); | ||
| 3464 | #[doc = "fSAMPLING=fDTS/8, N=6"] | ||
| 3465 | pub const FDTS_DIV8_N6: Self = Self(0x08); | ||
| 3466 | #[doc = "fSAMPLING=fDTS/8, N=8"] | ||
| 3467 | pub const FDTS_DIV8_N8: Self = Self(0x09); | ||
| 3468 | #[doc = "fSAMPLING=fDTS/16, N=5"] | ||
| 3469 | pub const FDTS_DIV16_N5: Self = Self(0x0a); | ||
| 3470 | #[doc = "fSAMPLING=fDTS/16, N=6"] | ||
| 3471 | pub const FDTS_DIV16_N6: Self = Self(0x0b); | ||
| 3472 | #[doc = "fSAMPLING=fDTS/16, N=8"] | ||
| 3473 | pub const FDTS_DIV16_N8: Self = Self(0x0c); | ||
| 3474 | #[doc = "fSAMPLING=fDTS/32, N=5"] | ||
| 3475 | pub const FDTS_DIV32_N5: Self = Self(0x0d); | ||
| 3476 | #[doc = "fSAMPLING=fDTS/32, N=6"] | ||
| 3477 | pub const FDTS_DIV32_N6: Self = Self(0x0e); | ||
| 3478 | #[doc = "fSAMPLING=fDTS/32, N=8"] | ||
| 3479 | pub const FDTS_DIV32_N8: Self = Self(0x0f); | ||
| 3480 | } | ||
| 3481 | #[repr(transparent)] | ||
| 3482 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3483 | pub struct Opm(pub u8); | ||
| 3484 | impl Opm { | ||
| 3485 | #[doc = "Counter is not stopped at update event"] | ||
| 3486 | pub const DISABLED: Self = Self(0); | ||
| 3487 | #[doc = "Counter stops counting at the next update event (clearing the CEN bit)"] | ||
| 3488 | pub const ENABLED: Self = Self(0x01); | ||
| 3489 | } | ||
| 3490 | #[repr(transparent)] | ||
| 3491 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 3492 | pub struct Etp(pub u8); | ||
| 3493 | impl Etp { | ||
| 3494 | #[doc = "ETR is noninverted, active at high level or rising edge"] | ||
| 3495 | pub const NOTINVERTED: Self = Self(0); | ||
| 3496 | #[doc = "ETR is inverted, active at low level or falling edge"] | ||
| 3497 | pub const INVERTED: Self = Self(0x01); | ||
| 3757 | } | 3498 | } |
| 3758 | } | 3499 | } |
| 3759 | } | 3500 | } |
| 3760 | pub mod spi_v2 { | 3501 | pub mod gpio_v1 { |
| 3761 | use crate::generic::*; | 3502 | use crate::generic::*; |
| 3762 | #[doc = "Serial peripheral interface"] | 3503 | #[doc = "General purpose I/O"] |
| 3763 | #[derive(Copy, Clone)] | 3504 | #[derive(Copy, Clone)] |
| 3764 | pub struct Spi(pub *mut u8); | 3505 | pub struct Gpio(pub *mut u8); |
| 3765 | unsafe impl Send for Spi {} | 3506 | unsafe impl Send for Gpio {} |
| 3766 | unsafe impl Sync for Spi {} | 3507 | unsafe impl Sync for Gpio {} |
| 3767 | impl Spi { | 3508 | impl Gpio { |
| 3768 | #[doc = "control register 1"] | 3509 | #[doc = "Port configuration register low (GPIOn_CRL)"] |
| 3769 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { | 3510 | pub fn cr(self, n: usize) -> Reg<regs::Cr, RW> { |
| 3770 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 3511 | assert!(n < 2usize); |
| 3771 | } | 3512 | unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) } |
| 3772 | #[doc = "control register 2"] | ||
| 3773 | pub fn cr2(self) -> Reg<regs::Cr2, RW> { | ||
| 3774 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 3775 | } | 3513 | } |
| 3776 | #[doc = "status register"] | 3514 | #[doc = "Port input data register (GPIOn_IDR)"] |
| 3777 | pub fn sr(self) -> Reg<regs::Sr, RW> { | 3515 | pub fn idr(self) -> Reg<regs::Idr, R> { |
| 3778 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 3516 | unsafe { Reg::from_ptr(self.0.add(8usize)) } |
| 3779 | } | 3517 | } |
| 3780 | #[doc = "data register"] | 3518 | #[doc = "Port output data register (GPIOn_ODR)"] |
| 3781 | pub fn dr(self) -> Reg<regs::Dr, RW> { | 3519 | pub fn odr(self) -> Reg<regs::Odr, RW> { |
| 3782 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 3520 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 3783 | } | 3521 | } |
| 3784 | #[doc = "CRC polynomial register"] | 3522 | #[doc = "Port bit set/reset register (GPIOn_BSRR)"] |
| 3785 | pub fn crcpr(self) -> Reg<regs::Crcpr, RW> { | 3523 | pub fn bsrr(self) -> Reg<regs::Bsrr, W> { |
| 3786 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 3524 | unsafe { Reg::from_ptr(self.0.add(16usize)) } |
| 3787 | } | 3525 | } |
| 3788 | #[doc = "RX CRC register"] | 3526 | #[doc = "Port bit reset register (GPIOn_BRR)"] |
| 3789 | pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> { | 3527 | pub fn brr(self) -> Reg<regs::Brr, W> { |
| 3790 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 3528 | unsafe { Reg::from_ptr(self.0.add(20usize)) } |
| 3791 | } | 3529 | } |
| 3792 | #[doc = "TX CRC register"] | 3530 | #[doc = "Port configuration lock register"] |
| 3793 | pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> { | 3531 | pub fn lckr(self) -> Reg<regs::Lckr, RW> { |
| 3794 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | 3532 | unsafe { Reg::from_ptr(self.0.add(24usize)) } |
| 3795 | } | 3533 | } |
| 3796 | } | 3534 | } |
| @@ -3798,211 +3536,421 @@ pub mod spi_v2 { | |||
| 3798 | use crate::generic::*; | 3536 | use crate::generic::*; |
| 3799 | #[repr(transparent)] | 3537 | #[repr(transparent)] |
| 3800 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3538 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3801 | pub struct Mstr(pub u8); | 3539 | pub struct Odr(pub u8); |
| 3802 | impl Mstr { | 3540 | impl Odr { |
| 3803 | #[doc = "Slave configuration"] | 3541 | #[doc = "Set output to logic low"] |
| 3804 | pub const SLAVE: Self = Self(0); | 3542 | pub const LOW: Self = Self(0); |
| 3805 | #[doc = "Master configuration"] | 3543 | #[doc = "Set output to logic high"] |
| 3806 | pub const MASTER: Self = Self(0x01); | 3544 | pub const HIGH: Self = Self(0x01); |
| 3807 | } | 3545 | } |
| 3808 | #[repr(transparent)] | 3546 | #[repr(transparent)] |
| 3809 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3547 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3810 | pub struct Frxth(pub u8); | 3548 | pub struct Lckk(pub u8); |
| 3811 | impl Frxth { | 3549 | impl Lckk { |
| 3812 | #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit)"] | 3550 | #[doc = "Port configuration lock key not active"] |
| 3813 | pub const HALF: Self = Self(0); | 3551 | pub const NOTACTIVE: Self = Self(0); |
| 3814 | #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit)"] | 3552 | #[doc = "Port configuration lock key active"] |
| 3815 | pub const QUARTER: Self = Self(0x01); | 3553 | pub const ACTIVE: Self = Self(0x01); |
| 3816 | } | 3554 | } |
| 3817 | #[repr(transparent)] | 3555 | #[repr(transparent)] |
| 3818 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3556 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3819 | pub struct Cpol(pub u8); | 3557 | pub struct Cnf(pub u8); |
| 3820 | impl Cpol { | 3558 | impl Cnf { |
| 3821 | #[doc = "CK to 0 when idle"] | 3559 | #[doc = "Analog mode / Push-Pull mode"] |
| 3822 | pub const IDLELOW: Self = Self(0); | 3560 | pub const PUSHPULL: Self = Self(0); |
| 3823 | #[doc = "CK to 1 when idle"] | 3561 | #[doc = "Floating input (reset state) / Open Drain-Mode"] |
| 3824 | pub const IDLEHIGH: Self = Self(0x01); | 3562 | pub const OPENDRAIN: Self = Self(0x01); |
| 3563 | #[doc = "Input with pull-up/pull-down / Alternate Function Push-Pull Mode"] | ||
| 3564 | pub const ALTPUSHPULL: Self = Self(0x02); | ||
| 3565 | #[doc = "Alternate Function Open-Drain Mode"] | ||
| 3566 | pub const ALTOPENDRAIN: Self = Self(0x03); | ||
| 3825 | } | 3567 | } |
| 3826 | #[repr(transparent)] | 3568 | #[repr(transparent)] |
| 3827 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3569 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3828 | pub struct LdmaTx(pub u8); | 3570 | pub struct Idr(pub u8); |
| 3829 | impl LdmaTx { | 3571 | impl Idr { |
| 3830 | #[doc = "Number of data to transfer for transmit is even"] | 3572 | #[doc = "Input is logic low"] |
| 3831 | pub const EVEN: Self = Self(0); | 3573 | pub const LOW: Self = Self(0); |
| 3832 | #[doc = "Number of data to transfer for transmit is odd"] | 3574 | #[doc = "Input is logic high"] |
| 3833 | pub const ODD: Self = Self(0x01); | 3575 | pub const HIGH: Self = Self(0x01); |
| 3834 | } | 3576 | } |
| 3835 | #[repr(transparent)] | 3577 | #[repr(transparent)] |
| 3836 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3578 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3837 | pub struct Lsbfirst(pub u8); | 3579 | pub struct Bsw(pub u8); |
| 3838 | impl Lsbfirst { | 3580 | impl Bsw { |
| 3839 | #[doc = "Data is transmitted/received with the MSB first"] | 3581 | #[doc = "No action on the corresponding ODx bit"] |
| 3840 | pub const MSBFIRST: Self = Self(0); | 3582 | pub const NOACTION: Self = Self(0); |
| 3841 | #[doc = "Data is transmitted/received with the LSB first"] | 3583 | #[doc = "Sets the corresponding ODRx bit"] |
| 3842 | pub const LSBFIRST: Self = Self(0x01); | 3584 | pub const SET: Self = Self(0x01); |
| 3843 | } | 3585 | } |
| 3844 | #[repr(transparent)] | 3586 | #[repr(transparent)] |
| 3845 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3587 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3846 | pub struct Rxonly(pub u8); | 3588 | pub struct Brw(pub u8); |
| 3847 | impl Rxonly { | 3589 | impl Brw { |
| 3848 | #[doc = "Full duplex (Transmit and receive)"] | 3590 | #[doc = "No action on the corresponding ODx bit"] |
| 3849 | pub const FULLDUPLEX: Self = Self(0); | 3591 | pub const NOACTION: Self = Self(0); |
| 3850 | #[doc = "Output disabled (Receive-only mode)"] | 3592 | #[doc = "Reset the ODx bit"] |
| 3851 | pub const OUTPUTDISABLED: Self = Self(0x01); | 3593 | pub const RESET: Self = Self(0x01); |
| 3852 | } | 3594 | } |
| 3853 | #[repr(transparent)] | 3595 | #[repr(transparent)] |
| 3854 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3596 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3855 | pub struct LdmaRx(pub u8); | 3597 | pub struct Mode(pub u8); |
| 3856 | impl LdmaRx { | 3598 | impl Mode { |
| 3857 | #[doc = "Number of data to transfer for receive is even"] | 3599 | #[doc = "Input mode (reset state)"] |
| 3858 | pub const EVEN: Self = Self(0); | 3600 | pub const INPUT: Self = Self(0); |
| 3859 | #[doc = "Number of data to transfer for receive is odd"] | 3601 | #[doc = "Output mode 10 MHz"] |
| 3860 | pub const ODD: Self = Self(0x01); | 3602 | pub const OUTPUT: Self = Self(0x01); |
| 3603 | #[doc = "Output mode 2 MHz"] | ||
| 3604 | pub const OUTPUT2: Self = Self(0x02); | ||
| 3605 | #[doc = "Output mode 50 MHz"] | ||
| 3606 | pub const OUTPUT50: Self = Self(0x03); | ||
| 3861 | } | 3607 | } |
| 3862 | #[repr(transparent)] | 3608 | #[repr(transparent)] |
| 3863 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3609 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 3864 | pub struct Frer(pub u8); | 3610 | pub struct Lck(pub u8); |
| 3865 | impl Frer { | 3611 | impl Lck { |
| 3866 | #[doc = "No frame format error"] | 3612 | #[doc = "Port configuration not locked"] |
| 3867 | pub const NOERROR: Self = Self(0); | 3613 | pub const UNLOCKED: Self = Self(0); |
| 3868 | #[doc = "A frame format error occurred"] | 3614 | #[doc = "Port configuration locked"] |
| 3869 | pub const ERROR: Self = Self(0x01); | 3615 | pub const LOCKED: Self = Self(0x01); |
| 3870 | } | 3616 | } |
| 3617 | } | ||
| 3618 | pub mod regs { | ||
| 3619 | use crate::generic::*; | ||
| 3620 | #[doc = "Port bit reset register (GPIOn_BRR)"] | ||
| 3871 | #[repr(transparent)] | 3621 | #[repr(transparent)] |
| 3872 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3622 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3873 | pub struct Frf(pub u8); | 3623 | pub struct Brr(pub u32); |
| 3874 | impl Frf { | 3624 | impl Brr { |
| 3875 | #[doc = "SPI Motorola mode"] | 3625 | #[doc = "Reset bit"] |
| 3876 | pub const MOTOROLA: Self = Self(0); | 3626 | pub fn br(&self, n: usize) -> bool { |
| 3877 | #[doc = "SPI TI mode"] | 3627 | assert!(n < 16usize); |
| 3878 | pub const TI: Self = Self(0x01); | 3628 | let offs = 0usize + n * 1usize; |
| 3629 | let val = (self.0 >> offs) & 0x01; | ||
| 3630 | val != 0 | ||
| 3631 | } | ||
| 3632 | #[doc = "Reset bit"] | ||
| 3633 | pub fn set_br(&mut self, n: usize, val: bool) { | ||
| 3634 | assert!(n < 16usize); | ||
| 3635 | let offs = 0usize + n * 1usize; | ||
| 3636 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3637 | } | ||
| 3879 | } | 3638 | } |
| 3880 | #[repr(transparent)] | 3639 | impl Default for Brr { |
| 3881 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3640 | fn default() -> Brr { |
| 3882 | pub struct Crcnext(pub u8); | 3641 | Brr(0) |
| 3883 | impl Crcnext { | 3642 | } |
| 3884 | #[doc = "Next transmit value is from Tx buffer"] | ||
| 3885 | pub const TXBUFFER: Self = Self(0); | ||
| 3886 | #[doc = "Next transmit value is from Tx CRC register"] | ||
| 3887 | pub const CRC: Self = Self(0x01); | ||
| 3888 | } | 3643 | } |
| 3644 | #[doc = "Port input data register (GPIOn_IDR)"] | ||
| 3889 | #[repr(transparent)] | 3645 | #[repr(transparent)] |
| 3890 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3646 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3891 | pub struct Crcl(pub u8); | 3647 | pub struct Idr(pub u32); |
| 3892 | impl Crcl { | 3648 | impl Idr { |
| 3893 | #[doc = "8-bit CRC length"] | 3649 | #[doc = "Port input data"] |
| 3894 | pub const EIGHTBIT: Self = Self(0); | 3650 | pub fn idr(&self, n: usize) -> super::vals::Idr { |
| 3895 | #[doc = "16-bit CRC length"] | 3651 | assert!(n < 16usize); |
| 3896 | pub const SIXTEENBIT: Self = Self(0x01); | 3652 | let offs = 0usize + n * 1usize; |
| 3653 | let val = (self.0 >> offs) & 0x01; | ||
| 3654 | super::vals::Idr(val as u8) | ||
| 3655 | } | ||
| 3656 | #[doc = "Port input data"] | ||
| 3657 | pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { | ||
| 3658 | assert!(n < 16usize); | ||
| 3659 | let offs = 0usize + n * 1usize; | ||
| 3660 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 3661 | } | ||
| 3897 | } | 3662 | } |
| 3898 | #[repr(transparent)] | 3663 | impl Default for Idr { |
| 3899 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3664 | fn default() -> Idr { |
| 3900 | pub struct Ds(pub u8); | 3665 | Idr(0) |
| 3901 | impl Ds { | 3666 | } |
| 3902 | #[doc = "4-bit"] | ||
| 3903 | pub const FOURBIT: Self = Self(0x03); | ||
| 3904 | #[doc = "5-bit"] | ||
| 3905 | pub const FIVEBIT: Self = Self(0x04); | ||
| 3906 | #[doc = "6-bit"] | ||
| 3907 | pub const SIXBIT: Self = Self(0x05); | ||
| 3908 | #[doc = "7-bit"] | ||
| 3909 | pub const SEVENBIT: Self = Self(0x06); | ||
| 3910 | #[doc = "8-bit"] | ||
| 3911 | pub const EIGHTBIT: Self = Self(0x07); | ||
| 3912 | #[doc = "9-bit"] | ||
| 3913 | pub const NINEBIT: Self = Self(0x08); | ||
| 3914 | #[doc = "10-bit"] | ||
| 3915 | pub const TENBIT: Self = Self(0x09); | ||
| 3916 | #[doc = "11-bit"] | ||
| 3917 | pub const ELEVENBIT: Self = Self(0x0a); | ||
| 3918 | #[doc = "12-bit"] | ||
| 3919 | pub const TWELVEBIT: Self = Self(0x0b); | ||
| 3920 | #[doc = "13-bit"] | ||
| 3921 | pub const THIRTEENBIT: Self = Self(0x0c); | ||
| 3922 | #[doc = "14-bit"] | ||
| 3923 | pub const FOURTEENBIT: Self = Self(0x0d); | ||
| 3924 | #[doc = "15-bit"] | ||
| 3925 | pub const FIFTEENBIT: Self = Self(0x0e); | ||
| 3926 | #[doc = "16-bit"] | ||
| 3927 | pub const SIXTEENBIT: Self = Self(0x0f); | ||
| 3928 | } | 3667 | } |
| 3668 | #[doc = "Port configuration register (GPIOn_CRx)"] | ||
| 3929 | #[repr(transparent)] | 3669 | #[repr(transparent)] |
| 3930 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3670 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3931 | pub struct Bidioe(pub u8); | 3671 | pub struct Cr(pub u32); |
| 3932 | impl Bidioe { | 3672 | impl Cr { |
| 3933 | #[doc = "Output disabled (receive-only mode)"] | 3673 | #[doc = "Port n mode bits"] |
| 3934 | pub const OUTPUTDISABLED: Self = Self(0); | 3674 | pub fn mode(&self, n: usize) -> super::vals::Mode { |
| 3935 | #[doc = "Output enabled (transmit-only mode)"] | 3675 | assert!(n < 8usize); |
| 3936 | pub const OUTPUTENABLED: Self = Self(0x01); | 3676 | let offs = 0usize + n * 4usize; |
| 3677 | let val = (self.0 >> offs) & 0x03; | ||
| 3678 | super::vals::Mode(val as u8) | ||
| 3679 | } | ||
| 3680 | #[doc = "Port n mode bits"] | ||
| 3681 | pub fn set_mode(&mut self, n: usize, val: super::vals::Mode) { | ||
| 3682 | assert!(n < 8usize); | ||
| 3683 | let offs = 0usize + n * 4usize; | ||
| 3684 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 3685 | } | ||
| 3686 | #[doc = "Port n configuration bits"] | ||
| 3687 | pub fn cnf(&self, n: usize) -> super::vals::Cnf { | ||
| 3688 | assert!(n < 8usize); | ||
| 3689 | let offs = 2usize + n * 4usize; | ||
| 3690 | let val = (self.0 >> offs) & 0x03; | ||
| 3691 | super::vals::Cnf(val as u8) | ||
| 3692 | } | ||
| 3693 | #[doc = "Port n configuration bits"] | ||
| 3694 | pub fn set_cnf(&mut self, n: usize, val: super::vals::Cnf) { | ||
| 3695 | assert!(n < 8usize); | ||
| 3696 | let offs = 2usize + n * 4usize; | ||
| 3697 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 3698 | } | ||
| 3937 | } | 3699 | } |
| 3938 | #[repr(transparent)] | 3700 | impl Default for Cr { |
| 3939 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3701 | fn default() -> Cr { |
| 3940 | pub struct Br(pub u8); | 3702 | Cr(0) |
| 3941 | impl Br { | 3703 | } |
| 3942 | #[doc = "f_PCLK / 2"] | ||
| 3943 | pub const DIV2: Self = Self(0); | ||
| 3944 | #[doc = "f_PCLK / 4"] | ||
| 3945 | pub const DIV4: Self = Self(0x01); | ||
| 3946 | #[doc = "f_PCLK / 8"] | ||
| 3947 | pub const DIV8: Self = Self(0x02); | ||
| 3948 | #[doc = "f_PCLK / 16"] | ||
| 3949 | pub const DIV16: Self = Self(0x03); | ||
| 3950 | #[doc = "f_PCLK / 32"] | ||
| 3951 | pub const DIV32: Self = Self(0x04); | ||
| 3952 | #[doc = "f_PCLK / 64"] | ||
| 3953 | pub const DIV64: Self = Self(0x05); | ||
| 3954 | #[doc = "f_PCLK / 128"] | ||
| 3955 | pub const DIV128: Self = Self(0x06); | ||
| 3956 | #[doc = "f_PCLK / 256"] | ||
| 3957 | pub const DIV256: Self = Self(0x07); | ||
| 3958 | } | 3704 | } |
| 3705 | #[doc = "Port configuration lock register"] | ||
| 3959 | #[repr(transparent)] | 3706 | #[repr(transparent)] |
| 3960 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3707 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3961 | pub struct Cpha(pub u8); | 3708 | pub struct Lckr(pub u32); |
| 3962 | impl Cpha { | 3709 | impl Lckr { |
| 3963 | #[doc = "The first clock transition is the first data capture edge"] | 3710 | #[doc = "Port A Lock bit"] |
| 3964 | pub const FIRSTEDGE: Self = Self(0); | 3711 | pub fn lck(&self, n: usize) -> super::vals::Lck { |
| 3965 | #[doc = "The second clock transition is the first data capture edge"] | 3712 | assert!(n < 16usize); |
| 3966 | pub const SECONDEDGE: Self = Self(0x01); | 3713 | let offs = 0usize + n * 1usize; |
| 3714 | let val = (self.0 >> offs) & 0x01; | ||
| 3715 | super::vals::Lck(val as u8) | ||
| 3716 | } | ||
| 3717 | #[doc = "Port A Lock bit"] | ||
| 3718 | pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { | ||
| 3719 | assert!(n < 16usize); | ||
| 3720 | let offs = 0usize + n * 1usize; | ||
| 3721 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 3722 | } | ||
| 3723 | #[doc = "Lock key"] | ||
| 3724 | pub const fn lckk(&self) -> super::vals::Lckk { | ||
| 3725 | let val = (self.0 >> 16usize) & 0x01; | ||
| 3726 | super::vals::Lckk(val as u8) | ||
| 3727 | } | ||
| 3728 | #[doc = "Lock key"] | ||
| 3729 | pub fn set_lckk(&mut self, val: super::vals::Lckk) { | ||
| 3730 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); | ||
| 3731 | } | ||
| 3967 | } | 3732 | } |
| 3968 | #[repr(transparent)] | 3733 | impl Default for Lckr { |
| 3969 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3734 | fn default() -> Lckr { |
| 3970 | pub struct Frlvlr(pub u8); | 3735 | Lckr(0) |
| 3971 | impl Frlvlr { | 3736 | } |
| 3972 | #[doc = "Rx FIFO Empty"] | ||
| 3973 | pub const EMPTY: Self = Self(0); | ||
| 3974 | #[doc = "Rx 1/4 FIFO"] | ||
| 3975 | pub const QUARTER: Self = Self(0x01); | ||
| 3976 | #[doc = "Rx 1/2 FIFO"] | ||
| 3977 | pub const HALF: Self = Self(0x02); | ||
| 3978 | #[doc = "Rx FIFO full"] | ||
| 3979 | pub const FULL: Self = Self(0x03); | ||
| 3980 | } | 3737 | } |
| 3738 | #[doc = "Port bit set/reset register (GPIOn_BSRR)"] | ||
| 3981 | #[repr(transparent)] | 3739 | #[repr(transparent)] |
| 3982 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3740 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3983 | pub struct Bidimode(pub u8); | 3741 | pub struct Bsrr(pub u32); |
| 3984 | impl Bidimode { | 3742 | impl Bsrr { |
| 3985 | #[doc = "2-line unidirectional data mode selected"] | 3743 | #[doc = "Set bit"] |
| 3986 | pub const UNIDIRECTIONAL: Self = Self(0); | 3744 | pub fn bs(&self, n: usize) -> bool { |
| 3987 | #[doc = "1-line bidirectional data mode selected"] | 3745 | assert!(n < 16usize); |
| 3988 | pub const BIDIRECTIONAL: Self = Self(0x01); | 3746 | let offs = 0usize + n * 1usize; |
| 3747 | let val = (self.0 >> offs) & 0x01; | ||
| 3748 | val != 0 | ||
| 3749 | } | ||
| 3750 | #[doc = "Set bit"] | ||
| 3751 | pub fn set_bs(&mut self, n: usize, val: bool) { | ||
| 3752 | assert!(n < 16usize); | ||
| 3753 | let offs = 0usize + n * 1usize; | ||
| 3754 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3755 | } | ||
| 3756 | #[doc = "Reset bit"] | ||
| 3757 | pub fn br(&self, n: usize) -> bool { | ||
| 3758 | assert!(n < 16usize); | ||
| 3759 | let offs = 16usize + n * 1usize; | ||
| 3760 | let val = (self.0 >> offs) & 0x01; | ||
| 3761 | val != 0 | ||
| 3762 | } | ||
| 3763 | #[doc = "Reset bit"] | ||
| 3764 | pub fn set_br(&mut self, n: usize, val: bool) { | ||
| 3765 | assert!(n < 16usize); | ||
| 3766 | let offs = 16usize + n * 1usize; | ||
| 3767 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 3768 | } | ||
| 3769 | } | ||
| 3770 | impl Default for Bsrr { | ||
| 3771 | fn default() -> Bsrr { | ||
| 3772 | Bsrr(0) | ||
| 3773 | } | ||
| 3989 | } | 3774 | } |
| 3775 | #[doc = "Port output data register (GPIOn_ODR)"] | ||
| 3990 | #[repr(transparent)] | 3776 | #[repr(transparent)] |
| 3991 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 3777 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 3992 | pub struct Ftlvlr(pub u8); | 3778 | pub struct Odr(pub u32); |
| 3993 | impl Ftlvlr { | 3779 | impl Odr { |
| 3994 | #[doc = "Tx FIFO Empty"] | 3780 | #[doc = "Port output data"] |
| 3995 | pub const EMPTY: Self = Self(0); | 3781 | pub fn odr(&self, n: usize) -> super::vals::Odr { |
| 3996 | #[doc = "Tx 1/4 FIFO"] | 3782 | assert!(n < 16usize); |
| 3997 | pub const QUARTER: Self = Self(0x01); | 3783 | let offs = 0usize + n * 1usize; |
| 3998 | #[doc = "Tx 1/2 FIFO"] | 3784 | let val = (self.0 >> offs) & 0x01; |
| 3999 | pub const HALF: Self = Self(0x02); | 3785 | super::vals::Odr(val as u8) |
| 4000 | #[doc = "Tx FIFO full"] | 3786 | } |
| 4001 | pub const FULL: Self = Self(0x03); | 3787 | #[doc = "Port output data"] |
| 3788 | pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { | ||
| 3789 | assert!(n < 16usize); | ||
| 3790 | let offs = 0usize + n * 1usize; | ||
| 3791 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 3792 | } | ||
| 3793 | } | ||
| 3794 | impl Default for Odr { | ||
| 3795 | fn default() -> Odr { | ||
| 3796 | Odr(0) | ||
| 3797 | } | ||
| 3798 | } | ||
| 3799 | } | ||
| 3800 | } | ||
| 3801 | pub mod spi_v1 { | ||
| 3802 | use crate::generic::*; | ||
| 3803 | #[doc = "Serial peripheral interface"] | ||
| 3804 | #[derive(Copy, Clone)] | ||
| 3805 | pub struct Spi(pub *mut u8); | ||
| 3806 | unsafe impl Send for Spi {} | ||
| 3807 | unsafe impl Sync for Spi {} | ||
| 3808 | impl Spi { | ||
| 3809 | #[doc = "control register 1"] | ||
| 3810 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { | ||
| 3811 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 3812 | } | ||
| 3813 | #[doc = "control register 2"] | ||
| 3814 | pub fn cr2(self) -> Reg<regs::Cr2, RW> { | ||
| 3815 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 3816 | } | ||
| 3817 | #[doc = "status register"] | ||
| 3818 | pub fn sr(self) -> Reg<regs::Sr, RW> { | ||
| 3819 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 3820 | } | ||
| 3821 | #[doc = "data register"] | ||
| 3822 | pub fn dr(self) -> Reg<regs::Dr, RW> { | ||
| 3823 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 3824 | } | ||
| 3825 | #[doc = "CRC polynomial register"] | ||
| 3826 | pub fn crcpr(self) -> Reg<regs::Crcpr, RW> { | ||
| 3827 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 3828 | } | ||
| 3829 | #[doc = "RX CRC register"] | ||
| 3830 | pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> { | ||
| 3831 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 3832 | } | ||
| 3833 | #[doc = "TX CRC register"] | ||
| 3834 | pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> { | ||
| 3835 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 4002 | } | 3836 | } |
| 4003 | } | 3837 | } |
| 4004 | pub mod regs { | 3838 | pub mod regs { |
| 4005 | use crate::generic::*; | 3839 | use crate::generic::*; |
| 3840 | #[doc = "TX CRC register"] | ||
| 3841 | #[repr(transparent)] | ||
| 3842 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 3843 | pub struct Txcrcr(pub u32); | ||
| 3844 | impl Txcrcr { | ||
| 3845 | #[doc = "Tx CRC register"] | ||
| 3846 | pub const fn tx_crc(&self) -> u16 { | ||
| 3847 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 3848 | val as u16 | ||
| 3849 | } | ||
| 3850 | #[doc = "Tx CRC register"] | ||
| 3851 | pub fn set_tx_crc(&mut self, val: u16) { | ||
| 3852 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 3853 | } | ||
| 3854 | } | ||
| 3855 | impl Default for Txcrcr { | ||
| 3856 | fn default() -> Txcrcr { | ||
| 3857 | Txcrcr(0) | ||
| 3858 | } | ||
| 3859 | } | ||
| 3860 | #[doc = "RX CRC register"] | ||
| 3861 | #[repr(transparent)] | ||
| 3862 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 3863 | pub struct Rxcrcr(pub u32); | ||
| 3864 | impl Rxcrcr { | ||
| 3865 | #[doc = "Rx CRC register"] | ||
| 3866 | pub const fn rx_crc(&self) -> u16 { | ||
| 3867 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 3868 | val as u16 | ||
| 3869 | } | ||
| 3870 | #[doc = "Rx CRC register"] | ||
| 3871 | pub fn set_rx_crc(&mut self, val: u16) { | ||
| 3872 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 3873 | } | ||
| 3874 | } | ||
| 3875 | impl Default for Rxcrcr { | ||
| 3876 | fn default() -> Rxcrcr { | ||
| 3877 | Rxcrcr(0) | ||
| 3878 | } | ||
| 3879 | } | ||
| 3880 | #[doc = "control register 2"] | ||
| 3881 | #[repr(transparent)] | ||
| 3882 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 3883 | pub struct Cr2(pub u32); | ||
| 3884 | impl Cr2 { | ||
| 3885 | #[doc = "Rx buffer DMA enable"] | ||
| 3886 | pub const fn rxdmaen(&self) -> bool { | ||
| 3887 | let val = (self.0 >> 0usize) & 0x01; | ||
| 3888 | val != 0 | ||
| 3889 | } | ||
| 3890 | #[doc = "Rx buffer DMA enable"] | ||
| 3891 | pub fn set_rxdmaen(&mut self, val: bool) { | ||
| 3892 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 3893 | } | ||
| 3894 | #[doc = "Tx buffer DMA enable"] | ||
| 3895 | pub const fn txdmaen(&self) -> bool { | ||
| 3896 | let val = (self.0 >> 1usize) & 0x01; | ||
| 3897 | val != 0 | ||
| 3898 | } | ||
| 3899 | #[doc = "Tx buffer DMA enable"] | ||
| 3900 | pub fn set_txdmaen(&mut self, val: bool) { | ||
| 3901 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 3902 | } | ||
| 3903 | #[doc = "SS output enable"] | ||
| 3904 | pub const fn ssoe(&self) -> bool { | ||
| 3905 | let val = (self.0 >> 2usize) & 0x01; | ||
| 3906 | val != 0 | ||
| 3907 | } | ||
| 3908 | #[doc = "SS output enable"] | ||
| 3909 | pub fn set_ssoe(&mut self, val: bool) { | ||
| 3910 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 3911 | } | ||
| 3912 | #[doc = "Frame format"] | ||
| 3913 | pub const fn frf(&self) -> super::vals::Frf { | ||
| 3914 | let val = (self.0 >> 4usize) & 0x01; | ||
| 3915 | super::vals::Frf(val as u8) | ||
| 3916 | } | ||
| 3917 | #[doc = "Frame format"] | ||
| 3918 | pub fn set_frf(&mut self, val: super::vals::Frf) { | ||
| 3919 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | ||
| 3920 | } | ||
| 3921 | #[doc = "Error interrupt enable"] | ||
| 3922 | pub const fn errie(&self) -> bool { | ||
| 3923 | let val = (self.0 >> 5usize) & 0x01; | ||
| 3924 | val != 0 | ||
| 3925 | } | ||
| 3926 | #[doc = "Error interrupt enable"] | ||
| 3927 | pub fn set_errie(&mut self, val: bool) { | ||
| 3928 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 3929 | } | ||
| 3930 | #[doc = "RX buffer not empty interrupt enable"] | ||
| 3931 | pub const fn rxneie(&self) -> bool { | ||
| 3932 | let val = (self.0 >> 6usize) & 0x01; | ||
| 3933 | val != 0 | ||
| 3934 | } | ||
| 3935 | #[doc = "RX buffer not empty interrupt enable"] | ||
| 3936 | pub fn set_rxneie(&mut self, val: bool) { | ||
| 3937 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 3938 | } | ||
| 3939 | #[doc = "Tx buffer empty interrupt enable"] | ||
| 3940 | pub const fn txeie(&self) -> bool { | ||
| 3941 | let val = (self.0 >> 7usize) & 0x01; | ||
| 3942 | val != 0 | ||
| 3943 | } | ||
| 3944 | #[doc = "Tx buffer empty interrupt enable"] | ||
| 3945 | pub fn set_txeie(&mut self, val: bool) { | ||
| 3946 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 3947 | } | ||
| 3948 | } | ||
| 3949 | impl Default for Cr2 { | ||
| 3950 | fn default() -> Cr2 { | ||
| 3951 | Cr2(0) | ||
| 3952 | } | ||
| 3953 | } | ||
| 4006 | #[doc = "control register 1"] | 3954 | #[doc = "control register 1"] |
| 4007 | #[repr(transparent)] | 3955 | #[repr(transparent)] |
| 4008 | #[derive(Copy, Clone, Eq, PartialEq)] | 3956 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -4089,13 +4037,13 @@ pub mod spi_v2 { | |||
| 4089 | pub fn set_rxonly(&mut self, val: super::vals::Rxonly) { | 4037 | pub fn set_rxonly(&mut self, val: super::vals::Rxonly) { |
| 4090 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | 4038 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); |
| 4091 | } | 4039 | } |
| 4092 | #[doc = "CRC length"] | 4040 | #[doc = "Data frame format"] |
| 4093 | pub const fn crcl(&self) -> super::vals::Crcl { | 4041 | pub const fn dff(&self) -> super::vals::Dff { |
| 4094 | let val = (self.0 >> 11usize) & 0x01; | 4042 | let val = (self.0 >> 11usize) & 0x01; |
| 4095 | super::vals::Crcl(val as u8) | 4043 | super::vals::Dff(val as u8) |
| 4096 | } | 4044 | } |
| 4097 | #[doc = "CRC length"] | 4045 | #[doc = "Data frame format"] |
| 4098 | pub fn set_crcl(&mut self, val: super::vals::Crcl) { | 4046 | pub fn set_dff(&mut self, val: super::vals::Dff) { |
| 4099 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); | 4047 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); |
| 4100 | } | 4048 | } |
| 4101 | #[doc = "CRC transfer next"] | 4049 | #[doc = "CRC transfer next"] |
| @@ -4140,24 +4088,24 @@ pub mod spi_v2 { | |||
| 4140 | Cr1(0) | 4088 | Cr1(0) |
| 4141 | } | 4089 | } |
| 4142 | } | 4090 | } |
| 4143 | #[doc = "RX CRC register"] | 4091 | #[doc = "data register"] |
| 4144 | #[repr(transparent)] | 4092 | #[repr(transparent)] |
| 4145 | #[derive(Copy, Clone, Eq, PartialEq)] | 4093 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 4146 | pub struct Rxcrcr(pub u32); | 4094 | pub struct Dr(pub u32); |
| 4147 | impl Rxcrcr { | 4095 | impl Dr { |
| 4148 | #[doc = "Rx CRC register"] | 4096 | #[doc = "Data register"] |
| 4149 | pub const fn rx_crc(&self) -> u16 { | 4097 | pub const fn dr(&self) -> u16 { |
| 4150 | let val = (self.0 >> 0usize) & 0xffff; | 4098 | let val = (self.0 >> 0usize) & 0xffff; |
| 4151 | val as u16 | 4099 | val as u16 |
| 4152 | } | 4100 | } |
| 4153 | #[doc = "Rx CRC register"] | 4101 | #[doc = "Data register"] |
| 4154 | pub fn set_rx_crc(&mut self, val: u16) { | 4102 | pub fn set_dr(&mut self, val: u16) { |
| 4155 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 4103 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 4156 | } | 4104 | } |
| 4157 | } | 4105 | } |
| 4158 | impl Default for Rxcrcr { | 4106 | impl Default for Dr { |
| 4159 | fn default() -> Rxcrcr { | 4107 | fn default() -> Dr { |
| 4160 | Rxcrcr(0) | 4108 | Dr(0) |
| 4161 | } | 4109 | } |
| 4162 | } | 4110 | } |
| 4163 | #[doc = "CRC polynomial register"] | 4111 | #[doc = "CRC polynomial register"] |
| @@ -4180,145 +4128,6 @@ pub mod spi_v2 { | |||
| 4180 | Crcpr(0) | 4128 | Crcpr(0) |
| 4181 | } | 4129 | } |
| 4182 | } | 4130 | } |
| 4183 | #[doc = "control register 2"] | ||
| 4184 | #[repr(transparent)] | ||
| 4185 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4186 | pub struct Cr2(pub u32); | ||
| 4187 | impl Cr2 { | ||
| 4188 | #[doc = "Rx buffer DMA enable"] | ||
| 4189 | pub const fn rxdmaen(&self) -> bool { | ||
| 4190 | let val = (self.0 >> 0usize) & 0x01; | ||
| 4191 | val != 0 | ||
| 4192 | } | ||
| 4193 | #[doc = "Rx buffer DMA enable"] | ||
| 4194 | pub fn set_rxdmaen(&mut self, val: bool) { | ||
| 4195 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 4196 | } | ||
| 4197 | #[doc = "Tx buffer DMA enable"] | ||
| 4198 | pub const fn txdmaen(&self) -> bool { | ||
| 4199 | let val = (self.0 >> 1usize) & 0x01; | ||
| 4200 | val != 0 | ||
| 4201 | } | ||
| 4202 | #[doc = "Tx buffer DMA enable"] | ||
| 4203 | pub fn set_txdmaen(&mut self, val: bool) { | ||
| 4204 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 4205 | } | ||
| 4206 | #[doc = "SS output enable"] | ||
| 4207 | pub const fn ssoe(&self) -> bool { | ||
| 4208 | let val = (self.0 >> 2usize) & 0x01; | ||
| 4209 | val != 0 | ||
| 4210 | } | ||
| 4211 | #[doc = "SS output enable"] | ||
| 4212 | pub fn set_ssoe(&mut self, val: bool) { | ||
| 4213 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 4214 | } | ||
| 4215 | #[doc = "NSS pulse management"] | ||
| 4216 | pub const fn nssp(&self) -> bool { | ||
| 4217 | let val = (self.0 >> 3usize) & 0x01; | ||
| 4218 | val != 0 | ||
| 4219 | } | ||
| 4220 | #[doc = "NSS pulse management"] | ||
| 4221 | pub fn set_nssp(&mut self, val: bool) { | ||
| 4222 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 4223 | } | ||
| 4224 | #[doc = "Frame format"] | ||
| 4225 | pub const fn frf(&self) -> super::vals::Frf { | ||
| 4226 | let val = (self.0 >> 4usize) & 0x01; | ||
| 4227 | super::vals::Frf(val as u8) | ||
| 4228 | } | ||
| 4229 | #[doc = "Frame format"] | ||
| 4230 | pub fn set_frf(&mut self, val: super::vals::Frf) { | ||
| 4231 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | ||
| 4232 | } | ||
| 4233 | #[doc = "Error interrupt enable"] | ||
| 4234 | pub const fn errie(&self) -> bool { | ||
| 4235 | let val = (self.0 >> 5usize) & 0x01; | ||
| 4236 | val != 0 | ||
| 4237 | } | ||
| 4238 | #[doc = "Error interrupt enable"] | ||
| 4239 | pub fn set_errie(&mut self, val: bool) { | ||
| 4240 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 4241 | } | ||
| 4242 | #[doc = "RX buffer not empty interrupt enable"] | ||
| 4243 | pub const fn rxneie(&self) -> bool { | ||
| 4244 | let val = (self.0 >> 6usize) & 0x01; | ||
| 4245 | val != 0 | ||
| 4246 | } | ||
| 4247 | #[doc = "RX buffer not empty interrupt enable"] | ||
| 4248 | pub fn set_rxneie(&mut self, val: bool) { | ||
| 4249 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 4250 | } | ||
| 4251 | #[doc = "Tx buffer empty interrupt enable"] | ||
| 4252 | pub const fn txeie(&self) -> bool { | ||
| 4253 | let val = (self.0 >> 7usize) & 0x01; | ||
| 4254 | val != 0 | ||
| 4255 | } | ||
| 4256 | #[doc = "Tx buffer empty interrupt enable"] | ||
| 4257 | pub fn set_txeie(&mut self, val: bool) { | ||
| 4258 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 4259 | } | ||
| 4260 | #[doc = "Data size"] | ||
| 4261 | pub const fn ds(&self) -> super::vals::Ds { | ||
| 4262 | let val = (self.0 >> 8usize) & 0x0f; | ||
| 4263 | super::vals::Ds(val as u8) | ||
| 4264 | } | ||
| 4265 | #[doc = "Data size"] | ||
| 4266 | pub fn set_ds(&mut self, val: super::vals::Ds) { | ||
| 4267 | self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize); | ||
| 4268 | } | ||
| 4269 | #[doc = "FIFO reception threshold"] | ||
| 4270 | pub const fn frxth(&self) -> super::vals::Frxth { | ||
| 4271 | let val = (self.0 >> 12usize) & 0x01; | ||
| 4272 | super::vals::Frxth(val as u8) | ||
| 4273 | } | ||
| 4274 | #[doc = "FIFO reception threshold"] | ||
| 4275 | pub fn set_frxth(&mut self, val: super::vals::Frxth) { | ||
| 4276 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); | ||
| 4277 | } | ||
| 4278 | #[doc = "Last DMA transfer for reception"] | ||
| 4279 | pub const fn ldma_rx(&self) -> super::vals::LdmaRx { | ||
| 4280 | let val = (self.0 >> 13usize) & 0x01; | ||
| 4281 | super::vals::LdmaRx(val as u8) | ||
| 4282 | } | ||
| 4283 | #[doc = "Last DMA transfer for reception"] | ||
| 4284 | pub fn set_ldma_rx(&mut self, val: super::vals::LdmaRx) { | ||
| 4285 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val.0 as u32) & 0x01) << 13usize); | ||
| 4286 | } | ||
| 4287 | #[doc = "Last DMA transfer for transmission"] | ||
| 4288 | pub const fn ldma_tx(&self) -> super::vals::LdmaTx { | ||
| 4289 | let val = (self.0 >> 14usize) & 0x01; | ||
| 4290 | super::vals::LdmaTx(val as u8) | ||
| 4291 | } | ||
| 4292 | #[doc = "Last DMA transfer for transmission"] | ||
| 4293 | pub fn set_ldma_tx(&mut self, val: super::vals::LdmaTx) { | ||
| 4294 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); | ||
| 4295 | } | ||
| 4296 | } | ||
| 4297 | impl Default for Cr2 { | ||
| 4298 | fn default() -> Cr2 { | ||
| 4299 | Cr2(0) | ||
| 4300 | } | ||
| 4301 | } | ||
| 4302 | #[doc = "data register"] | ||
| 4303 | #[repr(transparent)] | ||
| 4304 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4305 | pub struct Dr(pub u32); | ||
| 4306 | impl Dr { | ||
| 4307 | #[doc = "Data register"] | ||
| 4308 | pub const fn dr(&self) -> u16 { | ||
| 4309 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 4310 | val as u16 | ||
| 4311 | } | ||
| 4312 | #[doc = "Data register"] | ||
| 4313 | pub fn set_dr(&mut self, val: u16) { | ||
| 4314 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 4315 | } | ||
| 4316 | } | ||
| 4317 | impl Default for Dr { | ||
| 4318 | fn default() -> Dr { | ||
| 4319 | Dr(0) | ||
| 4320 | } | ||
| 4321 | } | ||
| 4322 | #[doc = "status register"] | 4131 | #[doc = "status register"] |
| 4323 | #[repr(transparent)] | 4132 | #[repr(transparent)] |
| 4324 | #[derive(Copy, Clone, Eq, PartialEq)] | 4133 | #[derive(Copy, Clone, Eq, PartialEq)] |
| @@ -4378,971 +4187,1296 @@ pub mod spi_v2 { | |||
| 4378 | pub fn set_bsy(&mut self, val: bool) { | 4187 | pub fn set_bsy(&mut self, val: bool) { |
| 4379 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 4188 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 4380 | } | 4189 | } |
| 4381 | #[doc = "Frame format error"] | 4190 | #[doc = "TI frame format error"] |
| 4382 | pub const fn fre(&self) -> bool { | 4191 | pub const fn fre(&self) -> bool { |
| 4383 | let val = (self.0 >> 8usize) & 0x01; | 4192 | let val = (self.0 >> 8usize) & 0x01; |
| 4384 | val != 0 | 4193 | val != 0 |
| 4385 | } | 4194 | } |
| 4386 | #[doc = "Frame format error"] | 4195 | #[doc = "TI frame format error"] |
| 4387 | pub fn set_fre(&mut self, val: bool) { | 4196 | pub fn set_fre(&mut self, val: bool) { |
| 4388 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 4197 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 4389 | } | 4198 | } |
| 4390 | #[doc = "FIFO reception level"] | ||
| 4391 | pub const fn frlvl(&self) -> u8 { | ||
| 4392 | let val = (self.0 >> 9usize) & 0x03; | ||
| 4393 | val as u8 | ||
| 4394 | } | ||
| 4395 | #[doc = "FIFO reception level"] | ||
| 4396 | pub fn set_frlvl(&mut self, val: u8) { | ||
| 4397 | self.0 = (self.0 & !(0x03 << 9usize)) | (((val as u32) & 0x03) << 9usize); | ||
| 4398 | } | ||
| 4399 | #[doc = "FIFO Transmission Level"] | ||
| 4400 | pub const fn ftlvl(&self) -> u8 { | ||
| 4401 | let val = (self.0 >> 11usize) & 0x03; | ||
| 4402 | val as u8 | ||
| 4403 | } | ||
| 4404 | #[doc = "FIFO Transmission Level"] | ||
| 4405 | pub fn set_ftlvl(&mut self, val: u8) { | ||
| 4406 | self.0 = (self.0 & !(0x03 << 11usize)) | (((val as u32) & 0x03) << 11usize); | ||
| 4407 | } | ||
| 4408 | } | 4199 | } |
| 4409 | impl Default for Sr { | 4200 | impl Default for Sr { |
| 4410 | fn default() -> Sr { | 4201 | fn default() -> Sr { |
| 4411 | Sr(0) | 4202 | Sr(0) |
| 4412 | } | 4203 | } |
| 4413 | } | 4204 | } |
| 4414 | #[doc = "TX CRC register"] | ||
| 4415 | #[repr(transparent)] | ||
| 4416 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4417 | pub struct Txcrcr(pub u32); | ||
| 4418 | impl Txcrcr { | ||
| 4419 | #[doc = "Tx CRC register"] | ||
| 4420 | pub const fn tx_crc(&self) -> u16 { | ||
| 4421 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 4422 | val as u16 | ||
| 4423 | } | ||
| 4424 | #[doc = "Tx CRC register"] | ||
| 4425 | pub fn set_tx_crc(&mut self, val: u16) { | ||
| 4426 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 4427 | } | ||
| 4428 | } | ||
| 4429 | impl Default for Txcrcr { | ||
| 4430 | fn default() -> Txcrcr { | ||
| 4431 | Txcrcr(0) | ||
| 4432 | } | ||
| 4433 | } | ||
| 4434 | } | 4205 | } |
| 4435 | } | 4206 | pub mod vals { |
| 4436 | pub mod usart_v1 { | 4207 | use crate::generic::*; |
| 4437 | use crate::generic::*; | 4208 | #[repr(transparent)] |
| 4438 | #[doc = "Universal synchronous asynchronous receiver transmitter"] | 4209 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4439 | #[derive(Copy, Clone)] | 4210 | pub struct Frf(pub u8); |
| 4440 | pub struct Usart(pub *mut u8); | 4211 | impl Frf { |
| 4441 | unsafe impl Send for Usart {} | 4212 | #[doc = "SPI Motorola mode"] |
| 4442 | unsafe impl Sync for Usart {} | 4213 | pub const MOTOROLA: Self = Self(0); |
| 4443 | impl Usart { | 4214 | #[doc = "SPI TI mode"] |
| 4444 | #[doc = "Status register"] | 4215 | pub const TI: Self = Self(0x01); |
| 4445 | pub fn sr(self) -> Reg<regs::Sr, RW> { | ||
| 4446 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 4447 | } | ||
| 4448 | #[doc = "Data register"] | ||
| 4449 | pub fn dr(self) -> Reg<regs::Dr, RW> { | ||
| 4450 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 4451 | } | ||
| 4452 | #[doc = "Baud rate register"] | ||
| 4453 | pub fn brr(self) -> Reg<regs::Brr, RW> { | ||
| 4454 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 4455 | } | ||
| 4456 | #[doc = "Control register 1"] | ||
| 4457 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { | ||
| 4458 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 4459 | } | ||
| 4460 | #[doc = "Control register 2"] | ||
| 4461 | pub fn cr2(self) -> Reg<regs::Cr2Usart, RW> { | ||
| 4462 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 4463 | } | ||
| 4464 | #[doc = "Control register 3"] | ||
| 4465 | pub fn cr3(self) -> Reg<regs::Cr3Usart, RW> { | ||
| 4466 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 4467 | } | 4216 | } |
| 4468 | #[doc = "Guard time and prescaler register"] | 4217 | #[repr(transparent)] |
| 4469 | pub fn gtpr(self) -> Reg<regs::Gtpr, RW> { | 4218 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4470 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | 4219 | pub struct Iscfg(pub u8); |
| 4220 | impl Iscfg { | ||
| 4221 | #[doc = "Slave - transmit"] | ||
| 4222 | pub const SLAVETX: Self = Self(0); | ||
| 4223 | #[doc = "Slave - receive"] | ||
| 4224 | pub const SLAVERX: Self = Self(0x01); | ||
| 4225 | #[doc = "Master - transmit"] | ||
| 4226 | pub const MASTERTX: Self = Self(0x02); | ||
| 4227 | #[doc = "Master - receive"] | ||
| 4228 | pub const MASTERRX: Self = Self(0x03); | ||
| 4471 | } | 4229 | } |
| 4472 | } | 4230 | #[repr(transparent)] |
| 4473 | #[doc = "Universal asynchronous receiver transmitter"] | 4231 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4474 | #[derive(Copy, Clone)] | 4232 | pub struct Bidioe(pub u8); |
| 4475 | pub struct Uart(pub *mut u8); | 4233 | impl Bidioe { |
| 4476 | unsafe impl Send for Uart {} | 4234 | #[doc = "Output disabled (receive-only mode)"] |
| 4477 | unsafe impl Sync for Uart {} | 4235 | pub const OUTPUTDISABLED: Self = Self(0); |
| 4478 | impl Uart { | 4236 | #[doc = "Output enabled (transmit-only mode)"] |
| 4479 | #[doc = "Status register"] | 4237 | pub const OUTPUTENABLED: Self = Self(0x01); |
| 4480 | pub fn sr(self) -> Reg<regs::Sr, RW> { | ||
| 4481 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 4482 | } | 4238 | } |
| 4483 | #[doc = "Data register"] | 4239 | #[repr(transparent)] |
| 4484 | pub fn dr(self) -> Reg<regs::Dr, RW> { | 4240 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4485 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 4241 | pub struct Dff(pub u8); |
| 4242 | impl Dff { | ||
| 4243 | #[doc = "8-bit data frame format is selected for transmission/reception"] | ||
| 4244 | pub const EIGHTBIT: Self = Self(0); | ||
| 4245 | #[doc = "16-bit data frame format is selected for transmission/reception"] | ||
| 4246 | pub const SIXTEENBIT: Self = Self(0x01); | ||
| 4486 | } | 4247 | } |
| 4487 | #[doc = "Baud rate register"] | 4248 | #[repr(transparent)] |
| 4488 | pub fn brr(self) -> Reg<regs::Brr, RW> { | 4249 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4489 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 4250 | pub struct Bidimode(pub u8); |
| 4251 | impl Bidimode { | ||
| 4252 | #[doc = "2-line unidirectional data mode selected"] | ||
| 4253 | pub const UNIDIRECTIONAL: Self = Self(0); | ||
| 4254 | #[doc = "1-line bidirectional data mode selected"] | ||
| 4255 | pub const BIDIRECTIONAL: Self = Self(0x01); | ||
| 4490 | } | 4256 | } |
| 4491 | #[doc = "Control register 1"] | 4257 | #[repr(transparent)] |
| 4492 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { | 4258 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4493 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 4259 | pub struct Cpha(pub u8); |
| 4260 | impl Cpha { | ||
| 4261 | #[doc = "The first clock transition is the first data capture edge"] | ||
| 4262 | pub const FIRSTEDGE: Self = Self(0); | ||
| 4263 | #[doc = "The second clock transition is the first data capture edge"] | ||
| 4264 | pub const SECONDEDGE: Self = Self(0x01); | ||
| 4494 | } | 4265 | } |
| 4495 | #[doc = "Control register 2"] | 4266 | #[repr(transparent)] |
| 4496 | pub fn cr2(self) -> Reg<regs::Cr2, RW> { | 4267 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4497 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 4268 | pub struct Rxonly(pub u8); |
| 4269 | impl Rxonly { | ||
| 4270 | #[doc = "Full duplex (Transmit and receive)"] | ||
| 4271 | pub const FULLDUPLEX: Self = Self(0); | ||
| 4272 | #[doc = "Output disabled (Receive-only mode)"] | ||
| 4273 | pub const OUTPUTDISABLED: Self = Self(0x01); | ||
| 4498 | } | 4274 | } |
| 4499 | #[doc = "Control register 3"] | 4275 | #[repr(transparent)] |
| 4500 | pub fn cr3(self) -> Reg<regs::Cr3, RW> { | 4276 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4501 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 4277 | pub struct Lsbfirst(pub u8); |
| 4278 | impl Lsbfirst { | ||
| 4279 | #[doc = "Data is transmitted/received with the MSB first"] | ||
| 4280 | pub const MSBFIRST: Self = Self(0); | ||
| 4281 | #[doc = "Data is transmitted/received with the LSB first"] | ||
| 4282 | pub const LSBFIRST: Self = Self(0x01); | ||
| 4502 | } | 4283 | } |
| 4503 | } | ||
| 4504 | pub mod vals { | ||
| 4505 | use crate::generic::*; | ||
| 4506 | #[repr(transparent)] | 4284 | #[repr(transparent)] |
| 4507 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 4285 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4508 | pub struct Ps(pub u8); | 4286 | pub struct Frer(pub u8); |
| 4509 | impl Ps { | 4287 | impl Frer { |
| 4510 | #[doc = "Even parity"] | 4288 | #[doc = "No frame format error"] |
| 4511 | pub const EVEN: Self = Self(0); | 4289 | pub const NOERROR: Self = Self(0); |
| 4512 | #[doc = "Odd parity"] | 4290 | #[doc = "A frame format error occurred"] |
| 4513 | pub const ODD: Self = Self(0x01); | 4291 | pub const ERROR: Self = Self(0x01); |
| 4514 | } | 4292 | } |
| 4515 | #[repr(transparent)] | 4293 | #[repr(transparent)] |
| 4516 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 4294 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4517 | pub struct Irlp(pub u8); | 4295 | pub struct Crcnext(pub u8); |
| 4518 | impl Irlp { | 4296 | impl Crcnext { |
| 4519 | #[doc = "Normal mode"] | 4297 | #[doc = "Next transmit value is from Tx buffer"] |
| 4520 | pub const NORMAL: Self = Self(0); | 4298 | pub const TXBUFFER: Self = Self(0); |
| 4521 | #[doc = "Low-power mode"] | 4299 | #[doc = "Next transmit value is from Tx CRC register"] |
| 4522 | pub const LOWPOWER: Self = Self(0x01); | 4300 | pub const CRC: Self = Self(0x01); |
| 4523 | } | 4301 | } |
| 4524 | #[repr(transparent)] | 4302 | #[repr(transparent)] |
| 4525 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 4303 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4526 | pub struct Hdsel(pub u8); | 4304 | pub struct Br(pub u8); |
| 4527 | impl Hdsel { | 4305 | impl Br { |
| 4528 | #[doc = "Half duplex mode is not selected"] | 4306 | #[doc = "f_PCLK / 2"] |
| 4529 | pub const FULLDUPLEX: Self = Self(0); | 4307 | pub const DIV2: Self = Self(0); |
| 4530 | #[doc = "Half duplex mode is selected"] | 4308 | #[doc = "f_PCLK / 4"] |
| 4531 | pub const HALFDUPLEX: Self = Self(0x01); | 4309 | pub const DIV4: Self = Self(0x01); |
| 4310 | #[doc = "f_PCLK / 8"] | ||
| 4311 | pub const DIV8: Self = Self(0x02); | ||
| 4312 | #[doc = "f_PCLK / 16"] | ||
| 4313 | pub const DIV16: Self = Self(0x03); | ||
| 4314 | #[doc = "f_PCLK / 32"] | ||
| 4315 | pub const DIV32: Self = Self(0x04); | ||
| 4316 | #[doc = "f_PCLK / 64"] | ||
| 4317 | pub const DIV64: Self = Self(0x05); | ||
| 4318 | #[doc = "f_PCLK / 128"] | ||
| 4319 | pub const DIV128: Self = Self(0x06); | ||
| 4320 | #[doc = "f_PCLK / 256"] | ||
| 4321 | pub const DIV256: Self = Self(0x07); | ||
| 4532 | } | 4322 | } |
| 4533 | #[repr(transparent)] | 4323 | #[repr(transparent)] |
| 4534 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 4324 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4535 | pub struct Cpol(pub u8); | 4325 | pub struct Cpol(pub u8); |
| 4536 | impl Cpol { | 4326 | impl Cpol { |
| 4537 | #[doc = "Steady low value on CK pin outside transmission window"] | 4327 | #[doc = "CK to 0 when idle"] |
| 4538 | pub const LOW: Self = Self(0); | 4328 | pub const IDLELOW: Self = Self(0); |
| 4539 | #[doc = "Steady high value on CK pin outside transmission window"] | 4329 | #[doc = "CK to 1 when idle"] |
| 4540 | pub const HIGH: Self = Self(0x01); | 4330 | pub const IDLEHIGH: Self = Self(0x01); |
| 4541 | } | 4331 | } |
| 4542 | #[repr(transparent)] | 4332 | #[repr(transparent)] |
| 4543 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 4333 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4544 | pub struct Wake(pub u8); | 4334 | pub struct Mstr(pub u8); |
| 4545 | impl Wake { | 4335 | impl Mstr { |
| 4546 | #[doc = "USART wakeup on idle line"] | 4336 | #[doc = "Slave configuration"] |
| 4547 | pub const IDLELINE: Self = Self(0); | 4337 | pub const SLAVE: Self = Self(0); |
| 4548 | #[doc = "USART wakeup on address mark"] | 4338 | #[doc = "Master configuration"] |
| 4549 | pub const ADDRESSMARK: Self = Self(0x01); | 4339 | pub const MASTER: Self = Self(0x01); |
| 4550 | } | 4340 | } |
| 4551 | #[repr(transparent)] | 4341 | } |
| 4552 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 4342 | } |
| 4553 | pub struct Sbk(pub u8); | 4343 | pub mod exti_v1 { |
| 4554 | impl Sbk { | 4344 | use crate::generic::*; |
| 4555 | #[doc = "No break character is transmitted"] | 4345 | #[doc = "External interrupt/event controller"] |
| 4556 | pub const NOBREAK: Self = Self(0); | 4346 | #[derive(Copy, Clone)] |
| 4557 | #[doc = "Break character transmitted"] | 4347 | pub struct Exti(pub *mut u8); |
| 4558 | pub const BREAK: Self = Self(0x01); | 4348 | unsafe impl Send for Exti {} |
| 4349 | unsafe impl Sync for Exti {} | ||
| 4350 | impl Exti { | ||
| 4351 | #[doc = "Interrupt mask register (EXTI_IMR)"] | ||
| 4352 | pub fn imr(self) -> Reg<regs::Imr, RW> { | ||
| 4353 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 4354 | } | ||
| 4355 | #[doc = "Event mask register (EXTI_EMR)"] | ||
| 4356 | pub fn emr(self) -> Reg<regs::Emr, RW> { | ||
| 4357 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 4358 | } | ||
| 4359 | #[doc = "Rising Trigger selection register (EXTI_RTSR)"] | ||
| 4360 | pub fn rtsr(self) -> Reg<regs::Rtsr, RW> { | ||
| 4361 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 4362 | } | ||
| 4363 | #[doc = "Falling Trigger selection register (EXTI_FTSR)"] | ||
| 4364 | pub fn ftsr(self) -> Reg<regs::Ftsr, RW> { | ||
| 4365 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 4366 | } | ||
| 4367 | #[doc = "Software interrupt event register (EXTI_SWIER)"] | ||
| 4368 | pub fn swier(self) -> Reg<regs::Swier, RW> { | ||
| 4369 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 4559 | } | 4370 | } |
| 4371 | #[doc = "Pending register (EXTI_PR)"] | ||
| 4372 | pub fn pr(self) -> Reg<regs::Pr, RW> { | ||
| 4373 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 4374 | } | ||
| 4375 | } | ||
| 4376 | pub mod vals { | ||
| 4377 | use crate::generic::*; | ||
| 4560 | #[repr(transparent)] | 4378 | #[repr(transparent)] |
| 4561 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 4379 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4562 | pub struct M(pub u8); | 4380 | pub struct Tr(pub u8); |
| 4563 | impl M { | 4381 | impl Tr { |
| 4564 | #[doc = "8 data bits"] | 4382 | #[doc = "Falling edge trigger is disabled"] |
| 4565 | pub const M8: Self = Self(0); | 4383 | pub const DISABLED: Self = Self(0); |
| 4566 | #[doc = "9 data bits"] | 4384 | #[doc = "Falling edge trigger is enabled"] |
| 4567 | pub const M9: Self = Self(0x01); | 4385 | pub const ENABLED: Self = Self(0x01); |
| 4568 | } | 4386 | } |
| 4569 | #[repr(transparent)] | 4387 | #[repr(transparent)] |
| 4570 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 4388 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4571 | pub struct Cpha(pub u8); | 4389 | pub struct Swierw(pub u8); |
| 4572 | impl Cpha { | 4390 | impl Swierw { |
| 4573 | #[doc = "The first clock transition is the first data capture edge"] | 4391 | #[doc = "Generates an interrupt request"] |
| 4574 | pub const FIRST: Self = Self(0); | 4392 | pub const PEND: Self = Self(0x01); |
| 4575 | #[doc = "The second clock transition is the first data capture edge"] | ||
| 4576 | pub const SECOND: Self = Self(0x01); | ||
| 4577 | } | 4393 | } |
| 4578 | #[repr(transparent)] | 4394 | #[repr(transparent)] |
| 4579 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 4395 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4580 | pub struct Rwu(pub u8); | 4396 | pub struct Mr(pub u8); |
| 4581 | impl Rwu { | 4397 | impl Mr { |
| 4582 | #[doc = "Receiver in active mode"] | 4398 | #[doc = "Interrupt request line is masked"] |
| 4583 | pub const ACTIVE: Self = Self(0); | 4399 | pub const MASKED: Self = Self(0); |
| 4584 | #[doc = "Receiver in mute mode"] | 4400 | #[doc = "Interrupt request line is unmasked"] |
| 4585 | pub const MUTE: Self = Self(0x01); | 4401 | pub const UNMASKED: Self = Self(0x01); |
| 4586 | } | 4402 | } |
| 4587 | #[repr(transparent)] | 4403 | #[repr(transparent)] |
| 4588 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 4404 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4589 | pub struct Lbdl(pub u8); | 4405 | pub struct Prr(pub u8); |
| 4590 | impl Lbdl { | 4406 | impl Prr { |
| 4591 | #[doc = "10-bit break detection"] | 4407 | #[doc = "No trigger request occurred"] |
| 4592 | pub const LBDL10: Self = Self(0); | 4408 | pub const NOTPENDING: Self = Self(0); |
| 4593 | #[doc = "11-bit break detection"] | 4409 | #[doc = "Selected trigger request occurred"] |
| 4594 | pub const LBDL11: Self = Self(0x01); | 4410 | pub const PENDING: Self = Self(0x01); |
| 4595 | } | 4411 | } |
| 4596 | #[repr(transparent)] | 4412 | #[repr(transparent)] |
| 4597 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 4413 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 4598 | pub struct Stop(pub u8); | 4414 | pub struct Prw(pub u8); |
| 4599 | impl Stop { | 4415 | impl Prw { |
| 4600 | #[doc = "1 stop bit"] | 4416 | #[doc = "Clears pending bit"] |
| 4601 | pub const STOP1: Self = Self(0); | 4417 | pub const CLEAR: Self = Self(0x01); |
| 4602 | #[doc = "0.5 stop bits"] | ||
| 4603 | pub const STOP0P5: Self = Self(0x01); | ||
| 4604 | #[doc = "2 stop bits"] | ||
| 4605 | pub const STOP2: Self = Self(0x02); | ||
| 4606 | #[doc = "1.5 stop bits"] | ||
| 4607 | pub const STOP1P5: Self = Self(0x03); | ||
| 4608 | } | 4418 | } |
| 4609 | } | 4419 | } |
| 4610 | pub mod regs { | 4420 | pub mod regs { |
| 4611 | use crate::generic::*; | 4421 | use crate::generic::*; |
| 4612 | #[doc = "Guard time and prescaler register"] | 4422 | #[doc = "Falling Trigger selection register (EXTI_FTSR)"] |
| 4613 | #[repr(transparent)] | 4423 | #[repr(transparent)] |
| 4614 | #[derive(Copy, Clone, Eq, PartialEq)] | 4424 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 4615 | pub struct Gtpr(pub u32); | 4425 | pub struct Ftsr(pub u32); |
| 4616 | impl Gtpr { | 4426 | impl Ftsr { |
| 4617 | #[doc = "Prescaler value"] | 4427 | #[doc = "Falling trigger event configuration of line 0"] |
| 4618 | pub const fn psc(&self) -> u8 { | 4428 | pub fn tr(&self, n: usize) -> super::vals::Tr { |
| 4619 | let val = (self.0 >> 0usize) & 0xff; | 4429 | assert!(n < 23usize); |
| 4620 | val as u8 | 4430 | let offs = 0usize + n * 1usize; |
| 4621 | } | 4431 | let val = (self.0 >> offs) & 0x01; |
| 4622 | #[doc = "Prescaler value"] | 4432 | super::vals::Tr(val as u8) |
| 4623 | pub fn set_psc(&mut self, val: u8) { | ||
| 4624 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | ||
| 4625 | } | ||
| 4626 | #[doc = "Guard time value"] | ||
| 4627 | pub const fn gt(&self) -> u8 { | ||
| 4628 | let val = (self.0 >> 8usize) & 0xff; | ||
| 4629 | val as u8 | ||
| 4630 | } | 4433 | } |
| 4631 | #[doc = "Guard time value"] | 4434 | #[doc = "Falling trigger event configuration of line 0"] |
| 4632 | pub fn set_gt(&mut self, val: u8) { | 4435 | pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) { |
| 4633 | self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); | 4436 | assert!(n < 23usize); |
| 4437 | let offs = 0usize + n * 1usize; | ||
| 4438 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 4634 | } | 4439 | } |
| 4635 | } | 4440 | } |
| 4636 | impl Default for Gtpr { | 4441 | impl Default for Ftsr { |
| 4637 | fn default() -> Gtpr { | 4442 | fn default() -> Ftsr { |
| 4638 | Gtpr(0) | 4443 | Ftsr(0) |
| 4639 | } | 4444 | } |
| 4640 | } | 4445 | } |
| 4641 | #[doc = "Control register 3"] | 4446 | #[doc = "Rising Trigger selection register (EXTI_RTSR)"] |
| 4642 | #[repr(transparent)] | 4447 | #[repr(transparent)] |
| 4643 | #[derive(Copy, Clone, Eq, PartialEq)] | 4448 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 4644 | pub struct Cr3Usart(pub u32); | 4449 | pub struct Rtsr(pub u32); |
| 4645 | impl Cr3Usart { | 4450 | impl Rtsr { |
| 4646 | #[doc = "Error interrupt enable"] | 4451 | #[doc = "Rising trigger event configuration of line 0"] |
| 4647 | pub const fn eie(&self) -> bool { | 4452 | pub fn tr(&self, n: usize) -> super::vals::Tr { |
| 4648 | let val = (self.0 >> 0usize) & 0x01; | 4453 | assert!(n < 23usize); |
| 4649 | val != 0 | 4454 | let offs = 0usize + n * 1usize; |
| 4650 | } | 4455 | let val = (self.0 >> offs) & 0x01; |
| 4651 | #[doc = "Error interrupt enable"] | 4456 | super::vals::Tr(val as u8) |
| 4652 | pub fn set_eie(&mut self, val: bool) { | ||
| 4653 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 4654 | } | ||
| 4655 | #[doc = "IrDA mode enable"] | ||
| 4656 | pub const fn iren(&self) -> bool { | ||
| 4657 | let val = (self.0 >> 1usize) & 0x01; | ||
| 4658 | val != 0 | ||
| 4659 | } | ||
| 4660 | #[doc = "IrDA mode enable"] | ||
| 4661 | pub fn set_iren(&mut self, val: bool) { | ||
| 4662 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 4663 | } | ||
| 4664 | #[doc = "IrDA low-power"] | ||
| 4665 | pub const fn irlp(&self) -> super::vals::Irlp { | ||
| 4666 | let val = (self.0 >> 2usize) & 0x01; | ||
| 4667 | super::vals::Irlp(val as u8) | ||
| 4668 | } | ||
| 4669 | #[doc = "IrDA low-power"] | ||
| 4670 | pub fn set_irlp(&mut self, val: super::vals::Irlp) { | ||
| 4671 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | ||
| 4672 | } | ||
| 4673 | #[doc = "Half-duplex selection"] | ||
| 4674 | pub const fn hdsel(&self) -> super::vals::Hdsel { | ||
| 4675 | let val = (self.0 >> 3usize) & 0x01; | ||
| 4676 | super::vals::Hdsel(val as u8) | ||
| 4677 | } | ||
| 4678 | #[doc = "Half-duplex selection"] | ||
| 4679 | pub fn set_hdsel(&mut self, val: super::vals::Hdsel) { | ||
| 4680 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | ||
| 4681 | } | 4457 | } |
| 4682 | #[doc = "Smartcard NACK enable"] | 4458 | #[doc = "Rising trigger event configuration of line 0"] |
| 4683 | pub const fn nack(&self) -> bool { | 4459 | pub fn set_tr(&mut self, n: usize, val: super::vals::Tr) { |
| 4684 | let val = (self.0 >> 4usize) & 0x01; | 4460 | assert!(n < 23usize); |
| 4685 | val != 0 | 4461 | let offs = 0usize + n * 1usize; |
| 4462 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 4686 | } | 4463 | } |
| 4687 | #[doc = "Smartcard NACK enable"] | 4464 | } |
| 4688 | pub fn set_nack(&mut self, val: bool) { | 4465 | impl Default for Rtsr { |
| 4689 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | 4466 | fn default() -> Rtsr { |
| 4467 | Rtsr(0) | ||
| 4690 | } | 4468 | } |
| 4691 | #[doc = "Smartcard mode enable"] | 4469 | } |
| 4692 | pub const fn scen(&self) -> bool { | 4470 | #[doc = "Event mask register (EXTI_EMR)"] |
| 4693 | let val = (self.0 >> 5usize) & 0x01; | 4471 | #[repr(transparent)] |
| 4694 | val != 0 | 4472 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 4473 | pub struct Emr(pub u32); | ||
| 4474 | impl Emr { | ||
| 4475 | #[doc = "Event Mask on line 0"] | ||
| 4476 | pub fn mr(&self, n: usize) -> super::vals::Mr { | ||
| 4477 | assert!(n < 23usize); | ||
| 4478 | let offs = 0usize + n * 1usize; | ||
| 4479 | let val = (self.0 >> offs) & 0x01; | ||
| 4480 | super::vals::Mr(val as u8) | ||
| 4695 | } | 4481 | } |
| 4696 | #[doc = "Smartcard mode enable"] | 4482 | #[doc = "Event Mask on line 0"] |
| 4697 | pub fn set_scen(&mut self, val: bool) { | 4483 | pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) { |
| 4698 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 4484 | assert!(n < 23usize); |
| 4485 | let offs = 0usize + n * 1usize; | ||
| 4486 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 4699 | } | 4487 | } |
| 4700 | #[doc = "DMA enable receiver"] | 4488 | } |
| 4701 | pub const fn dmar(&self) -> bool { | 4489 | impl Default for Emr { |
| 4702 | let val = (self.0 >> 6usize) & 0x01; | 4490 | fn default() -> Emr { |
| 4703 | val != 0 | 4491 | Emr(0) |
| 4704 | } | 4492 | } |
| 4705 | #[doc = "DMA enable receiver"] | 4493 | } |
| 4706 | pub fn set_dmar(&mut self, val: bool) { | 4494 | #[doc = "Interrupt mask register (EXTI_IMR)"] |
| 4707 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 4495 | #[repr(transparent)] |
| 4496 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4497 | pub struct Imr(pub u32); | ||
| 4498 | impl Imr { | ||
| 4499 | #[doc = "Interrupt Mask on line 0"] | ||
| 4500 | pub fn mr(&self, n: usize) -> super::vals::Mr { | ||
| 4501 | assert!(n < 23usize); | ||
| 4502 | let offs = 0usize + n * 1usize; | ||
| 4503 | let val = (self.0 >> offs) & 0x01; | ||
| 4504 | super::vals::Mr(val as u8) | ||
| 4708 | } | 4505 | } |
| 4709 | #[doc = "DMA enable transmitter"] | 4506 | #[doc = "Interrupt Mask on line 0"] |
| 4710 | pub const fn dmat(&self) -> bool { | 4507 | pub fn set_mr(&mut self, n: usize, val: super::vals::Mr) { |
| 4711 | let val = (self.0 >> 7usize) & 0x01; | 4508 | assert!(n < 23usize); |
| 4712 | val != 0 | 4509 | let offs = 0usize + n * 1usize; |
| 4510 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 4713 | } | 4511 | } |
| 4714 | #[doc = "DMA enable transmitter"] | 4512 | } |
| 4715 | pub fn set_dmat(&mut self, val: bool) { | 4513 | impl Default for Imr { |
| 4716 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 4514 | fn default() -> Imr { |
| 4515 | Imr(0) | ||
| 4717 | } | 4516 | } |
| 4718 | #[doc = "RTS enable"] | 4517 | } |
| 4719 | pub const fn rtse(&self) -> bool { | 4518 | #[doc = "Pending register (EXTI_PR)"] |
| 4720 | let val = (self.0 >> 8usize) & 0x01; | 4519 | #[repr(transparent)] |
| 4520 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4521 | pub struct Pr(pub u32); | ||
| 4522 | impl Pr { | ||
| 4523 | #[doc = "Pending bit 0"] | ||
| 4524 | pub fn pr(&self, n: usize) -> bool { | ||
| 4525 | assert!(n < 23usize); | ||
| 4526 | let offs = 0usize + n * 1usize; | ||
| 4527 | let val = (self.0 >> offs) & 0x01; | ||
| 4721 | val != 0 | 4528 | val != 0 |
| 4722 | } | 4529 | } |
| 4723 | #[doc = "RTS enable"] | 4530 | #[doc = "Pending bit 0"] |
| 4724 | pub fn set_rtse(&mut self, val: bool) { | 4531 | pub fn set_pr(&mut self, n: usize, val: bool) { |
| 4725 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 4532 | assert!(n < 23usize); |
| 4726 | } | 4533 | let offs = 0usize + n * 1usize; |
| 4727 | #[doc = "CTS enable"] | 4534 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 4728 | pub const fn ctse(&self) -> bool { | ||
| 4729 | let val = (self.0 >> 9usize) & 0x01; | ||
| 4730 | val != 0 | ||
| 4731 | } | 4535 | } |
| 4732 | #[doc = "CTS enable"] | 4536 | } |
| 4733 | pub fn set_ctse(&mut self, val: bool) { | 4537 | impl Default for Pr { |
| 4734 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | 4538 | fn default() -> Pr { |
| 4539 | Pr(0) | ||
| 4735 | } | 4540 | } |
| 4736 | #[doc = "CTS interrupt enable"] | 4541 | } |
| 4737 | pub const fn ctsie(&self) -> bool { | 4542 | #[doc = "Software interrupt event register (EXTI_SWIER)"] |
| 4738 | let val = (self.0 >> 10usize) & 0x01; | 4543 | #[repr(transparent)] |
| 4544 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 4545 | pub struct Swier(pub u32); | ||
| 4546 | impl Swier { | ||
| 4547 | #[doc = "Software Interrupt on line 0"] | ||
| 4548 | pub fn swier(&self, n: usize) -> bool { | ||
| 4549 | assert!(n < 23usize); | ||
| 4550 | let offs = 0usize + n * 1usize; | ||
| 4551 | let val = (self.0 >> offs) & 0x01; | ||
| 4739 | val != 0 | 4552 | val != 0 |
| 4740 | } | 4553 | } |
| 4741 | #[doc = "CTS interrupt enable"] | 4554 | #[doc = "Software Interrupt on line 0"] |
| 4742 | pub fn set_ctsie(&mut self, val: bool) { | 4555 | pub fn set_swier(&mut self, n: usize, val: bool) { |
| 4743 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); | 4556 | assert!(n < 23usize); |
| 4557 | let offs = 0usize + n * 1usize; | ||
| 4558 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 4744 | } | 4559 | } |
| 4745 | } | 4560 | } |
| 4746 | impl Default for Cr3Usart { | 4561 | impl Default for Swier { |
| 4747 | fn default() -> Cr3Usart { | 4562 | fn default() -> Swier { |
| 4748 | Cr3Usart(0) | 4563 | Swier(0) |
| 4749 | } | 4564 | } |
| 4750 | } | 4565 | } |
| 4751 | #[doc = "Control register 3"] | 4566 | } |
| 4567 | } | ||
| 4568 | pub mod dma_v1 { | ||
| 4569 | use crate::generic::*; | ||
| 4570 | #[doc = "DMA controller"] | ||
| 4571 | #[derive(Copy, Clone)] | ||
| 4572 | pub struct Dma(pub *mut u8); | ||
| 4573 | unsafe impl Send for Dma {} | ||
| 4574 | unsafe impl Sync for Dma {} | ||
| 4575 | impl Dma { | ||
| 4576 | #[doc = "DMA interrupt status register (DMA_ISR)"] | ||
| 4577 | pub fn isr(self) -> Reg<regs::Isr, R> { | ||
| 4578 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 4579 | } | ||
| 4580 | #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] | ||
| 4581 | pub fn ifcr(self) -> Reg<regs::Ifcr, W> { | ||
| 4582 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 4583 | } | ||
| 4584 | #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] | ||
| 4585 | pub fn ch(self, n: usize) -> Ch { | ||
| 4586 | assert!(n < 7usize); | ||
| 4587 | unsafe { Ch(self.0.add(8usize + n * 20usize)) } | ||
| 4588 | } | ||
| 4589 | } | ||
| 4590 | #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] | ||
| 4591 | #[derive(Copy, Clone)] | ||
| 4592 | pub struct Ch(pub *mut u8); | ||
| 4593 | unsafe impl Send for Ch {} | ||
| 4594 | unsafe impl Sync for Ch {} | ||
| 4595 | impl Ch { | ||
| 4596 | #[doc = "DMA channel configuration register (DMA_CCR)"] | ||
| 4597 | pub fn cr(self) -> Reg<regs::Cr, RW> { | ||
| 4598 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 4599 | } | ||
| 4600 | #[doc = "DMA channel 1 number of data register"] | ||
| 4601 | pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { | ||
| 4602 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 4603 | } | ||
| 4604 | #[doc = "DMA channel 1 peripheral address register"] | ||
| 4605 | pub fn par(self) -> Reg<u32, RW> { | ||
| 4606 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 4607 | } | ||
| 4608 | #[doc = "DMA channel 1 memory address register"] | ||
| 4609 | pub fn mar(self) -> Reg<u32, RW> { | ||
| 4610 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 4611 | } | ||
| 4612 | } | ||
| 4613 | pub mod vals { | ||
| 4614 | use crate::generic::*; | ||
| 4615 | #[repr(transparent)] | ||
| 4616 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4617 | pub struct Pl(pub u8); | ||
| 4618 | impl Pl { | ||
| 4619 | #[doc = "Low priority"] | ||
| 4620 | pub const LOW: Self = Self(0); | ||
| 4621 | #[doc = "Medium priority"] | ||
| 4622 | pub const MEDIUM: Self = Self(0x01); | ||
| 4623 | #[doc = "High priority"] | ||
| 4624 | pub const HIGH: Self = Self(0x02); | ||
| 4625 | #[doc = "Very high priority"] | ||
| 4626 | pub const VERYHIGH: Self = Self(0x03); | ||
| 4627 | } | ||
| 4628 | #[repr(transparent)] | ||
| 4629 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4630 | pub struct Dir(pub u8); | ||
| 4631 | impl Dir { | ||
| 4632 | #[doc = "Read from peripheral"] | ||
| 4633 | pub const FROMPERIPHERAL: Self = Self(0); | ||
| 4634 | #[doc = "Read from memory"] | ||
| 4635 | pub const FROMMEMORY: Self = Self(0x01); | ||
| 4636 | } | ||
| 4637 | #[repr(transparent)] | ||
| 4638 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4639 | pub struct Size(pub u8); | ||
| 4640 | impl Size { | ||
| 4641 | #[doc = "8-bit size"] | ||
| 4642 | pub const BITS8: Self = Self(0); | ||
| 4643 | #[doc = "16-bit size"] | ||
| 4644 | pub const BITS16: Self = Self(0x01); | ||
| 4645 | #[doc = "32-bit size"] | ||
| 4646 | pub const BITS32: Self = Self(0x02); | ||
| 4647 | } | ||
| 4648 | #[repr(transparent)] | ||
| 4649 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4650 | pub struct Memmem(pub u8); | ||
| 4651 | impl Memmem { | ||
| 4652 | #[doc = "Memory to memory mode disabled"] | ||
| 4653 | pub const DISABLED: Self = Self(0); | ||
| 4654 | #[doc = "Memory to memory mode enabled"] | ||
| 4655 | pub const ENABLED: Self = Self(0x01); | ||
| 4656 | } | ||
| 4657 | #[repr(transparent)] | ||
| 4658 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4659 | pub struct Circ(pub u8); | ||
| 4660 | impl Circ { | ||
| 4661 | #[doc = "Circular buffer disabled"] | ||
| 4662 | pub const DISABLED: Self = Self(0); | ||
| 4663 | #[doc = "Circular buffer enabled"] | ||
| 4664 | pub const ENABLED: Self = Self(0x01); | ||
| 4665 | } | ||
| 4666 | #[repr(transparent)] | ||
| 4667 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 4668 | pub struct Inc(pub u8); | ||
| 4669 | impl Inc { | ||
| 4670 | #[doc = "Increment mode disabled"] | ||
| 4671 | pub const DISABLED: Self = Self(0); | ||
| 4672 | #[doc = "Increment mode enabled"] | ||
| 4673 | pub const ENABLED: Self = Self(0x01); | ||
| 4674 | } | ||
| 4675 | } | ||
| 4676 | pub mod regs { | ||
| 4677 | use crate::generic::*; | ||
| 4678 | #[doc = "DMA interrupt status register (DMA_ISR)"] | ||
| 4752 | #[repr(transparent)] | 4679 | #[repr(transparent)] |
| 4753 | #[derive(Copy, Clone, Eq, PartialEq)] | 4680 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 4754 | pub struct Cr3(pub u32); | 4681 | pub struct Isr(pub u32); |
| 4755 | impl Cr3 { | 4682 | impl Isr { |
| 4756 | #[doc = "Error interrupt enable"] | 4683 | #[doc = "Channel 1 Global interrupt flag"] |
| 4757 | pub const fn eie(&self) -> bool { | 4684 | pub fn gif(&self, n: usize) -> bool { |
| 4758 | let val = (self.0 >> 0usize) & 0x01; | 4685 | assert!(n < 7usize); |
| 4686 | let offs = 0usize + n * 4usize; | ||
| 4687 | let val = (self.0 >> offs) & 0x01; | ||
| 4759 | val != 0 | 4688 | val != 0 |
| 4760 | } | 4689 | } |
| 4761 | #[doc = "Error interrupt enable"] | 4690 | #[doc = "Channel 1 Global interrupt flag"] |
| 4762 | pub fn set_eie(&mut self, val: bool) { | 4691 | pub fn set_gif(&mut self, n: usize, val: bool) { |
| 4763 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 4692 | assert!(n < 7usize); |
| 4693 | let offs = 0usize + n * 4usize; | ||
| 4694 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 4764 | } | 4695 | } |
| 4765 | #[doc = "IrDA mode enable"] | 4696 | #[doc = "Channel 1 Transfer Complete flag"] |
| 4766 | pub const fn iren(&self) -> bool { | 4697 | pub fn tcif(&self, n: usize) -> bool { |
| 4767 | let val = (self.0 >> 1usize) & 0x01; | 4698 | assert!(n < 7usize); |
| 4699 | let offs = 1usize + n * 4usize; | ||
| 4700 | let val = (self.0 >> offs) & 0x01; | ||
| 4768 | val != 0 | 4701 | val != 0 |
| 4769 | } | 4702 | } |
| 4770 | #[doc = "IrDA mode enable"] | 4703 | #[doc = "Channel 1 Transfer Complete flag"] |
| 4771 | pub fn set_iren(&mut self, val: bool) { | 4704 | pub fn set_tcif(&mut self, n: usize, val: bool) { |
| 4772 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 4705 | assert!(n < 7usize); |
| 4773 | } | 4706 | let offs = 1usize + n * 4usize; |
| 4774 | #[doc = "IrDA low-power"] | 4707 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 4775 | pub const fn irlp(&self) -> super::vals::Irlp { | ||
| 4776 | let val = (self.0 >> 2usize) & 0x01; | ||
| 4777 | super::vals::Irlp(val as u8) | ||
| 4778 | } | ||
| 4779 | #[doc = "IrDA low-power"] | ||
| 4780 | pub fn set_irlp(&mut self, val: super::vals::Irlp) { | ||
| 4781 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | ||
| 4782 | } | ||
| 4783 | #[doc = "Half-duplex selection"] | ||
| 4784 | pub const fn hdsel(&self) -> super::vals::Hdsel { | ||
| 4785 | let val = (self.0 >> 3usize) & 0x01; | ||
| 4786 | super::vals::Hdsel(val as u8) | ||
| 4787 | } | ||
| 4788 | #[doc = "Half-duplex selection"] | ||
| 4789 | pub fn set_hdsel(&mut self, val: super::vals::Hdsel) { | ||
| 4790 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | ||
| 4791 | } | 4708 | } |
| 4792 | #[doc = "DMA enable receiver"] | 4709 | #[doc = "Channel 1 Half Transfer Complete flag"] |
| 4793 | pub const fn dmar(&self) -> bool { | 4710 | pub fn htif(&self, n: usize) -> bool { |
| 4794 | let val = (self.0 >> 6usize) & 0x01; | 4711 | assert!(n < 7usize); |
| 4712 | let offs = 2usize + n * 4usize; | ||
| 4713 | let val = (self.0 >> offs) & 0x01; | ||
| 4795 | val != 0 | 4714 | val != 0 |
| 4796 | } | 4715 | } |
| 4797 | #[doc = "DMA enable receiver"] | 4716 | #[doc = "Channel 1 Half Transfer Complete flag"] |
| 4798 | pub fn set_dmar(&mut self, val: bool) { | 4717 | pub fn set_htif(&mut self, n: usize, val: bool) { |
| 4799 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 4718 | assert!(n < 7usize); |
| 4719 | let offs = 2usize + n * 4usize; | ||
| 4720 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 4800 | } | 4721 | } |
| 4801 | #[doc = "DMA enable transmitter"] | 4722 | #[doc = "Channel 1 Transfer Error flag"] |
| 4802 | pub const fn dmat(&self) -> bool { | 4723 | pub fn teif(&self, n: usize) -> bool { |
| 4803 | let val = (self.0 >> 7usize) & 0x01; | 4724 | assert!(n < 7usize); |
| 4725 | let offs = 3usize + n * 4usize; | ||
| 4726 | let val = (self.0 >> offs) & 0x01; | ||
| 4804 | val != 0 | 4727 | val != 0 |
| 4805 | } | 4728 | } |
| 4806 | #[doc = "DMA enable transmitter"] | 4729 | #[doc = "Channel 1 Transfer Error flag"] |
| 4807 | pub fn set_dmat(&mut self, val: bool) { | 4730 | pub fn set_teif(&mut self, n: usize, val: bool) { |
| 4808 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 4731 | assert!(n < 7usize); |
| 4732 | let offs = 3usize + n * 4usize; | ||
| 4733 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 4809 | } | 4734 | } |
| 4810 | } | 4735 | } |
| 4811 | impl Default for Cr3 { | 4736 | impl Default for Isr { |
| 4812 | fn default() -> Cr3 { | 4737 | fn default() -> Isr { |
| 4813 | Cr3(0) | 4738 | Isr(0) |
| 4814 | } | 4739 | } |
| 4815 | } | 4740 | } |
| 4816 | #[doc = "Control register 2"] | 4741 | #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] |
| 4817 | #[repr(transparent)] | 4742 | #[repr(transparent)] |
| 4818 | #[derive(Copy, Clone, Eq, PartialEq)] | 4743 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 4819 | pub struct Cr2(pub u32); | 4744 | pub struct Ifcr(pub u32); |
| 4820 | impl Cr2 { | 4745 | impl Ifcr { |
| 4821 | #[doc = "Address of the USART node"] | 4746 | #[doc = "Channel 1 Global interrupt clear"] |
| 4822 | pub const fn add(&self) -> u8 { | 4747 | pub fn cgif(&self, n: usize) -> bool { |
| 4823 | let val = (self.0 >> 0usize) & 0x0f; | 4748 | assert!(n < 7usize); |
| 4824 | val as u8 | 4749 | let offs = 0usize + n * 4usize; |
| 4825 | } | 4750 | let val = (self.0 >> offs) & 0x01; |
| 4826 | #[doc = "Address of the USART node"] | 4751 | val != 0 |
| 4827 | pub fn set_add(&mut self, val: u8) { | ||
| 4828 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | ||
| 4829 | } | ||
| 4830 | #[doc = "lin break detection length"] | ||
| 4831 | pub const fn lbdl(&self) -> super::vals::Lbdl { | ||
| 4832 | let val = (self.0 >> 5usize) & 0x01; | ||
| 4833 | super::vals::Lbdl(val as u8) | ||
| 4834 | } | 4752 | } |
| 4835 | #[doc = "lin break detection length"] | 4753 | #[doc = "Channel 1 Global interrupt clear"] |
| 4836 | pub fn set_lbdl(&mut self, val: super::vals::Lbdl) { | 4754 | pub fn set_cgif(&mut self, n: usize, val: bool) { |
| 4837 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | 4755 | assert!(n < 7usize); |
| 4756 | let offs = 0usize + n * 4usize; | ||
| 4757 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 4838 | } | 4758 | } |
| 4839 | #[doc = "LIN break detection interrupt enable"] | 4759 | #[doc = "Channel 1 Transfer Complete clear"] |
| 4840 | pub const fn lbdie(&self) -> bool { | 4760 | pub fn ctcif(&self, n: usize) -> bool { |
| 4841 | let val = (self.0 >> 6usize) & 0x01; | 4761 | assert!(n < 7usize); |
| 4762 | let offs = 1usize + n * 4usize; | ||
| 4763 | let val = (self.0 >> offs) & 0x01; | ||
| 4842 | val != 0 | 4764 | val != 0 |
| 4843 | } | 4765 | } |
| 4844 | #[doc = "LIN break detection interrupt enable"] | 4766 | #[doc = "Channel 1 Transfer Complete clear"] |
| 4845 | pub fn set_lbdie(&mut self, val: bool) { | 4767 | pub fn set_ctcif(&mut self, n: usize, val: bool) { |
| 4846 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 4768 | assert!(n < 7usize); |
| 4769 | let offs = 1usize + n * 4usize; | ||
| 4770 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 4847 | } | 4771 | } |
| 4848 | #[doc = "STOP bits"] | 4772 | #[doc = "Channel 1 Half Transfer clear"] |
| 4849 | pub const fn stop(&self) -> super::vals::Stop { | 4773 | pub fn chtif(&self, n: usize) -> bool { |
| 4850 | let val = (self.0 >> 12usize) & 0x03; | 4774 | assert!(n < 7usize); |
| 4851 | super::vals::Stop(val as u8) | 4775 | let offs = 2usize + n * 4usize; |
| 4776 | let val = (self.0 >> offs) & 0x01; | ||
| 4777 | val != 0 | ||
| 4852 | } | 4778 | } |
| 4853 | #[doc = "STOP bits"] | 4779 | #[doc = "Channel 1 Half Transfer clear"] |
| 4854 | pub fn set_stop(&mut self, val: super::vals::Stop) { | 4780 | pub fn set_chtif(&mut self, n: usize, val: bool) { |
| 4855 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); | 4781 | assert!(n < 7usize); |
| 4782 | let offs = 2usize + n * 4usize; | ||
| 4783 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 4856 | } | 4784 | } |
| 4857 | #[doc = "LIN mode enable"] | 4785 | #[doc = "Channel 1 Transfer Error clear"] |
| 4858 | pub const fn linen(&self) -> bool { | 4786 | pub fn cteif(&self, n: usize) -> bool { |
| 4859 | let val = (self.0 >> 14usize) & 0x01; | 4787 | assert!(n < 7usize); |
| 4788 | let offs = 3usize + n * 4usize; | ||
| 4789 | let val = (self.0 >> offs) & 0x01; | ||
| 4860 | val != 0 | 4790 | val != 0 |
| 4861 | } | 4791 | } |
| 4862 | #[doc = "LIN mode enable"] | 4792 | #[doc = "Channel 1 Transfer Error clear"] |
| 4863 | pub fn set_linen(&mut self, val: bool) { | 4793 | pub fn set_cteif(&mut self, n: usize, val: bool) { |
| 4864 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | 4794 | assert!(n < 7usize); |
| 4795 | let offs = 3usize + n * 4usize; | ||
| 4796 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 4865 | } | 4797 | } |
| 4866 | } | 4798 | } |
| 4867 | impl Default for Cr2 { | 4799 | impl Default for Ifcr { |
| 4868 | fn default() -> Cr2 { | 4800 | fn default() -> Ifcr { |
| 4869 | Cr2(0) | 4801 | Ifcr(0) |
| 4870 | } | 4802 | } |
| 4871 | } | 4803 | } |
| 4872 | #[doc = "Control register 1"] | 4804 | #[doc = "DMA channel configuration register (DMA_CCR)"] |
| 4873 | #[repr(transparent)] | 4805 | #[repr(transparent)] |
| 4874 | #[derive(Copy, Clone, Eq, PartialEq)] | 4806 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 4875 | pub struct Cr1(pub u32); | 4807 | pub struct Cr(pub u32); |
| 4876 | impl Cr1 { | 4808 | impl Cr { |
| 4877 | #[doc = "Send break"] | 4809 | #[doc = "Channel enable"] |
| 4878 | pub const fn sbk(&self) -> super::vals::Sbk { | 4810 | pub const fn en(&self) -> bool { |
| 4879 | let val = (self.0 >> 0usize) & 0x01; | 4811 | let val = (self.0 >> 0usize) & 0x01; |
| 4880 | super::vals::Sbk(val as u8) | 4812 | val != 0 |
| 4881 | } | 4813 | } |
| 4882 | #[doc = "Send break"] | 4814 | #[doc = "Channel enable"] |
| 4883 | pub fn set_sbk(&mut self, val: super::vals::Sbk) { | 4815 | pub fn set_en(&mut self, val: bool) { |
| 4884 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize); | 4816 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 4885 | } | 4817 | } |
| 4886 | #[doc = "Receiver wakeup"] | 4818 | #[doc = "Transfer complete interrupt enable"] |
| 4887 | pub const fn rwu(&self) -> super::vals::Rwu { | 4819 | pub const fn tcie(&self) -> bool { |
| 4888 | let val = (self.0 >> 1usize) & 0x01; | 4820 | let val = (self.0 >> 1usize) & 0x01; |
| 4889 | super::vals::Rwu(val as u8) | 4821 | val != 0 |
| 4890 | } | 4822 | } |
| 4891 | #[doc = "Receiver wakeup"] | 4823 | #[doc = "Transfer complete interrupt enable"] |
| 4892 | pub fn set_rwu(&mut self, val: super::vals::Rwu) { | 4824 | pub fn set_tcie(&mut self, val: bool) { |
| 4893 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize); | 4825 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 4894 | } | 4826 | } |
| 4895 | #[doc = "Receiver enable"] | 4827 | #[doc = "Half Transfer interrupt enable"] |
| 4896 | pub const fn re(&self) -> bool { | 4828 | pub const fn htie(&self) -> bool { |
| 4897 | let val = (self.0 >> 2usize) & 0x01; | 4829 | let val = (self.0 >> 2usize) & 0x01; |
| 4898 | val != 0 | 4830 | val != 0 |
| 4899 | } | 4831 | } |
| 4900 | #[doc = "Receiver enable"] | 4832 | #[doc = "Half Transfer interrupt enable"] |
| 4901 | pub fn set_re(&mut self, val: bool) { | 4833 | pub fn set_htie(&mut self, val: bool) { |
| 4902 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 4834 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 4903 | } | 4835 | } |
| 4904 | #[doc = "Transmitter enable"] | 4836 | #[doc = "Transfer error interrupt enable"] |
| 4905 | pub const fn te(&self) -> bool { | 4837 | pub const fn teie(&self) -> bool { |
| 4906 | let val = (self.0 >> 3usize) & 0x01; | 4838 | let val = (self.0 >> 3usize) & 0x01; |
| 4907 | val != 0 | 4839 | val != 0 |
| 4908 | } | 4840 | } |
| 4909 | #[doc = "Transmitter enable"] | 4841 | #[doc = "Transfer error interrupt enable"] |
| 4910 | pub fn set_te(&mut self, val: bool) { | 4842 | pub fn set_teie(&mut self, val: bool) { |
| 4911 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 4843 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 4912 | } | 4844 | } |
| 4913 | #[doc = "IDLE interrupt enable"] | 4845 | #[doc = "Data transfer direction"] |
| 4914 | pub const fn idleie(&self) -> bool { | 4846 | pub const fn dir(&self) -> super::vals::Dir { |
| 4915 | let val = (self.0 >> 4usize) & 0x01; | 4847 | let val = (self.0 >> 4usize) & 0x01; |
| 4916 | val != 0 | 4848 | super::vals::Dir(val as u8) |
| 4917 | } | 4849 | } |
| 4918 | #[doc = "IDLE interrupt enable"] | 4850 | #[doc = "Data transfer direction"] |
| 4919 | pub fn set_idleie(&mut self, val: bool) { | 4851 | pub fn set_dir(&mut self, val: super::vals::Dir) { |
| 4920 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | 4852 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); |
| 4921 | } | 4853 | } |
| 4922 | #[doc = "RXNE interrupt enable"] | 4854 | #[doc = "Circular mode"] |
| 4923 | pub const fn rxneie(&self) -> bool { | 4855 | pub const fn circ(&self) -> super::vals::Circ { |
| 4924 | let val = (self.0 >> 5usize) & 0x01; | 4856 | let val = (self.0 >> 5usize) & 0x01; |
| 4925 | val != 0 | 4857 | super::vals::Circ(val as u8) |
| 4926 | } | 4858 | } |
| 4927 | #[doc = "RXNE interrupt enable"] | 4859 | #[doc = "Circular mode"] |
| 4928 | pub fn set_rxneie(&mut self, val: bool) { | 4860 | pub fn set_circ(&mut self, val: super::vals::Circ) { |
| 4929 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 4861 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); |
| 4930 | } | 4862 | } |
| 4931 | #[doc = "Transmission complete interrupt enable"] | 4863 | #[doc = "Peripheral increment mode"] |
| 4932 | pub const fn tcie(&self) -> bool { | 4864 | pub const fn pinc(&self) -> super::vals::Inc { |
| 4933 | let val = (self.0 >> 6usize) & 0x01; | 4865 | let val = (self.0 >> 6usize) & 0x01; |
| 4934 | val != 0 | 4866 | super::vals::Inc(val as u8) |
| 4935 | } | 4867 | } |
| 4936 | #[doc = "Transmission complete interrupt enable"] | 4868 | #[doc = "Peripheral increment mode"] |
| 4937 | pub fn set_tcie(&mut self, val: bool) { | 4869 | pub fn set_pinc(&mut self, val: super::vals::Inc) { |
| 4938 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 4870 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val.0 as u32) & 0x01) << 6usize); |
| 4939 | } | 4871 | } |
| 4940 | #[doc = "TXE interrupt enable"] | 4872 | #[doc = "Memory increment mode"] |
| 4941 | pub const fn txeie(&self) -> bool { | 4873 | pub const fn minc(&self) -> super::vals::Inc { |
| 4942 | let val = (self.0 >> 7usize) & 0x01; | 4874 | let val = (self.0 >> 7usize) & 0x01; |
| 4943 | val != 0 | 4875 | super::vals::Inc(val as u8) |
| 4944 | } | ||
| 4945 | #[doc = "TXE interrupt enable"] | ||
| 4946 | pub fn set_txeie(&mut self, val: bool) { | ||
| 4947 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 4948 | } | ||
| 4949 | #[doc = "PE interrupt enable"] | ||
| 4950 | pub const fn peie(&self) -> bool { | ||
| 4951 | let val = (self.0 >> 8usize) & 0x01; | ||
| 4952 | val != 0 | ||
| 4953 | } | ||
| 4954 | #[doc = "PE interrupt enable"] | ||
| 4955 | pub fn set_peie(&mut self, val: bool) { | ||
| 4956 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 4957 | } | ||
| 4958 | #[doc = "Parity selection"] | ||
| 4959 | pub const fn ps(&self) -> super::vals::Ps { | ||
| 4960 | let val = (self.0 >> 9usize) & 0x01; | ||
| 4961 | super::vals::Ps(val as u8) | ||
| 4962 | } | 4876 | } |
| 4963 | #[doc = "Parity selection"] | 4877 | #[doc = "Memory increment mode"] |
| 4964 | pub fn set_ps(&mut self, val: super::vals::Ps) { | 4878 | pub fn set_minc(&mut self, val: super::vals::Inc) { |
| 4965 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); | 4879 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); |
| 4966 | } | 4880 | } |
| 4967 | #[doc = "Parity control enable"] | 4881 | #[doc = "Peripheral size"] |
| 4968 | pub const fn pce(&self) -> bool { | 4882 | pub const fn psize(&self) -> super::vals::Size { |
| 4969 | let val = (self.0 >> 10usize) & 0x01; | 4883 | let val = (self.0 >> 8usize) & 0x03; |
| 4970 | val != 0 | 4884 | super::vals::Size(val as u8) |
| 4971 | } | 4885 | } |
| 4972 | #[doc = "Parity control enable"] | 4886 | #[doc = "Peripheral size"] |
| 4973 | pub fn set_pce(&mut self, val: bool) { | 4887 | pub fn set_psize(&mut self, val: super::vals::Size) { |
| 4974 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); | 4888 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); |
| 4975 | } | 4889 | } |
| 4976 | #[doc = "Wakeup method"] | 4890 | #[doc = "Memory size"] |
| 4977 | pub const fn wake(&self) -> super::vals::Wake { | 4891 | pub const fn msize(&self) -> super::vals::Size { |
| 4978 | let val = (self.0 >> 11usize) & 0x01; | 4892 | let val = (self.0 >> 10usize) & 0x03; |
| 4979 | super::vals::Wake(val as u8) | 4893 | super::vals::Size(val as u8) |
| 4980 | } | 4894 | } |
| 4981 | #[doc = "Wakeup method"] | 4895 | #[doc = "Memory size"] |
| 4982 | pub fn set_wake(&mut self, val: super::vals::Wake) { | 4896 | pub fn set_msize(&mut self, val: super::vals::Size) { |
| 4983 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); | 4897 | self.0 = (self.0 & !(0x03 << 10usize)) | (((val.0 as u32) & 0x03) << 10usize); |
| 4984 | } | 4898 | } |
| 4985 | #[doc = "Word length"] | 4899 | #[doc = "Channel Priority level"] |
| 4986 | pub const fn m(&self) -> super::vals::M { | 4900 | pub const fn pl(&self) -> super::vals::Pl { |
| 4987 | let val = (self.0 >> 12usize) & 0x01; | 4901 | let val = (self.0 >> 12usize) & 0x03; |
| 4988 | super::vals::M(val as u8) | 4902 | super::vals::Pl(val as u8) |
| 4989 | } | 4903 | } |
| 4990 | #[doc = "Word length"] | 4904 | #[doc = "Channel Priority level"] |
| 4991 | pub fn set_m(&mut self, val: super::vals::M) { | 4905 | pub fn set_pl(&mut self, val: super::vals::Pl) { |
| 4992 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); | 4906 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); |
| 4993 | } | 4907 | } |
| 4994 | #[doc = "USART enable"] | 4908 | #[doc = "Memory to memory mode"] |
| 4995 | pub const fn ue(&self) -> bool { | 4909 | pub const fn mem2mem(&self) -> super::vals::Memmem { |
| 4996 | let val = (self.0 >> 13usize) & 0x01; | 4910 | let val = (self.0 >> 14usize) & 0x01; |
| 4997 | val != 0 | 4911 | super::vals::Memmem(val as u8) |
| 4998 | } | 4912 | } |
| 4999 | #[doc = "USART enable"] | 4913 | #[doc = "Memory to memory mode"] |
| 5000 | pub fn set_ue(&mut self, val: bool) { | 4914 | pub fn set_mem2mem(&mut self, val: super::vals::Memmem) { |
| 5001 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | 4915 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); |
| 5002 | } | 4916 | } |
| 5003 | } | 4917 | } |
| 5004 | impl Default for Cr1 { | 4918 | impl Default for Cr { |
| 5005 | fn default() -> Cr1 { | 4919 | fn default() -> Cr { |
| 5006 | Cr1(0) | 4920 | Cr(0) |
| 5007 | } | 4921 | } |
| 5008 | } | 4922 | } |
| 5009 | #[doc = "Baud rate register"] | 4923 | #[doc = "DMA channel 1 number of data register"] |
| 5010 | #[repr(transparent)] | 4924 | #[repr(transparent)] |
| 5011 | #[derive(Copy, Clone, Eq, PartialEq)] | 4925 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5012 | pub struct Brr(pub u32); | 4926 | pub struct Ndtr(pub u32); |
| 5013 | impl Brr { | 4927 | impl Ndtr { |
| 5014 | #[doc = "fraction of USARTDIV"] | 4928 | #[doc = "Number of data to transfer"] |
| 5015 | pub const fn div_fraction(&self) -> u8 { | 4929 | pub const fn ndt(&self) -> u16 { |
| 5016 | let val = (self.0 >> 0usize) & 0x0f; | 4930 | let val = (self.0 >> 0usize) & 0xffff; |
| 5017 | val as u8 | ||
| 5018 | } | ||
| 5019 | #[doc = "fraction of USARTDIV"] | ||
| 5020 | pub fn set_div_fraction(&mut self, val: u8) { | ||
| 5021 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | ||
| 5022 | } | ||
| 5023 | #[doc = "mantissa of USARTDIV"] | ||
| 5024 | pub const fn div_mantissa(&self) -> u16 { | ||
| 5025 | let val = (self.0 >> 4usize) & 0x0fff; | ||
| 5026 | val as u16 | 4931 | val as u16 |
| 5027 | } | 4932 | } |
| 5028 | #[doc = "mantissa of USARTDIV"] | 4933 | #[doc = "Number of data to transfer"] |
| 5029 | pub fn set_div_mantissa(&mut self, val: u16) { | 4934 | pub fn set_ndt(&mut self, val: u16) { |
| 5030 | self.0 = (self.0 & !(0x0fff << 4usize)) | (((val as u32) & 0x0fff) << 4usize); | 4935 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 5031 | } | 4936 | } |
| 5032 | } | 4937 | } |
| 5033 | impl Default for Brr { | 4938 | impl Default for Ndtr { |
| 5034 | fn default() -> Brr { | 4939 | fn default() -> Ndtr { |
| 5035 | Brr(0) | 4940 | Ndtr(0) |
| 5036 | } | 4941 | } |
| 5037 | } | 4942 | } |
| 5038 | #[doc = "Status register"] | 4943 | } |
| 4944 | } | ||
| 4945 | pub mod rng_v1 { | ||
| 4946 | use crate::generic::*; | ||
| 4947 | #[doc = "Random number generator"] | ||
| 4948 | #[derive(Copy, Clone)] | ||
| 4949 | pub struct Rng(pub *mut u8); | ||
| 4950 | unsafe impl Send for Rng {} | ||
| 4951 | unsafe impl Sync for Rng {} | ||
| 4952 | impl Rng { | ||
| 4953 | #[doc = "control register"] | ||
| 4954 | pub fn cr(self) -> Reg<regs::Cr, RW> { | ||
| 4955 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 4956 | } | ||
| 4957 | #[doc = "status register"] | ||
| 4958 | pub fn sr(self) -> Reg<regs::Sr, RW> { | ||
| 4959 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 4960 | } | ||
| 4961 | #[doc = "data register"] | ||
| 4962 | pub fn dr(self) -> Reg<u32, R> { | ||
| 4963 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 4964 | } | ||
| 4965 | } | ||
| 4966 | pub mod regs { | ||
| 4967 | use crate::generic::*; | ||
| 4968 | #[doc = "status register"] | ||
| 5039 | #[repr(transparent)] | 4969 | #[repr(transparent)] |
| 5040 | #[derive(Copy, Clone, Eq, PartialEq)] | 4970 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5041 | pub struct Sr(pub u32); | 4971 | pub struct Sr(pub u32); |
| 5042 | impl Sr { | 4972 | impl Sr { |
| 5043 | #[doc = "Parity error"] | 4973 | #[doc = "Data ready"] |
| 5044 | pub const fn pe(&self) -> bool { | 4974 | pub const fn drdy(&self) -> bool { |
| 5045 | let val = (self.0 >> 0usize) & 0x01; | 4975 | let val = (self.0 >> 0usize) & 0x01; |
| 5046 | val != 0 | 4976 | val != 0 |
| 5047 | } | 4977 | } |
| 5048 | #[doc = "Parity error"] | 4978 | #[doc = "Data ready"] |
| 5049 | pub fn set_pe(&mut self, val: bool) { | 4979 | pub fn set_drdy(&mut self, val: bool) { |
| 5050 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 4980 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 5051 | } | 4981 | } |
| 5052 | #[doc = "Framing error"] | 4982 | #[doc = "Clock error current status"] |
| 5053 | pub const fn fe(&self) -> bool { | 4983 | pub const fn cecs(&self) -> bool { |
| 5054 | let val = (self.0 >> 1usize) & 0x01; | 4984 | let val = (self.0 >> 1usize) & 0x01; |
| 5055 | val != 0 | 4985 | val != 0 |
| 5056 | } | 4986 | } |
| 5057 | #[doc = "Framing error"] | 4987 | #[doc = "Clock error current status"] |
| 5058 | pub fn set_fe(&mut self, val: bool) { | 4988 | pub fn set_cecs(&mut self, val: bool) { |
| 5059 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 4989 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 5060 | } | 4990 | } |
| 5061 | #[doc = "Noise error flag"] | 4991 | #[doc = "Seed error current status"] |
| 5062 | pub const fn ne(&self) -> bool { | 4992 | pub const fn secs(&self) -> bool { |
| 5063 | let val = (self.0 >> 2usize) & 0x01; | 4993 | let val = (self.0 >> 2usize) & 0x01; |
| 5064 | val != 0 | 4994 | val != 0 |
| 5065 | } | 4995 | } |
| 5066 | #[doc = "Noise error flag"] | 4996 | #[doc = "Seed error current status"] |
| 5067 | pub fn set_ne(&mut self, val: bool) { | 4997 | pub fn set_secs(&mut self, val: bool) { |
| 5068 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 4998 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 5069 | } | 4999 | } |
| 5070 | #[doc = "Overrun error"] | 5000 | #[doc = "Clock error interrupt status"] |
| 5071 | pub const fn ore(&self) -> bool { | 5001 | pub const fn ceis(&self) -> bool { |
| 5072 | let val = (self.0 >> 3usize) & 0x01; | ||
| 5073 | val != 0 | ||
| 5074 | } | ||
| 5075 | #[doc = "Overrun error"] | ||
| 5076 | pub fn set_ore(&mut self, val: bool) { | ||
| 5077 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 5078 | } | ||
| 5079 | #[doc = "IDLE line detected"] | ||
| 5080 | pub const fn idle(&self) -> bool { | ||
| 5081 | let val = (self.0 >> 4usize) & 0x01; | ||
| 5082 | val != 0 | ||
| 5083 | } | ||
| 5084 | #[doc = "IDLE line detected"] | ||
| 5085 | pub fn set_idle(&mut self, val: bool) { | ||
| 5086 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 5087 | } | ||
| 5088 | #[doc = "Read data register not empty"] | ||
| 5089 | pub const fn rxne(&self) -> bool { | ||
| 5090 | let val = (self.0 >> 5usize) & 0x01; | 5002 | let val = (self.0 >> 5usize) & 0x01; |
| 5091 | val != 0 | 5003 | val != 0 |
| 5092 | } | 5004 | } |
| 5093 | #[doc = "Read data register not empty"] | 5005 | #[doc = "Clock error interrupt status"] |
| 5094 | pub fn set_rxne(&mut self, val: bool) { | 5006 | pub fn set_ceis(&mut self, val: bool) { |
| 5095 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 5007 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 5096 | } | 5008 | } |
| 5097 | #[doc = "Transmission complete"] | 5009 | #[doc = "Seed error interrupt status"] |
| 5098 | pub const fn tc(&self) -> bool { | 5010 | pub const fn seis(&self) -> bool { |
| 5099 | let val = (self.0 >> 6usize) & 0x01; | 5011 | let val = (self.0 >> 6usize) & 0x01; |
| 5100 | val != 0 | 5012 | val != 0 |
| 5101 | } | 5013 | } |
| 5102 | #[doc = "Transmission complete"] | 5014 | #[doc = "Seed error interrupt status"] |
| 5103 | pub fn set_tc(&mut self, val: bool) { | 5015 | pub fn set_seis(&mut self, val: bool) { |
| 5104 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 5016 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 5105 | } | 5017 | } |
| 5106 | #[doc = "Transmit data register empty"] | ||
| 5107 | pub const fn txe(&self) -> bool { | ||
| 5108 | let val = (self.0 >> 7usize) & 0x01; | ||
| 5109 | val != 0 | ||
| 5110 | } | ||
| 5111 | #[doc = "Transmit data register empty"] | ||
| 5112 | pub fn set_txe(&mut self, val: bool) { | ||
| 5113 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 5114 | } | ||
| 5115 | #[doc = "LIN break detection flag"] | ||
| 5116 | pub const fn lbd(&self) -> bool { | ||
| 5117 | let val = (self.0 >> 8usize) & 0x01; | ||
| 5118 | val != 0 | ||
| 5119 | } | ||
| 5120 | #[doc = "LIN break detection flag"] | ||
| 5121 | pub fn set_lbd(&mut self, val: bool) { | ||
| 5122 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 5123 | } | ||
| 5124 | } | 5018 | } |
| 5125 | impl Default for Sr { | 5019 | impl Default for Sr { |
| 5126 | fn default() -> Sr { | 5020 | fn default() -> Sr { |
| 5127 | Sr(0) | 5021 | Sr(0) |
| 5128 | } | 5022 | } |
| 5129 | } | 5023 | } |
| 5130 | #[doc = "Status register"] | 5024 | #[doc = "control register"] |
| 5131 | #[repr(transparent)] | 5025 | #[repr(transparent)] |
| 5132 | #[derive(Copy, Clone, Eq, PartialEq)] | 5026 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5133 | pub struct SrUsart(pub u32); | 5027 | pub struct Cr(pub u32); |
| 5134 | impl SrUsart { | 5028 | impl Cr { |
| 5135 | #[doc = "Parity error"] | 5029 | #[doc = "Random number generator enable"] |
| 5136 | pub const fn pe(&self) -> bool { | 5030 | pub const fn rngen(&self) -> bool { |
| 5137 | let val = (self.0 >> 0usize) & 0x01; | ||
| 5138 | val != 0 | ||
| 5139 | } | ||
| 5140 | #[doc = "Parity error"] | ||
| 5141 | pub fn set_pe(&mut self, val: bool) { | ||
| 5142 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 5143 | } | ||
| 5144 | #[doc = "Framing error"] | ||
| 5145 | pub const fn fe(&self) -> bool { | ||
| 5146 | let val = (self.0 >> 1usize) & 0x01; | ||
| 5147 | val != 0 | ||
| 5148 | } | ||
| 5149 | #[doc = "Framing error"] | ||
| 5150 | pub fn set_fe(&mut self, val: bool) { | ||
| 5151 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 5152 | } | ||
| 5153 | #[doc = "Noise error flag"] | ||
| 5154 | pub const fn ne(&self) -> bool { | ||
| 5155 | let val = (self.0 >> 2usize) & 0x01; | 5031 | let val = (self.0 >> 2usize) & 0x01; |
| 5156 | val != 0 | 5032 | val != 0 |
| 5157 | } | 5033 | } |
| 5158 | #[doc = "Noise error flag"] | 5034 | #[doc = "Random number generator enable"] |
| 5159 | pub fn set_ne(&mut self, val: bool) { | 5035 | pub fn set_rngen(&mut self, val: bool) { |
| 5160 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 5036 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 5161 | } | 5037 | } |
| 5162 | #[doc = "Overrun error"] | 5038 | #[doc = "Interrupt enable"] |
| 5163 | pub const fn ore(&self) -> bool { | 5039 | pub const fn ie(&self) -> bool { |
| 5164 | let val = (self.0 >> 3usize) & 0x01; | 5040 | let val = (self.0 >> 3usize) & 0x01; |
| 5165 | val != 0 | 5041 | val != 0 |
| 5166 | } | 5042 | } |
| 5167 | #[doc = "Overrun error"] | 5043 | #[doc = "Interrupt enable"] |
| 5168 | pub fn set_ore(&mut self, val: bool) { | 5044 | pub fn set_ie(&mut self, val: bool) { |
| 5169 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 5045 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 5170 | } | 5046 | } |
| 5171 | #[doc = "IDLE line detected"] | 5047 | } |
| 5172 | pub const fn idle(&self) -> bool { | 5048 | impl Default for Cr { |
| 5173 | let val = (self.0 >> 4usize) & 0x01; | 5049 | fn default() -> Cr { |
| 5174 | val != 0 | 5050 | Cr(0) |
| 5175 | } | ||
| 5176 | #[doc = "IDLE line detected"] | ||
| 5177 | pub fn set_idle(&mut self, val: bool) { | ||
| 5178 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 5179 | } | 5051 | } |
| 5180 | #[doc = "Read data register not empty"] | 5052 | } |
| 5181 | pub const fn rxne(&self) -> bool { | 5053 | } |
| 5182 | let val = (self.0 >> 5usize) & 0x01; | 5054 | } |
| 5183 | val != 0 | 5055 | pub mod gpio_v2 { |
| 5056 | use crate::generic::*; | ||
| 5057 | #[doc = "General-purpose I/Os"] | ||
| 5058 | #[derive(Copy, Clone)] | ||
| 5059 | pub struct Gpio(pub *mut u8); | ||
| 5060 | unsafe impl Send for Gpio {} | ||
| 5061 | unsafe impl Sync for Gpio {} | ||
| 5062 | impl Gpio { | ||
| 5063 | #[doc = "GPIO port mode register"] | ||
| 5064 | pub fn moder(self) -> Reg<regs::Moder, RW> { | ||
| 5065 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 5066 | } | ||
| 5067 | #[doc = "GPIO port output type register"] | ||
| 5068 | pub fn otyper(self) -> Reg<regs::Otyper, RW> { | ||
| 5069 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 5070 | } | ||
| 5071 | #[doc = "GPIO port output speed register"] | ||
| 5072 | pub fn ospeedr(self) -> Reg<regs::Ospeedr, RW> { | ||
| 5073 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 5074 | } | ||
| 5075 | #[doc = "GPIO port pull-up/pull-down register"] | ||
| 5076 | pub fn pupdr(self) -> Reg<regs::Pupdr, RW> { | ||
| 5077 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 5078 | } | ||
| 5079 | #[doc = "GPIO port input data register"] | ||
| 5080 | pub fn idr(self) -> Reg<regs::Idr, R> { | ||
| 5081 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 5082 | } | ||
| 5083 | #[doc = "GPIO port output data register"] | ||
| 5084 | pub fn odr(self) -> Reg<regs::Odr, RW> { | ||
| 5085 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 5086 | } | ||
| 5087 | #[doc = "GPIO port bit set/reset register"] | ||
| 5088 | pub fn bsrr(self) -> Reg<regs::Bsrr, W> { | ||
| 5089 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 5090 | } | ||
| 5091 | #[doc = "GPIO port configuration lock register"] | ||
| 5092 | pub fn lckr(self) -> Reg<regs::Lckr, RW> { | ||
| 5093 | unsafe { Reg::from_ptr(self.0.add(28usize)) } | ||
| 5094 | } | ||
| 5095 | #[doc = "GPIO alternate function register (low, high)"] | ||
| 5096 | pub fn afr(self, n: usize) -> Reg<regs::Afr, RW> { | ||
| 5097 | assert!(n < 2usize); | ||
| 5098 | unsafe { Reg::from_ptr(self.0.add(32usize + n * 4usize)) } | ||
| 5099 | } | ||
| 5100 | } | ||
| 5101 | pub mod vals { | ||
| 5102 | use crate::generic::*; | ||
| 5103 | #[repr(transparent)] | ||
| 5104 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5105 | pub struct Ot(pub u8); | ||
| 5106 | impl Ot { | ||
| 5107 | #[doc = "Output push-pull (reset state)"] | ||
| 5108 | pub const PUSHPULL: Self = Self(0); | ||
| 5109 | #[doc = "Output open-drain"] | ||
| 5110 | pub const OPENDRAIN: Self = Self(0x01); | ||
| 5111 | } | ||
| 5112 | #[repr(transparent)] | ||
| 5113 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5114 | pub struct Pupdr(pub u8); | ||
| 5115 | impl Pupdr { | ||
| 5116 | #[doc = "No pull-up, pull-down"] | ||
| 5117 | pub const FLOATING: Self = Self(0); | ||
| 5118 | #[doc = "Pull-up"] | ||
| 5119 | pub const PULLUP: Self = Self(0x01); | ||
| 5120 | #[doc = "Pull-down"] | ||
| 5121 | pub const PULLDOWN: Self = Self(0x02); | ||
| 5122 | } | ||
| 5123 | #[repr(transparent)] | ||
| 5124 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5125 | pub struct Afr(pub u8); | ||
| 5126 | impl Afr { | ||
| 5127 | #[doc = "AF0"] | ||
| 5128 | pub const AF0: Self = Self(0); | ||
| 5129 | #[doc = "AF1"] | ||
| 5130 | pub const AF1: Self = Self(0x01); | ||
| 5131 | #[doc = "AF2"] | ||
| 5132 | pub const AF2: Self = Self(0x02); | ||
| 5133 | #[doc = "AF3"] | ||
| 5134 | pub const AF3: Self = Self(0x03); | ||
| 5135 | #[doc = "AF4"] | ||
| 5136 | pub const AF4: Self = Self(0x04); | ||
| 5137 | #[doc = "AF5"] | ||
| 5138 | pub const AF5: Self = Self(0x05); | ||
| 5139 | #[doc = "AF6"] | ||
| 5140 | pub const AF6: Self = Self(0x06); | ||
| 5141 | #[doc = "AF7"] | ||
| 5142 | pub const AF7: Self = Self(0x07); | ||
| 5143 | #[doc = "AF8"] | ||
| 5144 | pub const AF8: Self = Self(0x08); | ||
| 5145 | #[doc = "AF9"] | ||
| 5146 | pub const AF9: Self = Self(0x09); | ||
| 5147 | #[doc = "AF10"] | ||
| 5148 | pub const AF10: Self = Self(0x0a); | ||
| 5149 | #[doc = "AF11"] | ||
| 5150 | pub const AF11: Self = Self(0x0b); | ||
| 5151 | #[doc = "AF12"] | ||
| 5152 | pub const AF12: Self = Self(0x0c); | ||
| 5153 | #[doc = "AF13"] | ||
| 5154 | pub const AF13: Self = Self(0x0d); | ||
| 5155 | #[doc = "AF14"] | ||
| 5156 | pub const AF14: Self = Self(0x0e); | ||
| 5157 | #[doc = "AF15"] | ||
| 5158 | pub const AF15: Self = Self(0x0f); | ||
| 5159 | } | ||
| 5160 | #[repr(transparent)] | ||
| 5161 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5162 | pub struct Moder(pub u8); | ||
| 5163 | impl Moder { | ||
| 5164 | #[doc = "Input mode (reset state)"] | ||
| 5165 | pub const INPUT: Self = Self(0); | ||
| 5166 | #[doc = "General purpose output mode"] | ||
| 5167 | pub const OUTPUT: Self = Self(0x01); | ||
| 5168 | #[doc = "Alternate function mode"] | ||
| 5169 | pub const ALTERNATE: Self = Self(0x02); | ||
| 5170 | #[doc = "Analog mode"] | ||
| 5171 | pub const ANALOG: Self = Self(0x03); | ||
| 5172 | } | ||
| 5173 | #[repr(transparent)] | ||
| 5174 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5175 | pub struct Ospeedr(pub u8); | ||
| 5176 | impl Ospeedr { | ||
| 5177 | #[doc = "Low speed"] | ||
| 5178 | pub const LOWSPEED: Self = Self(0); | ||
| 5179 | #[doc = "Medium speed"] | ||
| 5180 | pub const MEDIUMSPEED: Self = Self(0x01); | ||
| 5181 | #[doc = "High speed"] | ||
| 5182 | pub const HIGHSPEED: Self = Self(0x02); | ||
| 5183 | #[doc = "Very high speed"] | ||
| 5184 | pub const VERYHIGHSPEED: Self = Self(0x03); | ||
| 5185 | } | ||
| 5186 | #[repr(transparent)] | ||
| 5187 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5188 | pub struct Idr(pub u8); | ||
| 5189 | impl Idr { | ||
| 5190 | #[doc = "Input is logic low"] | ||
| 5191 | pub const LOW: Self = Self(0); | ||
| 5192 | #[doc = "Input is logic high"] | ||
| 5193 | pub const HIGH: Self = Self(0x01); | ||
| 5194 | } | ||
| 5195 | #[repr(transparent)] | ||
| 5196 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5197 | pub struct Odr(pub u8); | ||
| 5198 | impl Odr { | ||
| 5199 | #[doc = "Set output to logic low"] | ||
| 5200 | pub const LOW: Self = Self(0); | ||
| 5201 | #[doc = "Set output to logic high"] | ||
| 5202 | pub const HIGH: Self = Self(0x01); | ||
| 5203 | } | ||
| 5204 | #[repr(transparent)] | ||
| 5205 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5206 | pub struct Brw(pub u8); | ||
| 5207 | impl Brw { | ||
| 5208 | #[doc = "Resets the corresponding ODRx bit"] | ||
| 5209 | pub const RESET: Self = Self(0x01); | ||
| 5210 | } | ||
| 5211 | #[repr(transparent)] | ||
| 5212 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5213 | pub struct Bsw(pub u8); | ||
| 5214 | impl Bsw { | ||
| 5215 | #[doc = "Sets the corresponding ODRx bit"] | ||
| 5216 | pub const SET: Self = Self(0x01); | ||
| 5217 | } | ||
| 5218 | #[repr(transparent)] | ||
| 5219 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5220 | pub struct Lckk(pub u8); | ||
| 5221 | impl Lckk { | ||
| 5222 | #[doc = "Port configuration lock key not active"] | ||
| 5223 | pub const NOTACTIVE: Self = Self(0); | ||
| 5224 | #[doc = "Port configuration lock key active"] | ||
| 5225 | pub const ACTIVE: Self = Self(0x01); | ||
| 5226 | } | ||
| 5227 | #[repr(transparent)] | ||
| 5228 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 5229 | pub struct Lck(pub u8); | ||
| 5230 | impl Lck { | ||
| 5231 | #[doc = "Port configuration not locked"] | ||
| 5232 | pub const UNLOCKED: Self = Self(0); | ||
| 5233 | #[doc = "Port configuration locked"] | ||
| 5234 | pub const LOCKED: Self = Self(0x01); | ||
| 5235 | } | ||
| 5236 | } | ||
| 5237 | pub mod regs { | ||
| 5238 | use crate::generic::*; | ||
| 5239 | #[doc = "GPIO alternate function register"] | ||
| 5240 | #[repr(transparent)] | ||
| 5241 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5242 | pub struct Afr(pub u32); | ||
| 5243 | impl Afr { | ||
| 5244 | #[doc = "Alternate function selection for port x bit y (y = 0..15)"] | ||
| 5245 | pub fn afr(&self, n: usize) -> super::vals::Afr { | ||
| 5246 | assert!(n < 8usize); | ||
| 5247 | let offs = 0usize + n * 4usize; | ||
| 5248 | let val = (self.0 >> offs) & 0x0f; | ||
| 5249 | super::vals::Afr(val as u8) | ||
| 5184 | } | 5250 | } |
| 5185 | #[doc = "Read data register not empty"] | 5251 | #[doc = "Alternate function selection for port x bit y (y = 0..15)"] |
| 5186 | pub fn set_rxne(&mut self, val: bool) { | 5252 | pub fn set_afr(&mut self, n: usize, val: super::vals::Afr) { |
| 5187 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 5253 | assert!(n < 8usize); |
| 5254 | let offs = 0usize + n * 4usize; | ||
| 5255 | self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs); | ||
| 5188 | } | 5256 | } |
| 5189 | #[doc = "Transmission complete"] | 5257 | } |
| 5190 | pub const fn tc(&self) -> bool { | 5258 | impl Default for Afr { |
| 5191 | let val = (self.0 >> 6usize) & 0x01; | 5259 | fn default() -> Afr { |
| 5192 | val != 0 | 5260 | Afr(0) |
| 5193 | } | 5261 | } |
| 5194 | #[doc = "Transmission complete"] | 5262 | } |
| 5195 | pub fn set_tc(&mut self, val: bool) { | 5263 | #[doc = "GPIO port configuration lock register"] |
| 5196 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 5264 | #[repr(transparent)] |
| 5265 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5266 | pub struct Lckr(pub u32); | ||
| 5267 | impl Lckr { | ||
| 5268 | #[doc = "Port x lock bit y (y= 0..15)"] | ||
| 5269 | pub fn lck(&self, n: usize) -> super::vals::Lck { | ||
| 5270 | assert!(n < 16usize); | ||
| 5271 | let offs = 0usize + n * 1usize; | ||
| 5272 | let val = (self.0 >> offs) & 0x01; | ||
| 5273 | super::vals::Lck(val as u8) | ||
| 5197 | } | 5274 | } |
| 5198 | #[doc = "Transmit data register empty"] | 5275 | #[doc = "Port x lock bit y (y= 0..15)"] |
| 5199 | pub const fn txe(&self) -> bool { | 5276 | pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { |
| 5200 | let val = (self.0 >> 7usize) & 0x01; | 5277 | assert!(n < 16usize); |
| 5201 | val != 0 | 5278 | let offs = 0usize + n * 1usize; |
| 5279 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 5202 | } | 5280 | } |
| 5203 | #[doc = "Transmit data register empty"] | 5281 | #[doc = "Port x lock bit y (y= 0..15)"] |
| 5204 | pub fn set_txe(&mut self, val: bool) { | 5282 | pub const fn lckk(&self) -> super::vals::Lckk { |
| 5205 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 5283 | let val = (self.0 >> 16usize) & 0x01; |
| 5284 | super::vals::Lckk(val as u8) | ||
| 5206 | } | 5285 | } |
| 5207 | #[doc = "LIN break detection flag"] | 5286 | #[doc = "Port x lock bit y (y= 0..15)"] |
| 5208 | pub const fn lbd(&self) -> bool { | 5287 | pub fn set_lckk(&mut self, val: super::vals::Lckk) { |
| 5209 | let val = (self.0 >> 8usize) & 0x01; | 5288 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); |
| 5210 | val != 0 | ||
| 5211 | } | 5289 | } |
| 5212 | #[doc = "LIN break detection flag"] | 5290 | } |
| 5213 | pub fn set_lbd(&mut self, val: bool) { | 5291 | impl Default for Lckr { |
| 5214 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 5292 | fn default() -> Lckr { |
| 5293 | Lckr(0) | ||
| 5215 | } | 5294 | } |
| 5216 | #[doc = "CTS flag"] | 5295 | } |
| 5217 | pub const fn cts(&self) -> bool { | 5296 | #[doc = "GPIO port output speed register"] |
| 5218 | let val = (self.0 >> 9usize) & 0x01; | 5297 | #[repr(transparent)] |
| 5219 | val != 0 | 5298 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5299 | pub struct Ospeedr(pub u32); | ||
| 5300 | impl Ospeedr { | ||
| 5301 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 5302 | pub fn ospeedr(&self, n: usize) -> super::vals::Ospeedr { | ||
| 5303 | assert!(n < 16usize); | ||
| 5304 | let offs = 0usize + n * 2usize; | ||
| 5305 | let val = (self.0 >> offs) & 0x03; | ||
| 5306 | super::vals::Ospeedr(val as u8) | ||
| 5220 | } | 5307 | } |
| 5221 | #[doc = "CTS flag"] | 5308 | #[doc = "Port x configuration bits (y = 0..15)"] |
| 5222 | pub fn set_cts(&mut self, val: bool) { | 5309 | pub fn set_ospeedr(&mut self, n: usize, val: super::vals::Ospeedr) { |
| 5223 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | 5310 | assert!(n < 16usize); |
| 5311 | let offs = 0usize + n * 2usize; | ||
| 5312 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 5224 | } | 5313 | } |
| 5225 | } | 5314 | } |
| 5226 | impl Default for SrUsart { | 5315 | impl Default for Ospeedr { |
| 5227 | fn default() -> SrUsart { | 5316 | fn default() -> Ospeedr { |
| 5228 | SrUsart(0) | 5317 | Ospeedr(0) |
| 5229 | } | 5318 | } |
| 5230 | } | 5319 | } |
| 5231 | #[doc = "Data register"] | 5320 | #[doc = "GPIO port input data register"] |
| 5232 | #[repr(transparent)] | 5321 | #[repr(transparent)] |
| 5233 | #[derive(Copy, Clone, Eq, PartialEq)] | 5322 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5234 | pub struct Dr(pub u32); | 5323 | pub struct Idr(pub u32); |
| 5235 | impl Dr { | 5324 | impl Idr { |
| 5236 | #[doc = "Data value"] | 5325 | #[doc = "Port input data (y = 0..15)"] |
| 5237 | pub const fn dr(&self) -> u16 { | 5326 | pub fn idr(&self, n: usize) -> super::vals::Idr { |
| 5238 | let val = (self.0 >> 0usize) & 0x01ff; | 5327 | assert!(n < 16usize); |
| 5239 | val as u16 | 5328 | let offs = 0usize + n * 1usize; |
| 5329 | let val = (self.0 >> offs) & 0x01; | ||
| 5330 | super::vals::Idr(val as u8) | ||
| 5240 | } | 5331 | } |
| 5241 | #[doc = "Data value"] | 5332 | #[doc = "Port input data (y = 0..15)"] |
| 5242 | pub fn set_dr(&mut self, val: u16) { | 5333 | pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { |
| 5243 | self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); | 5334 | assert!(n < 16usize); |
| 5335 | let offs = 0usize + n * 1usize; | ||
| 5336 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 5244 | } | 5337 | } |
| 5245 | } | 5338 | } |
| 5246 | impl Default for Dr { | 5339 | impl Default for Idr { |
| 5247 | fn default() -> Dr { | 5340 | fn default() -> Idr { |
| 5248 | Dr(0) | 5341 | Idr(0) |
| 5249 | } | 5342 | } |
| 5250 | } | 5343 | } |
| 5251 | #[doc = "Control register 2"] | 5344 | #[doc = "GPIO port bit set/reset register"] |
| 5252 | #[repr(transparent)] | 5345 | #[repr(transparent)] |
| 5253 | #[derive(Copy, Clone, Eq, PartialEq)] | 5346 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5254 | pub struct Cr2Usart(pub u32); | 5347 | pub struct Bsrr(pub u32); |
| 5255 | impl Cr2Usart { | 5348 | impl Bsrr { |
| 5256 | #[doc = "Address of the USART node"] | 5349 | #[doc = "Port x set bit y (y= 0..15)"] |
| 5257 | pub const fn add(&self) -> u8 { | 5350 | pub fn bs(&self, n: usize) -> bool { |
| 5258 | let val = (self.0 >> 0usize) & 0x0f; | 5351 | assert!(n < 16usize); |
| 5259 | val as u8 | 5352 | let offs = 0usize + n * 1usize; |
| 5260 | } | 5353 | let val = (self.0 >> offs) & 0x01; |
| 5261 | #[doc = "Address of the USART node"] | 5354 | val != 0 |
| 5262 | pub fn set_add(&mut self, val: u8) { | ||
| 5263 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | ||
| 5264 | } | ||
| 5265 | #[doc = "lin break detection length"] | ||
| 5266 | pub const fn lbdl(&self) -> super::vals::Lbdl { | ||
| 5267 | let val = (self.0 >> 5usize) & 0x01; | ||
| 5268 | super::vals::Lbdl(val as u8) | ||
| 5269 | } | 5355 | } |
| 5270 | #[doc = "lin break detection length"] | 5356 | #[doc = "Port x set bit y (y= 0..15)"] |
| 5271 | pub fn set_lbdl(&mut self, val: super::vals::Lbdl) { | 5357 | pub fn set_bs(&mut self, n: usize, val: bool) { |
| 5272 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | 5358 | assert!(n < 16usize); |
| 5359 | let offs = 0usize + n * 1usize; | ||
| 5360 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 5273 | } | 5361 | } |
| 5274 | #[doc = "LIN break detection interrupt enable"] | 5362 | #[doc = "Port x set bit y (y= 0..15)"] |
| 5275 | pub const fn lbdie(&self) -> bool { | 5363 | pub fn br(&self, n: usize) -> bool { |
| 5276 | let val = (self.0 >> 6usize) & 0x01; | 5364 | assert!(n < 16usize); |
| 5365 | let offs = 16usize + n * 1usize; | ||
| 5366 | let val = (self.0 >> offs) & 0x01; | ||
| 5277 | val != 0 | 5367 | val != 0 |
| 5278 | } | 5368 | } |
| 5279 | #[doc = "LIN break detection interrupt enable"] | 5369 | #[doc = "Port x set bit y (y= 0..15)"] |
| 5280 | pub fn set_lbdie(&mut self, val: bool) { | 5370 | pub fn set_br(&mut self, n: usize, val: bool) { |
| 5281 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 5371 | assert!(n < 16usize); |
| 5372 | let offs = 16usize + n * 1usize; | ||
| 5373 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 5282 | } | 5374 | } |
| 5283 | #[doc = "Last bit clock pulse"] | 5375 | } |
| 5284 | pub const fn lbcl(&self) -> bool { | 5376 | impl Default for Bsrr { |
| 5285 | let val = (self.0 >> 8usize) & 0x01; | 5377 | fn default() -> Bsrr { |
| 5286 | val != 0 | 5378 | Bsrr(0) |
| 5287 | } | 5379 | } |
| 5288 | #[doc = "Last bit clock pulse"] | 5380 | } |
| 5289 | pub fn set_lbcl(&mut self, val: bool) { | 5381 | #[doc = "GPIO port output type register"] |
| 5290 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 5382 | #[repr(transparent)] |
| 5383 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5384 | pub struct Otyper(pub u32); | ||
| 5385 | impl Otyper { | ||
| 5386 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 5387 | pub fn ot(&self, n: usize) -> super::vals::Ot { | ||
| 5388 | assert!(n < 16usize); | ||
| 5389 | let offs = 0usize + n * 1usize; | ||
| 5390 | let val = (self.0 >> offs) & 0x01; | ||
| 5391 | super::vals::Ot(val as u8) | ||
| 5291 | } | 5392 | } |
| 5292 | #[doc = "Clock phase"] | 5393 | #[doc = "Port x configuration bits (y = 0..15)"] |
| 5293 | pub const fn cpha(&self) -> super::vals::Cpha { | 5394 | pub fn set_ot(&mut self, n: usize, val: super::vals::Ot) { |
| 5294 | let val = (self.0 >> 9usize) & 0x01; | 5395 | assert!(n < 16usize); |
| 5295 | super::vals::Cpha(val as u8) | 5396 | let offs = 0usize + n * 1usize; |
| 5397 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 5296 | } | 5398 | } |
| 5297 | #[doc = "Clock phase"] | 5399 | } |
| 5298 | pub fn set_cpha(&mut self, val: super::vals::Cpha) { | 5400 | impl Default for Otyper { |
| 5299 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); | 5401 | fn default() -> Otyper { |
| 5402 | Otyper(0) | ||
| 5300 | } | 5403 | } |
| 5301 | #[doc = "Clock polarity"] | 5404 | } |
| 5302 | pub const fn cpol(&self) -> super::vals::Cpol { | 5405 | #[doc = "GPIO port mode register"] |
| 5303 | let val = (self.0 >> 10usize) & 0x01; | 5406 | #[repr(transparent)] |
| 5304 | super::vals::Cpol(val as u8) | 5407 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5408 | pub struct Moder(pub u32); | ||
| 5409 | impl Moder { | ||
| 5410 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 5411 | pub fn moder(&self, n: usize) -> super::vals::Moder { | ||
| 5412 | assert!(n < 16usize); | ||
| 5413 | let offs = 0usize + n * 2usize; | ||
| 5414 | let val = (self.0 >> offs) & 0x03; | ||
| 5415 | super::vals::Moder(val as u8) | ||
| 5305 | } | 5416 | } |
| 5306 | #[doc = "Clock polarity"] | 5417 | #[doc = "Port x configuration bits (y = 0..15)"] |
| 5307 | pub fn set_cpol(&mut self, val: super::vals::Cpol) { | 5418 | pub fn set_moder(&mut self, n: usize, val: super::vals::Moder) { |
| 5308 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | 5419 | assert!(n < 16usize); |
| 5420 | let offs = 0usize + n * 2usize; | ||
| 5421 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 5309 | } | 5422 | } |
| 5310 | #[doc = "Clock enable"] | 5423 | } |
| 5311 | pub const fn clken(&self) -> bool { | 5424 | impl Default for Moder { |
| 5312 | let val = (self.0 >> 11usize) & 0x01; | 5425 | fn default() -> Moder { |
| 5313 | val != 0 | 5426 | Moder(0) |
| 5314 | } | 5427 | } |
| 5315 | #[doc = "Clock enable"] | 5428 | } |
| 5316 | pub fn set_clken(&mut self, val: bool) { | 5429 | #[doc = "GPIO port pull-up/pull-down register"] |
| 5317 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); | 5430 | #[repr(transparent)] |
| 5431 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5432 | pub struct Pupdr(pub u32); | ||
| 5433 | impl Pupdr { | ||
| 5434 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 5435 | pub fn pupdr(&self, n: usize) -> super::vals::Pupdr { | ||
| 5436 | assert!(n < 16usize); | ||
| 5437 | let offs = 0usize + n * 2usize; | ||
| 5438 | let val = (self.0 >> offs) & 0x03; | ||
| 5439 | super::vals::Pupdr(val as u8) | ||
| 5318 | } | 5440 | } |
| 5319 | #[doc = "STOP bits"] | 5441 | #[doc = "Port x configuration bits (y = 0..15)"] |
| 5320 | pub const fn stop(&self) -> super::vals::Stop { | 5442 | pub fn set_pupdr(&mut self, n: usize, val: super::vals::Pupdr) { |
| 5321 | let val = (self.0 >> 12usize) & 0x03; | 5443 | assert!(n < 16usize); |
| 5322 | super::vals::Stop(val as u8) | 5444 | let offs = 0usize + n * 2usize; |
| 5445 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 5323 | } | 5446 | } |
| 5324 | #[doc = "STOP bits"] | 5447 | } |
| 5325 | pub fn set_stop(&mut self, val: super::vals::Stop) { | 5448 | impl Default for Pupdr { |
| 5326 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); | 5449 | fn default() -> Pupdr { |
| 5450 | Pupdr(0) | ||
| 5327 | } | 5451 | } |
| 5328 | #[doc = "LIN mode enable"] | 5452 | } |
| 5329 | pub const fn linen(&self) -> bool { | 5453 | #[doc = "GPIO port output data register"] |
| 5330 | let val = (self.0 >> 14usize) & 0x01; | 5454 | #[repr(transparent)] |
| 5331 | val != 0 | 5455 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5456 | pub struct Odr(pub u32); | ||
| 5457 | impl Odr { | ||
| 5458 | #[doc = "Port output data (y = 0..15)"] | ||
| 5459 | pub fn odr(&self, n: usize) -> super::vals::Odr { | ||
| 5460 | assert!(n < 16usize); | ||
| 5461 | let offs = 0usize + n * 1usize; | ||
| 5462 | let val = (self.0 >> offs) & 0x01; | ||
| 5463 | super::vals::Odr(val as u8) | ||
| 5332 | } | 5464 | } |
| 5333 | #[doc = "LIN mode enable"] | 5465 | #[doc = "Port output data (y = 0..15)"] |
| 5334 | pub fn set_linen(&mut self, val: bool) { | 5466 | pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { |
| 5335 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | 5467 | assert!(n < 16usize); |
| 5468 | let offs = 0usize + n * 1usize; | ||
| 5469 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 5336 | } | 5470 | } |
| 5337 | } | 5471 | } |
| 5338 | impl Default for Cr2Usart { | 5472 | impl Default for Odr { |
| 5339 | fn default() -> Cr2Usart { | 5473 | fn default() -> Odr { |
| 5340 | Cr2Usart(0) | 5474 | Odr(0) |
| 5341 | } | 5475 | } |
| 5342 | } | 5476 | } |
| 5343 | } | 5477 | } |
| 5344 | } | 5478 | } |
| 5345 | pub mod syscfg_f4 { | 5479 | pub mod syscfg_l4 { |
| 5346 | use crate::generic::*; | 5480 | use crate::generic::*; |
| 5347 | #[doc = "System configuration controller"] | 5481 | #[doc = "System configuration controller"] |
| 5348 | #[derive(Copy, Clone)] | 5482 | #[derive(Copy, Clone)] |
| @@ -5351,105 +5485,207 @@ pub mod syscfg_f4 { | |||
| 5351 | unsafe impl Sync for Syscfg {} | 5485 | unsafe impl Sync for Syscfg {} |
| 5352 | impl Syscfg { | 5486 | impl Syscfg { |
| 5353 | #[doc = "memory remap register"] | 5487 | #[doc = "memory remap register"] |
| 5354 | pub fn memrm(self) -> Reg<regs::Memrm, RW> { | 5488 | pub fn memrmp(self) -> Reg<regs::Memrmp, RW> { |
| 5355 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 5489 | unsafe { Reg::from_ptr(self.0.add(0usize)) } |
| 5356 | } | 5490 | } |
| 5357 | #[doc = "peripheral mode configuration register"] | 5491 | #[doc = "configuration register 1"] |
| 5358 | pub fn pmc(self) -> Reg<regs::Pmc, RW> { | 5492 | pub fn cfgr1(self) -> Reg<regs::Cfgr1, RW> { |
| 5359 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 5493 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 5360 | } | 5494 | } |
| 5361 | #[doc = "external interrupt configuration register"] | 5495 | #[doc = "external interrupt configuration register 1"] |
| 5362 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { | 5496 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { |
| 5363 | assert!(n < 4usize); | 5497 | assert!(n < 4usize); |
| 5364 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | 5498 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } |
| 5365 | } | 5499 | } |
| 5366 | #[doc = "Compensation cell control register"] | 5500 | #[doc = "SCSR"] |
| 5367 | pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> { | 5501 | pub fn scsr(self) -> Reg<regs::Scsr, RW> { |
| 5502 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 5503 | } | ||
| 5504 | #[doc = "CFGR2"] | ||
| 5505 | pub fn cfgr2(self) -> Reg<regs::Cfgr2, RW> { | ||
| 5506 | unsafe { Reg::from_ptr(self.0.add(28usize)) } | ||
| 5507 | } | ||
| 5508 | #[doc = "SWPR"] | ||
| 5509 | pub fn swpr(self) -> Reg<regs::Swpr, W> { | ||
| 5368 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | 5510 | unsafe { Reg::from_ptr(self.0.add(32usize)) } |
| 5369 | } | 5511 | } |
| 5512 | #[doc = "SKR"] | ||
| 5513 | pub fn skr(self) -> Reg<regs::Skr, W> { | ||
| 5514 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | ||
| 5515 | } | ||
| 5370 | } | 5516 | } |
| 5371 | pub mod regs { | 5517 | pub mod regs { |
| 5372 | use crate::generic::*; | 5518 | use crate::generic::*; |
| 5373 | #[doc = "memory remap register"] | 5519 | #[doc = "CFGR2"] |
| 5374 | #[repr(transparent)] | 5520 | #[repr(transparent)] |
| 5375 | #[derive(Copy, Clone, Eq, PartialEq)] | 5521 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5376 | pub struct Memrm(pub u32); | 5522 | pub struct Cfgr2(pub u32); |
| 5377 | impl Memrm { | 5523 | impl Cfgr2 { |
| 5378 | #[doc = "Memory mapping selection"] | 5524 | #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] |
| 5379 | pub const fn mem_mode(&self) -> u8 { | 5525 | pub const fn cll(&self) -> bool { |
| 5380 | let val = (self.0 >> 0usize) & 0x07; | 5526 | let val = (self.0 >> 0usize) & 0x01; |
| 5381 | val as u8 | 5527 | val != 0 |
| 5382 | } | 5528 | } |
| 5383 | #[doc = "Memory mapping selection"] | 5529 | #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] |
| 5384 | pub fn set_mem_mode(&mut self, val: u8) { | 5530 | pub fn set_cll(&mut self, val: bool) { |
| 5385 | self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); | 5531 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 5386 | } | 5532 | } |
| 5387 | #[doc = "Flash bank mode selection"] | 5533 | #[doc = "SRAM2 parity lock bit"] |
| 5388 | pub const fn fb_mode(&self) -> bool { | 5534 | pub const fn spl(&self) -> bool { |
| 5389 | let val = (self.0 >> 8usize) & 0x01; | 5535 | let val = (self.0 >> 1usize) & 0x01; |
| 5390 | val != 0 | 5536 | val != 0 |
| 5391 | } | 5537 | } |
| 5392 | #[doc = "Flash bank mode selection"] | 5538 | #[doc = "SRAM2 parity lock bit"] |
| 5393 | pub fn set_fb_mode(&mut self, val: bool) { | 5539 | pub fn set_spl(&mut self, val: bool) { |
| 5394 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 5540 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 5395 | } | 5541 | } |
| 5396 | #[doc = "FMC memory mapping swap"] | 5542 | #[doc = "PVD lock enable bit"] |
| 5397 | pub const fn swp_fmc(&self) -> u8 { | 5543 | pub const fn pvdl(&self) -> bool { |
| 5398 | let val = (self.0 >> 10usize) & 0x03; | 5544 | let val = (self.0 >> 2usize) & 0x01; |
| 5399 | val as u8 | 5545 | val != 0 |
| 5400 | } | 5546 | } |
| 5401 | #[doc = "FMC memory mapping swap"] | 5547 | #[doc = "PVD lock enable bit"] |
| 5402 | pub fn set_swp_fmc(&mut self, val: u8) { | 5548 | pub fn set_pvdl(&mut self, val: bool) { |
| 5403 | self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize); | 5549 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 5550 | } | ||
| 5551 | #[doc = "ECC Lock"] | ||
| 5552 | pub const fn eccl(&self) -> bool { | ||
| 5553 | let val = (self.0 >> 3usize) & 0x01; | ||
| 5554 | val != 0 | ||
| 5555 | } | ||
| 5556 | #[doc = "ECC Lock"] | ||
| 5557 | pub fn set_eccl(&mut self, val: bool) { | ||
| 5558 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | ||
| 5559 | } | ||
| 5560 | #[doc = "SRAM2 parity error flag"] | ||
| 5561 | pub const fn spf(&self) -> bool { | ||
| 5562 | let val = (self.0 >> 8usize) & 0x01; | ||
| 5563 | val != 0 | ||
| 5564 | } | ||
| 5565 | #[doc = "SRAM2 parity error flag"] | ||
| 5566 | pub fn set_spf(&mut self, val: bool) { | ||
| 5567 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 5404 | } | 5568 | } |
| 5405 | } | 5569 | } |
| 5406 | impl Default for Memrm { | 5570 | impl Default for Cfgr2 { |
| 5407 | fn default() -> Memrm { | 5571 | fn default() -> Cfgr2 { |
| 5408 | Memrm(0) | 5572 | Cfgr2(0) |
| 5409 | } | 5573 | } |
| 5410 | } | 5574 | } |
| 5411 | #[doc = "Compensation cell control register"] | 5575 | #[doc = "configuration register 1"] |
| 5412 | #[repr(transparent)] | 5576 | #[repr(transparent)] |
| 5413 | #[derive(Copy, Clone, Eq, PartialEq)] | 5577 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5414 | pub struct Cmpcr(pub u32); | 5578 | pub struct Cfgr1(pub u32); |
| 5415 | impl Cmpcr { | 5579 | impl Cfgr1 { |
| 5416 | #[doc = "Compensation cell power-down"] | 5580 | #[doc = "Firewall disable"] |
| 5417 | pub const fn cmp_pd(&self) -> bool { | 5581 | pub const fn fwdis(&self) -> bool { |
| 5418 | let val = (self.0 >> 0usize) & 0x01; | 5582 | let val = (self.0 >> 0usize) & 0x01; |
| 5419 | val != 0 | 5583 | val != 0 |
| 5420 | } | 5584 | } |
| 5421 | #[doc = "Compensation cell power-down"] | 5585 | #[doc = "Firewall disable"] |
| 5422 | pub fn set_cmp_pd(&mut self, val: bool) { | 5586 | pub fn set_fwdis(&mut self, val: bool) { |
| 5423 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 5587 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 5424 | } | 5588 | } |
| 5425 | #[doc = "READY"] | 5589 | #[doc = "I/O analog switch voltage booster enable"] |
| 5426 | pub const fn ready(&self) -> bool { | 5590 | pub const fn boosten(&self) -> bool { |
| 5427 | let val = (self.0 >> 8usize) & 0x01; | 5591 | let val = (self.0 >> 8usize) & 0x01; |
| 5428 | val != 0 | 5592 | val != 0 |
| 5429 | } | 5593 | } |
| 5430 | #[doc = "READY"] | 5594 | #[doc = "I/O analog switch voltage booster enable"] |
| 5431 | pub fn set_ready(&mut self, val: bool) { | 5595 | pub fn set_boosten(&mut self, val: bool) { |
| 5432 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 5596 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 5433 | } | 5597 | } |
| 5598 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] | ||
| 5599 | pub const fn i2c_pb6_fmp(&self) -> bool { | ||
| 5600 | let val = (self.0 >> 16usize) & 0x01; | ||
| 5601 | val != 0 | ||
| 5602 | } | ||
| 5603 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] | ||
| 5604 | pub fn set_i2c_pb6_fmp(&mut self, val: bool) { | ||
| 5605 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 5606 | } | ||
| 5607 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] | ||
| 5608 | pub const fn i2c_pb7_fmp(&self) -> bool { | ||
| 5609 | let val = (self.0 >> 17usize) & 0x01; | ||
| 5610 | val != 0 | ||
| 5611 | } | ||
| 5612 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] | ||
| 5613 | pub fn set_i2c_pb7_fmp(&mut self, val: bool) { | ||
| 5614 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | ||
| 5615 | } | ||
| 5616 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] | ||
| 5617 | pub const fn i2c_pb8_fmp(&self) -> bool { | ||
| 5618 | let val = (self.0 >> 18usize) & 0x01; | ||
| 5619 | val != 0 | ||
| 5620 | } | ||
| 5621 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] | ||
| 5622 | pub fn set_i2c_pb8_fmp(&mut self, val: bool) { | ||
| 5623 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); | ||
| 5624 | } | ||
| 5625 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] | ||
| 5626 | pub const fn i2c_pb9_fmp(&self) -> bool { | ||
| 5627 | let val = (self.0 >> 19usize) & 0x01; | ||
| 5628 | val != 0 | ||
| 5629 | } | ||
| 5630 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] | ||
| 5631 | pub fn set_i2c_pb9_fmp(&mut self, val: bool) { | ||
| 5632 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); | ||
| 5633 | } | ||
| 5634 | #[doc = "I2C1 Fast-mode Plus driving capability activation"] | ||
| 5635 | pub const fn i2c1_fmp(&self) -> bool { | ||
| 5636 | let val = (self.0 >> 20usize) & 0x01; | ||
| 5637 | val != 0 | ||
| 5638 | } | ||
| 5639 | #[doc = "I2C1 Fast-mode Plus driving capability activation"] | ||
| 5640 | pub fn set_i2c1_fmp(&mut self, val: bool) { | ||
| 5641 | self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); | ||
| 5642 | } | ||
| 5643 | #[doc = "I2C2 Fast-mode Plus driving capability activation"] | ||
| 5644 | pub const fn i2c2_fmp(&self) -> bool { | ||
| 5645 | let val = (self.0 >> 21usize) & 0x01; | ||
| 5646 | val != 0 | ||
| 5647 | } | ||
| 5648 | #[doc = "I2C2 Fast-mode Plus driving capability activation"] | ||
| 5649 | pub fn set_i2c2_fmp(&mut self, val: bool) { | ||
| 5650 | self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); | ||
| 5651 | } | ||
| 5652 | #[doc = "I2C3 Fast-mode Plus driving capability activation"] | ||
| 5653 | pub const fn i2c3_fmp(&self) -> bool { | ||
| 5654 | let val = (self.0 >> 22usize) & 0x01; | ||
| 5655 | val != 0 | ||
| 5656 | } | ||
| 5657 | #[doc = "I2C3 Fast-mode Plus driving capability activation"] | ||
| 5658 | pub fn set_i2c3_fmp(&mut self, val: bool) { | ||
| 5659 | self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); | ||
| 5660 | } | ||
| 5661 | #[doc = "Floating Point Unit interrupts enable bits"] | ||
| 5662 | pub const fn fpu_ie(&self) -> u8 { | ||
| 5663 | let val = (self.0 >> 26usize) & 0x3f; | ||
| 5664 | val as u8 | ||
| 5665 | } | ||
| 5666 | #[doc = "Floating Point Unit interrupts enable bits"] | ||
| 5667 | pub fn set_fpu_ie(&mut self, val: u8) { | ||
| 5668 | self.0 = (self.0 & !(0x3f << 26usize)) | (((val as u32) & 0x3f) << 26usize); | ||
| 5669 | } | ||
| 5434 | } | 5670 | } |
| 5435 | impl Default for Cmpcr { | 5671 | impl Default for Cfgr1 { |
| 5436 | fn default() -> Cmpcr { | 5672 | fn default() -> Cfgr1 { |
| 5437 | Cmpcr(0) | 5673 | Cfgr1(0) |
| 5438 | } | 5674 | } |
| 5439 | } | 5675 | } |
| 5440 | #[doc = "external interrupt configuration register"] | 5676 | #[doc = "external interrupt configuration register 4"] |
| 5441 | #[repr(transparent)] | 5677 | #[repr(transparent)] |
| 5442 | #[derive(Copy, Clone, Eq, PartialEq)] | 5678 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5443 | pub struct Exticr(pub u32); | 5679 | pub struct Exticr(pub u32); |
| 5444 | impl Exticr { | 5680 | impl Exticr { |
| 5445 | #[doc = "EXTI x configuration"] | 5681 | #[doc = "EXTI12 configuration bits"] |
| 5446 | pub fn exti(&self, n: usize) -> u8 { | 5682 | pub fn exti(&self, n: usize) -> u8 { |
| 5447 | assert!(n < 4usize); | 5683 | assert!(n < 4usize); |
| 5448 | let offs = 0usize + n * 4usize; | 5684 | let offs = 0usize + n * 4usize; |
| 5449 | let val = (self.0 >> offs) & 0x0f; | 5685 | let val = (self.0 >> offs) & 0x0f; |
| 5450 | val as u8 | 5686 | val as u8 |
| 5451 | } | 5687 | } |
| 5452 | #[doc = "EXTI x configuration"] | 5688 | #[doc = "EXTI12 configuration bits"] |
| 5453 | pub fn set_exti(&mut self, n: usize, val: u8) { | 5689 | pub fn set_exti(&mut self, n: usize, val: u8) { |
| 5454 | assert!(n < 4usize); | 5690 | assert!(n < 4usize); |
| 5455 | let offs = 0usize + n * 4usize; | 5691 | let offs = 0usize + n * 4usize; |
| @@ -5461,1843 +5697,1664 @@ pub mod syscfg_f4 { | |||
| 5461 | Exticr(0) | 5697 | Exticr(0) |
| 5462 | } | 5698 | } |
| 5463 | } | 5699 | } |
| 5464 | #[doc = "peripheral mode configuration register"] | 5700 | #[doc = "memory remap register"] |
| 5465 | #[repr(transparent)] | 5701 | #[repr(transparent)] |
| 5466 | #[derive(Copy, Clone, Eq, PartialEq)] | 5702 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5467 | pub struct Pmc(pub u32); | 5703 | pub struct Memrmp(pub u32); |
| 5468 | impl Pmc { | 5704 | impl Memrmp { |
| 5469 | #[doc = "ADC1DC2"] | 5705 | #[doc = "Memory mapping selection"] |
| 5470 | pub const fn adc1dc2(&self) -> bool { | 5706 | pub const fn mem_mode(&self) -> u8 { |
| 5471 | let val = (self.0 >> 16usize) & 0x01; | 5707 | let val = (self.0 >> 0usize) & 0x07; |
| 5708 | val as u8 | ||
| 5709 | } | ||
| 5710 | #[doc = "Memory mapping selection"] | ||
| 5711 | pub fn set_mem_mode(&mut self, val: u8) { | ||
| 5712 | self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); | ||
| 5713 | } | ||
| 5714 | #[doc = "QUADSPI memory mapping swap"] | ||
| 5715 | pub const fn qfs(&self) -> bool { | ||
| 5716 | let val = (self.0 >> 3usize) & 0x01; | ||
| 5472 | val != 0 | 5717 | val != 0 |
| 5473 | } | 5718 | } |
| 5474 | #[doc = "ADC1DC2"] | 5719 | #[doc = "QUADSPI memory mapping swap"] |
| 5475 | pub fn set_adc1dc2(&mut self, val: bool) { | 5720 | pub fn set_qfs(&mut self, val: bool) { |
| 5476 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 5721 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 5477 | } | 5722 | } |
| 5478 | #[doc = "ADC2DC2"] | 5723 | #[doc = "Flash Bank mode selection"] |
| 5479 | pub const fn adc2dc2(&self) -> bool { | 5724 | pub const fn fb_mode(&self) -> bool { |
| 5480 | let val = (self.0 >> 17usize) & 0x01; | 5725 | let val = (self.0 >> 8usize) & 0x01; |
| 5481 | val != 0 | 5726 | val != 0 |
| 5482 | } | 5727 | } |
| 5483 | #[doc = "ADC2DC2"] | 5728 | #[doc = "Flash Bank mode selection"] |
| 5484 | pub fn set_adc2dc2(&mut self, val: bool) { | 5729 | pub fn set_fb_mode(&mut self, val: bool) { |
| 5485 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | 5730 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 5486 | } | 5731 | } |
| 5487 | #[doc = "ADC3DC2"] | 5732 | } |
| 5488 | pub const fn adc3dc2(&self) -> bool { | 5733 | impl Default for Memrmp { |
| 5489 | let val = (self.0 >> 18usize) & 0x01; | 5734 | fn default() -> Memrmp { |
| 5735 | Memrmp(0) | ||
| 5736 | } | ||
| 5737 | } | ||
| 5738 | #[doc = "SKR"] | ||
| 5739 | #[repr(transparent)] | ||
| 5740 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5741 | pub struct Skr(pub u32); | ||
| 5742 | impl Skr { | ||
| 5743 | #[doc = "SRAM2 write protection key for software erase"] | ||
| 5744 | pub const fn key(&self) -> u8 { | ||
| 5745 | let val = (self.0 >> 0usize) & 0xff; | ||
| 5746 | val as u8 | ||
| 5747 | } | ||
| 5748 | #[doc = "SRAM2 write protection key for software erase"] | ||
| 5749 | pub fn set_key(&mut self, val: u8) { | ||
| 5750 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | ||
| 5751 | } | ||
| 5752 | } | ||
| 5753 | impl Default for Skr { | ||
| 5754 | fn default() -> Skr { | ||
| 5755 | Skr(0) | ||
| 5756 | } | ||
| 5757 | } | ||
| 5758 | #[doc = "SCSR"] | ||
| 5759 | #[repr(transparent)] | ||
| 5760 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5761 | pub struct Scsr(pub u32); | ||
| 5762 | impl Scsr { | ||
| 5763 | #[doc = "SRAM2 Erase"] | ||
| 5764 | pub const fn sram2er(&self) -> bool { | ||
| 5765 | let val = (self.0 >> 0usize) & 0x01; | ||
| 5490 | val != 0 | 5766 | val != 0 |
| 5491 | } | 5767 | } |
| 5492 | #[doc = "ADC3DC2"] | 5768 | #[doc = "SRAM2 Erase"] |
| 5493 | pub fn set_adc3dc2(&mut self, val: bool) { | 5769 | pub fn set_sram2er(&mut self, val: bool) { |
| 5494 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); | 5770 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 5495 | } | 5771 | } |
| 5496 | #[doc = "Ethernet PHY interface selection"] | 5772 | #[doc = "SRAM2 busy by erase operation"] |
| 5497 | pub const fn mii_rmii_sel(&self) -> bool { | 5773 | pub const fn sram2bsy(&self) -> bool { |
| 5498 | let val = (self.0 >> 23usize) & 0x01; | 5774 | let val = (self.0 >> 1usize) & 0x01; |
| 5499 | val != 0 | 5775 | val != 0 |
| 5500 | } | 5776 | } |
| 5501 | #[doc = "Ethernet PHY interface selection"] | 5777 | #[doc = "SRAM2 busy by erase operation"] |
| 5502 | pub fn set_mii_rmii_sel(&mut self, val: bool) { | 5778 | pub fn set_sram2bsy(&mut self, val: bool) { |
| 5503 | self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); | 5779 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 5504 | } | 5780 | } |
| 5505 | } | 5781 | } |
| 5506 | impl Default for Pmc { | 5782 | impl Default for Scsr { |
| 5507 | fn default() -> Pmc { | 5783 | fn default() -> Scsr { |
| 5508 | Pmc(0) | 5784 | Scsr(0) |
| 5785 | } | ||
| 5786 | } | ||
| 5787 | #[doc = "SWPR"] | ||
| 5788 | #[repr(transparent)] | ||
| 5789 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 5790 | pub struct Swpr(pub u32); | ||
| 5791 | impl Swpr { | ||
| 5792 | #[doc = "SRAWM2 write protection."] | ||
| 5793 | pub fn pwp(&self, n: usize) -> bool { | ||
| 5794 | assert!(n < 32usize); | ||
| 5795 | let offs = 0usize + n * 1usize; | ||
| 5796 | let val = (self.0 >> offs) & 0x01; | ||
| 5797 | val != 0 | ||
| 5798 | } | ||
| 5799 | #[doc = "SRAWM2 write protection."] | ||
| 5800 | pub fn set_pwp(&mut self, n: usize, val: bool) { | ||
| 5801 | assert!(n < 32usize); | ||
| 5802 | let offs = 0usize + n * 1usize; | ||
| 5803 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 5804 | } | ||
| 5805 | } | ||
| 5806 | impl Default for Swpr { | ||
| 5807 | fn default() -> Swpr { | ||
| 5808 | Swpr(0) | ||
| 5509 | } | 5809 | } |
| 5510 | } | 5810 | } |
| 5511 | } | 5811 | } |
| 5512 | } | 5812 | } |
| 5513 | pub mod sdmmc_v2 { | 5813 | pub mod generic { |
| 5514 | use crate::generic::*; | 5814 | use core::marker::PhantomData; |
| 5515 | #[doc = "SDMMC"] | ||
| 5516 | #[derive(Copy, Clone)] | 5815 | #[derive(Copy, Clone)] |
| 5517 | pub struct Sdmmc(pub *mut u8); | 5816 | pub struct RW; |
| 5518 | unsafe impl Send for Sdmmc {} | 5817 | #[derive(Copy, Clone)] |
| 5519 | unsafe impl Sync for Sdmmc {} | 5818 | pub struct R; |
| 5520 | impl Sdmmc { | 5819 | #[derive(Copy, Clone)] |
| 5521 | #[doc = "SDMMC power control register"] | 5820 | pub struct W; |
| 5522 | pub fn power(self) -> Reg<regs::Power, RW> { | 5821 | mod sealed { |
| 5523 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 5822 | use super::*; |
| 5524 | } | 5823 | pub trait Access {} |
| 5525 | #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."] | 5824 | impl Access for R {} |
| 5526 | pub fn clkcr(self) -> Reg<regs::Clkcr, RW> { | 5825 | impl Access for W {} |
| 5527 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 5826 | impl Access for RW {} |
| 5528 | } | 5827 | } |
| 5529 | #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."] | 5828 | pub trait Access: sealed::Access + Copy {} |
| 5530 | pub fn argr(self) -> Reg<regs::Argr, RW> { | 5829 | impl Access for R {} |
| 5531 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 5830 | impl Access for W {} |
| 5532 | } | 5831 | impl Access for RW {} |
| 5533 | #[doc = "The SDMMC_CMDR register contains the command index and command type bits. The command index is sent to a card as part of a command message. The command type bits control the command path state machine (CPSM)."] | 5832 | pub trait Read: Access {} |
| 5534 | pub fn cmdr(self) -> Reg<regs::Cmdr, RW> { | 5833 | impl Read for RW {} |
| 5535 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 5834 | impl Read for R {} |
| 5536 | } | 5835 | pub trait Write: Access {} |
| 5537 | #[doc = "SDMMC command response register"] | 5836 | impl Write for RW {} |
| 5538 | pub fn respcmdr(self) -> Reg<regs::Respcmdr, R> { | 5837 | impl Write for W {} |
| 5539 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 5838 | #[derive(Copy, Clone)] |
| 5540 | } | 5839 | pub struct Reg<T: Copy, A: Access> { |
| 5541 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | 5840 | ptr: *mut u8, |
| 5542 | pub fn respr(self, n: usize) -> Reg<regs::Resp1r, R> { | 5841 | phantom: PhantomData<*mut (T, A)>, |
| 5543 | assert!(n < 4usize); | 5842 | } |
| 5544 | unsafe { Reg::from_ptr(self.0.add(20usize + n * 4usize)) } | 5843 | unsafe impl<T: Copy, A: Access> Send for Reg<T, A> {} |
| 5545 | } | 5844 | unsafe impl<T: Copy, A: Access> Sync for Reg<T, A> {} |
| 5546 | #[doc = "The SDMMC_DTIMER register contains the data timeout period, in card bus clock periods. A counter loads the value from the SDMMC_DTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_R or Busy state. If the timer reaches 0 while the DPSM is in either of these states, the timeout status flag is set."] | 5845 | impl<T: Copy, A: Access> Reg<T, A> { |
| 5547 | pub fn dtimer(self) -> Reg<regs::Dtimer, RW> { | 5846 | pub fn from_ptr(ptr: *mut u8) -> Self { |
| 5548 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | 5847 | Self { |
| 5549 | } | 5848 | ptr, |
| 5550 | #[doc = "The SDMMC_DLENR register contains the number of data bytes to be transferred. The value is loaded into the data counter when data transfer starts."] | 5849 | phantom: PhantomData, |
| 5551 | pub fn dlenr(self) -> Reg<regs::Dlenr, RW> { | 5850 | } |
| 5552 | unsafe { Reg::from_ptr(self.0.add(40usize)) } | ||
| 5553 | } | ||
| 5554 | #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."] | ||
| 5555 | pub fn dctrl(self) -> Reg<regs::Dctrl, RW> { | ||
| 5556 | unsafe { Reg::from_ptr(self.0.add(44usize)) } | ||
| 5557 | } | 5851 | } |
| 5558 | #[doc = "The SDMMC_DCNTR register loads the value from the data length register (see SDMMC_DLENR) when the DPSM moves from the Idle state to the Wait_R or Wait_S state. As data is transferred, the counter decrements the value until it reaches 0. The DPSM then moves to the Idle state and when there has been no error, the data status end flag (DATAEND) is set."] | 5852 | pub fn ptr(&self) -> *mut T { |
| 5559 | pub fn dcntr(self) -> Reg<regs::Dcntr, R> { | 5853 | self.ptr as _ |
| 5560 | unsafe { Reg::from_ptr(self.0.add(48usize)) } | ||
| 5561 | } | 5854 | } |
| 5562 | #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"] | 5855 | } |
| 5563 | pub fn star(self) -> Reg<regs::Star, R> { | 5856 | impl<T: Copy, A: Read> Reg<T, A> { |
| 5564 | unsafe { Reg::from_ptr(self.0.add(52usize)) } | 5857 | pub unsafe fn read(&self) -> T { |
| 5858 | (self.ptr as *mut T).read_volatile() | ||
| 5565 | } | 5859 | } |
| 5566 | #[doc = "The SDMMC_ICR register is a write-only register. Writing a bit with 1 clears the corresponding bit in the SDMMC_STAR status register."] | 5860 | } |
| 5567 | pub fn icr(self) -> Reg<regs::Icr, RW> { | 5861 | impl<T: Copy, A: Write> Reg<T, A> { |
| 5568 | unsafe { Reg::from_ptr(self.0.add(56usize)) } | 5862 | pub unsafe fn write_value(&self, val: T) { |
| 5863 | (self.ptr as *mut T).write_volatile(val) | ||
| 5569 | } | 5864 | } |
| 5570 | #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."] | 5865 | } |
| 5571 | pub fn maskr(self) -> Reg<regs::Maskr, RW> { | 5866 | impl<T: Default + Copy, A: Write> Reg<T, A> { |
| 5572 | unsafe { Reg::from_ptr(self.0.add(60usize)) } | 5867 | pub unsafe fn write<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { |
| 5868 | let mut val = Default::default(); | ||
| 5869 | let res = f(&mut val); | ||
| 5870 | self.write_value(val); | ||
| 5871 | res | ||
| 5573 | } | 5872 | } |
| 5574 | #[doc = "The SDMMC_ACKTIMER register contains the acknowledgment timeout period, in SDMMC_CK bus clock periods. A counter loads the value from the SDMMC_ACKTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_Ack state. If the timer reaches 0 while the DPSM is in this states, the acknowledgment timeout status flag is set."] | 5873 | } |
| 5575 | pub fn acktimer(self) -> Reg<regs::Acktimer, RW> { | 5874 | impl<T: Copy, A: Read + Write> Reg<T, A> { |
| 5576 | unsafe { Reg::from_ptr(self.0.add(64usize)) } | 5875 | pub unsafe fn modify<R>(&self, f: impl FnOnce(&mut T) -> R) -> R { |
| 5876 | let mut val = self.read(); | ||
| 5877 | let res = f(&mut val); | ||
| 5878 | self.write_value(val); | ||
| 5879 | res | ||
| 5577 | } | 5880 | } |
| 5578 | #[doc = "The receive and transmit FIFOs can be read or written as 32-bit wide registers. The FIFOs contain 32 entries on 32 sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO."] | 5881 | } |
| 5579 | pub fn idmactrlr(self) -> Reg<regs::Idmactrlr, RW> { | 5882 | } |
| 5580 | unsafe { Reg::from_ptr(self.0.add(80usize)) } | 5883 | pub mod spi_v2 { |
| 5884 | use crate::generic::*; | ||
| 5885 | #[doc = "Serial peripheral interface"] | ||
| 5886 | #[derive(Copy, Clone)] | ||
| 5887 | pub struct Spi(pub *mut u8); | ||
| 5888 | unsafe impl Send for Spi {} | ||
| 5889 | unsafe impl Sync for Spi {} | ||
| 5890 | impl Spi { | ||
| 5891 | #[doc = "control register 1"] | ||
| 5892 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { | ||
| 5893 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 5581 | } | 5894 | } |
| 5582 | #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."] | 5895 | #[doc = "control register 2"] |
| 5583 | pub fn idmabsizer(self) -> Reg<regs::Idmabsizer, RW> { | 5896 | pub fn cr2(self) -> Reg<regs::Cr2, RW> { |
| 5584 | unsafe { Reg::from_ptr(self.0.add(84usize)) } | 5897 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 5585 | } | 5898 | } |
| 5586 | #[doc = "The SDMMC_IDMABASE0R register contains the memory buffer base address in single buffer configuration and the buffer 0 base address in double buffer configuration."] | 5899 | #[doc = "status register"] |
| 5587 | pub fn idmabase0r(self) -> Reg<regs::Idmabase0r, RW> { | 5900 | pub fn sr(self) -> Reg<regs::Sr, RW> { |
| 5588 | unsafe { Reg::from_ptr(self.0.add(88usize)) } | 5901 | unsafe { Reg::from_ptr(self.0.add(8usize)) } |
| 5589 | } | 5902 | } |
| 5590 | #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."] | 5903 | #[doc = "data register"] |
| 5591 | pub fn idmabase1r(self) -> Reg<regs::Idmabase1r, RW> { | 5904 | pub fn dr(self) -> Reg<regs::Dr, RW> { |
| 5592 | unsafe { Reg::from_ptr(self.0.add(92usize)) } | 5905 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 5593 | } | 5906 | } |
| 5594 | #[doc = "The receive and transmit FIFOs can be only read or written as word (32-bit) wide registers. The FIFOs contain 16 entries on sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.When accessing SDMMC_FIFOR with half word or byte access an AHB bus fault is generated."] | 5907 | #[doc = "CRC polynomial register"] |
| 5595 | pub fn fifor(self) -> Reg<regs::Fifor, RW> { | 5908 | pub fn crcpr(self) -> Reg<regs::Crcpr, RW> { |
| 5596 | unsafe { Reg::from_ptr(self.0.add(128usize)) } | 5909 | unsafe { Reg::from_ptr(self.0.add(16usize)) } |
| 5597 | } | 5910 | } |
| 5598 | #[doc = "SDMMC IP version register"] | 5911 | #[doc = "RX CRC register"] |
| 5599 | pub fn ver(self) -> Reg<regs::Ver, R> { | 5912 | pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> { |
| 5600 | unsafe { Reg::from_ptr(self.0.add(1012usize)) } | 5913 | unsafe { Reg::from_ptr(self.0.add(20usize)) } |
| 5601 | } | 5914 | } |
| 5602 | #[doc = "SDMMC IP identification register"] | 5915 | #[doc = "TX CRC register"] |
| 5603 | pub fn id(self) -> Reg<regs::Id, R> { | 5916 | pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> { |
| 5604 | unsafe { Reg::from_ptr(self.0.add(1016usize)) } | 5917 | unsafe { Reg::from_ptr(self.0.add(24usize)) } |
| 5605 | } | 5918 | } |
| 5606 | } | 5919 | } |
| 5607 | pub mod regs { | 5920 | pub mod regs { |
| 5608 | use crate::generic::*; | 5921 | use crate::generic::*; |
| 5609 | #[doc = "The SDMMC_STAR register is a read-only register. It contains two types of flag:Static flags (bits [29,21,11:0]): these bits remain asserted until they are cleared by writing to the SDMMC interrupt Clear register (see SDMMC_ICR)Dynamic flags (bits [20:12]): these bits change state depending on the state of the underlying logic (for example, FIFO full and empty flags are asserted and de-asserted as data while written to the FIFO)"] | 5922 | #[doc = "TX CRC register"] |
| 5610 | #[repr(transparent)] | 5923 | #[repr(transparent)] |
| 5611 | #[derive(Copy, Clone, Eq, PartialEq)] | 5924 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5612 | pub struct Star(pub u32); | 5925 | pub struct Txcrcr(pub u32); |
| 5613 | impl Star { | 5926 | impl Txcrcr { |
| 5614 | #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5927 | #[doc = "Tx CRC register"] |
| 5615 | pub const fn ccrcfail(&self) -> bool { | 5928 | pub const fn tx_crc(&self) -> u16 { |
| 5616 | let val = (self.0 >> 0usize) & 0x01; | 5929 | let val = (self.0 >> 0usize) & 0xffff; |
| 5617 | val != 0 | 5930 | val as u16 |
| 5618 | } | ||
| 5619 | #[doc = "Command response received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | ||
| 5620 | pub fn set_ccrcfail(&mut self, val: bool) { | ||
| 5621 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 5622 | } | 5931 | } |
| 5623 | #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5932 | #[doc = "Tx CRC register"] |
| 5624 | pub const fn dcrcfail(&self) -> bool { | 5933 | pub fn set_tx_crc(&mut self, val: u16) { |
| 5625 | let val = (self.0 >> 1usize) & 0x01; | 5934 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 5626 | val != 0 | ||
| 5627 | } | 5935 | } |
| 5628 | #[doc = "Data block sent/received (CRC check failed). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5936 | } |
| 5629 | pub fn set_dcrcfail(&mut self, val: bool) { | 5937 | impl Default for Txcrcr { |
| 5630 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 5938 | fn default() -> Txcrcr { |
| 5939 | Txcrcr(0) | ||
| 5631 | } | 5940 | } |
| 5632 | #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."] | 5941 | } |
| 5633 | pub const fn ctimeout(&self) -> bool { | 5942 | #[doc = "control register 1"] |
| 5634 | let val = (self.0 >> 2usize) & 0x01; | 5943 | #[repr(transparent)] |
| 5635 | val != 0 | 5944 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5945 | pub struct Cr1(pub u32); | ||
| 5946 | impl Cr1 { | ||
| 5947 | #[doc = "Clock phase"] | ||
| 5948 | pub const fn cpha(&self) -> super::vals::Cpha { | ||
| 5949 | let val = (self.0 >> 0usize) & 0x01; | ||
| 5950 | super::vals::Cpha(val as u8) | ||
| 5636 | } | 5951 | } |
| 5637 | #[doc = "Command response timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR. The Command Timeout period has a fixed value of 64 SDMMC_CK clock periods."] | 5952 | #[doc = "Clock phase"] |
| 5638 | pub fn set_ctimeout(&mut self, val: bool) { | 5953 | pub fn set_cpha(&mut self, val: super::vals::Cpha) { |
| 5639 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 5954 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize); |
| 5640 | } | 5955 | } |
| 5641 | #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5956 | #[doc = "Clock polarity"] |
| 5642 | pub const fn dtimeout(&self) -> bool { | 5957 | pub const fn cpol(&self) -> super::vals::Cpol { |
| 5643 | let val = (self.0 >> 3usize) & 0x01; | 5958 | let val = (self.0 >> 1usize) & 0x01; |
| 5644 | val != 0 | 5959 | super::vals::Cpol(val as u8) |
| 5645 | } | 5960 | } |
| 5646 | #[doc = "Data timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5961 | #[doc = "Clock polarity"] |
| 5647 | pub fn set_dtimeout(&mut self, val: bool) { | 5962 | pub fn set_cpol(&mut self, val: super::vals::Cpol) { |
| 5648 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 5963 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize); |
| 5649 | } | 5964 | } |
| 5650 | #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5965 | #[doc = "Master selection"] |
| 5651 | pub const fn txunderr(&self) -> bool { | 5966 | pub const fn mstr(&self) -> super::vals::Mstr { |
| 5652 | let val = (self.0 >> 4usize) & 0x01; | 5967 | let val = (self.0 >> 2usize) & 0x01; |
| 5653 | val != 0 | 5968 | super::vals::Mstr(val as u8) |
| 5654 | } | 5969 | } |
| 5655 | #[doc = "Transmit FIFO underrun error or IDMA read transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5970 | #[doc = "Master selection"] |
| 5656 | pub fn set_txunderr(&mut self, val: bool) { | 5971 | pub fn set_mstr(&mut self, val: super::vals::Mstr) { |
| 5657 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | 5972 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); |
| 5658 | } | 5973 | } |
| 5659 | #[doc = "Received FIFO overrun error or IDMA write transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5974 | #[doc = "Baud rate control"] |
| 5660 | pub const fn rxoverr(&self) -> bool { | 5975 | pub const fn br(&self) -> super::vals::Br { |
| 5661 | let val = (self.0 >> 5usize) & 0x01; | 5976 | let val = (self.0 >> 3usize) & 0x07; |
| 5662 | val != 0 | 5977 | super::vals::Br(val as u8) |
| 5663 | } | 5978 | } |
| 5664 | #[doc = "Received FIFO overrun error or IDMA write transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5979 | #[doc = "Baud rate control"] |
| 5665 | pub fn set_rxoverr(&mut self, val: bool) { | 5980 | pub fn set_br(&mut self, val: super::vals::Br) { |
| 5666 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 5981 | self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize); |
| 5667 | } | 5982 | } |
| 5668 | #[doc = "Command response received (CRC check passed, or no CRC). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5983 | #[doc = "SPI enable"] |
| 5669 | pub const fn cmdrend(&self) -> bool { | 5984 | pub const fn spe(&self) -> bool { |
| 5670 | let val = (self.0 >> 6usize) & 0x01; | 5985 | let val = (self.0 >> 6usize) & 0x01; |
| 5671 | val != 0 | 5986 | val != 0 |
| 5672 | } | 5987 | } |
| 5673 | #[doc = "Command response received (CRC check passed, or no CRC). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5988 | #[doc = "SPI enable"] |
| 5674 | pub fn set_cmdrend(&mut self, val: bool) { | 5989 | pub fn set_spe(&mut self, val: bool) { |
| 5675 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 5990 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 5676 | } | 5991 | } |
| 5677 | #[doc = "Command sent (no response required). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5992 | #[doc = "Frame format"] |
| 5678 | pub const fn cmdsent(&self) -> bool { | 5993 | pub const fn lsbfirst(&self) -> super::vals::Lsbfirst { |
| 5679 | let val = (self.0 >> 7usize) & 0x01; | 5994 | let val = (self.0 >> 7usize) & 0x01; |
| 5680 | val != 0 | 5995 | super::vals::Lsbfirst(val as u8) |
| 5681 | } | 5996 | } |
| 5682 | #[doc = "Command sent (no response required). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 5997 | #[doc = "Frame format"] |
| 5683 | pub fn set_cmdsent(&mut self, val: bool) { | 5998 | pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) { |
| 5684 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 5999 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); |
| 5685 | } | 6000 | } |
| 5686 | #[doc = "Data transfer ended correctly. (data counter, DATACOUNT is zero and no errors occur). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6001 | #[doc = "Internal slave select"] |
| 5687 | pub const fn dataend(&self) -> bool { | 6002 | pub const fn ssi(&self) -> bool { |
| 5688 | let val = (self.0 >> 8usize) & 0x01; | 6003 | let val = (self.0 >> 8usize) & 0x01; |
| 5689 | val != 0 | 6004 | val != 0 |
| 5690 | } | 6005 | } |
| 5691 | #[doc = "Data transfer ended correctly. (data counter, DATACOUNT is zero and no errors occur). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6006 | #[doc = "Internal slave select"] |
| 5692 | pub fn set_dataend(&mut self, val: bool) { | 6007 | pub fn set_ssi(&mut self, val: bool) { |
| 5693 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 6008 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 5694 | } | 6009 | } |
| 5695 | #[doc = "Data transfer Hold. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6010 | #[doc = "Software slave management"] |
| 5696 | pub const fn dhold(&self) -> bool { | 6011 | pub const fn ssm(&self) -> bool { |
| 5697 | let val = (self.0 >> 9usize) & 0x01; | 6012 | let val = (self.0 >> 9usize) & 0x01; |
| 5698 | val != 0 | 6013 | val != 0 |
| 5699 | } | 6014 | } |
| 5700 | #[doc = "Data transfer Hold. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6015 | #[doc = "Software slave management"] |
| 5701 | pub fn set_dhold(&mut self, val: bool) { | 6016 | pub fn set_ssm(&mut self, val: bool) { |
| 5702 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | 6017 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); |
| 5703 | } | 6018 | } |
| 5704 | #[doc = "Data block sent/received. (CRC check passed) and DPSM moves to the READWAIT state. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6019 | #[doc = "Receive only"] |
| 5705 | pub const fn dbckend(&self) -> bool { | 6020 | pub const fn rxonly(&self) -> super::vals::Rxonly { |
| 5706 | let val = (self.0 >> 10usize) & 0x01; | 6021 | let val = (self.0 >> 10usize) & 0x01; |
| 5707 | val != 0 | 6022 | super::vals::Rxonly(val as u8) |
| 5708 | } | 6023 | } |
| 5709 | #[doc = "Data block sent/received. (CRC check passed) and DPSM moves to the READWAIT state. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6024 | #[doc = "Receive only"] |
| 5710 | pub fn set_dbckend(&mut self, val: bool) { | 6025 | pub fn set_rxonly(&mut self, val: super::vals::Rxonly) { |
| 5711 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); | 6026 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); |
| 5712 | } | 6027 | } |
| 5713 | #[doc = "Data transfer aborted by CMD12. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6028 | #[doc = "CRC length"] |
| 5714 | pub const fn dabort(&self) -> bool { | 6029 | pub const fn crcl(&self) -> super::vals::Crcl { |
| 5715 | let val = (self.0 >> 11usize) & 0x01; | 6030 | let val = (self.0 >> 11usize) & 0x01; |
| 5716 | val != 0 | 6031 | super::vals::Crcl(val as u8) |
| 5717 | } | 6032 | } |
| 5718 | #[doc = "Data transfer aborted by CMD12. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6033 | #[doc = "CRC length"] |
| 5719 | pub fn set_dabort(&mut self, val: bool) { | 6034 | pub fn set_crcl(&mut self, val: super::vals::Crcl) { |
| 5720 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); | 6035 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); |
| 5721 | } | 6036 | } |
| 5722 | #[doc = "Data path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."] | 6037 | #[doc = "CRC transfer next"] |
| 5723 | pub const fn dpsmact(&self) -> bool { | 6038 | pub const fn crcnext(&self) -> super::vals::Crcnext { |
| 5724 | let val = (self.0 >> 12usize) & 0x01; | 6039 | let val = (self.0 >> 12usize) & 0x01; |
| 5725 | val != 0 | 6040 | super::vals::Crcnext(val as u8) |
| 5726 | } | 6041 | } |
| 5727 | #[doc = "Data path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."] | 6042 | #[doc = "CRC transfer next"] |
| 5728 | pub fn set_dpsmact(&mut self, val: bool) { | 6043 | pub fn set_crcnext(&mut self, val: super::vals::Crcnext) { |
| 5729 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); | 6044 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); |
| 5730 | } | 6045 | } |
| 5731 | #[doc = "Command path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."] | 6046 | #[doc = "Hardware CRC calculation enable"] |
| 5732 | pub const fn cpsmact(&self) -> bool { | 6047 | pub const fn crcen(&self) -> bool { |
| 5733 | let val = (self.0 >> 13usize) & 0x01; | 6048 | let val = (self.0 >> 13usize) & 0x01; |
| 5734 | val != 0 | 6049 | val != 0 |
| 5735 | } | 6050 | } |
| 5736 | #[doc = "Command path state machine active, i.e. not in Idle state. This is a hardware status flag only, does not generate an interrupt."] | 6051 | #[doc = "Hardware CRC calculation enable"] |
| 5737 | pub fn set_cpsmact(&mut self, val: bool) { | 6052 | pub fn set_crcen(&mut self, val: bool) { |
| 5738 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | 6053 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); |
| 5739 | } | 6054 | } |
| 5740 | #[doc = "Transmit FIFO half empty At least half the number of words can be written into the FIFO. This bit is cleared when the FIFO becomes half+1 full."] | 6055 | #[doc = "Output enable in bidirectional mode"] |
| 5741 | pub const fn txfifohe(&self) -> bool { | 6056 | pub const fn bidioe(&self) -> super::vals::Bidioe { |
| 5742 | let val = (self.0 >> 14usize) & 0x01; | 6057 | let val = (self.0 >> 14usize) & 0x01; |
| 5743 | val != 0 | 6058 | super::vals::Bidioe(val as u8) |
| 5744 | } | 6059 | } |
| 5745 | #[doc = "Transmit FIFO half empty At least half the number of words can be written into the FIFO. This bit is cleared when the FIFO becomes half+1 full."] | 6060 | #[doc = "Output enable in bidirectional mode"] |
| 5746 | pub fn set_txfifohe(&mut self, val: bool) { | 6061 | pub fn set_bidioe(&mut self, val: super::vals::Bidioe) { |
| 5747 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | 6062 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); |
| 5748 | } | 6063 | } |
| 5749 | #[doc = "Receive FIFO half full There are at least half the number of words in the FIFO. This bit is cleared when the FIFO becomes half+1 empty."] | 6064 | #[doc = "Bidirectional data mode enable"] |
| 5750 | pub const fn rxfifohf(&self) -> bool { | 6065 | pub const fn bidimode(&self) -> super::vals::Bidimode { |
| 5751 | let val = (self.0 >> 15usize) & 0x01; | 6066 | let val = (self.0 >> 15usize) & 0x01; |
| 5752 | val != 0 | 6067 | super::vals::Bidimode(val as u8) |
| 5753 | } | 6068 | } |
| 5754 | #[doc = "Receive FIFO half full There are at least half the number of words in the FIFO. This bit is cleared when the FIFO becomes half+1 empty."] | 6069 | #[doc = "Bidirectional data mode enable"] |
| 5755 | pub fn set_rxfifohf(&mut self, val: bool) { | 6070 | pub fn set_bidimode(&mut self, val: super::vals::Bidimode) { |
| 5756 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); | 6071 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); |
| 5757 | } | 6072 | } |
| 5758 | #[doc = "Transmit FIFO full This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes empty."] | 6073 | } |
| 5759 | pub const fn txfifof(&self) -> bool { | 6074 | impl Default for Cr1 { |
| 5760 | let val = (self.0 >> 16usize) & 0x01; | 6075 | fn default() -> Cr1 { |
| 5761 | val != 0 | 6076 | Cr1(0) |
| 5762 | } | 6077 | } |
| 5763 | #[doc = "Transmit FIFO full This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes empty."] | 6078 | } |
| 5764 | pub fn set_txfifof(&mut self, val: bool) { | 6079 | #[doc = "CRC polynomial register"] |
| 5765 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 6080 | #[repr(transparent)] |
| 6081 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6082 | pub struct Crcpr(pub u32); | ||
| 6083 | impl Crcpr { | ||
| 6084 | #[doc = "CRC polynomial register"] | ||
| 6085 | pub const fn crcpoly(&self) -> u16 { | ||
| 6086 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 6087 | val as u16 | ||
| 5766 | } | 6088 | } |
| 5767 | #[doc = "Receive FIFO full This bit is cleared when one FIFO location becomes empty."] | 6089 | #[doc = "CRC polynomial register"] |
| 5768 | pub const fn rxfifof(&self) -> bool { | 6090 | pub fn set_crcpoly(&mut self, val: u16) { |
| 5769 | let val = (self.0 >> 17usize) & 0x01; | 6091 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 5770 | val != 0 | ||
| 5771 | } | 6092 | } |
| 5772 | #[doc = "Receive FIFO full This bit is cleared when one FIFO location becomes empty."] | 6093 | } |
| 5773 | pub fn set_rxfifof(&mut self, val: bool) { | 6094 | impl Default for Crcpr { |
| 5774 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | 6095 | fn default() -> Crcpr { |
| 6096 | Crcpr(0) | ||
| 5775 | } | 6097 | } |
| 5776 | #[doc = "Transmit FIFO empty This bit is cleared when one FIFO location becomes full."] | 6098 | } |
| 5777 | pub const fn txfifoe(&self) -> bool { | 6099 | #[doc = "RX CRC register"] |
| 5778 | let val = (self.0 >> 18usize) & 0x01; | 6100 | #[repr(transparent)] |
| 5779 | val != 0 | 6101 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 6102 | pub struct Rxcrcr(pub u32); | ||
| 6103 | impl Rxcrcr { | ||
| 6104 | #[doc = "Rx CRC register"] | ||
| 6105 | pub const fn rx_crc(&self) -> u16 { | ||
| 6106 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 6107 | val as u16 | ||
| 5780 | } | 6108 | } |
| 5781 | #[doc = "Transmit FIFO empty This bit is cleared when one FIFO location becomes full."] | 6109 | #[doc = "Rx CRC register"] |
| 5782 | pub fn set_txfifoe(&mut self, val: bool) { | 6110 | pub fn set_rx_crc(&mut self, val: u16) { |
| 5783 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); | 6111 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 5784 | } | 6112 | } |
| 5785 | #[doc = "Receive FIFO empty This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes full."] | 6113 | } |
| 5786 | pub const fn rxfifoe(&self) -> bool { | 6114 | impl Default for Rxcrcr { |
| 5787 | let val = (self.0 >> 19usize) & 0x01; | 6115 | fn default() -> Rxcrcr { |
| 5788 | val != 0 | 6116 | Rxcrcr(0) |
| 5789 | } | 6117 | } |
| 5790 | #[doc = "Receive FIFO empty This is a hardware status flag only, does not generate an interrupt. This bit is cleared when one FIFO location becomes full."] | 6118 | } |
| 5791 | pub fn set_rxfifoe(&mut self, val: bool) { | 6119 | #[doc = "data register"] |
| 5792 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); | 6120 | #[repr(transparent)] |
| 6121 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6122 | pub struct Dr(pub u32); | ||
| 6123 | impl Dr { | ||
| 6124 | #[doc = "Data register"] | ||
| 6125 | pub const fn dr(&self) -> u16 { | ||
| 6126 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 6127 | val as u16 | ||
| 5793 | } | 6128 | } |
| 5794 | #[doc = "Inverted value of SDMMC_D0 line (Busy), sampled at the end of a CMD response and a second time 2 SDMMC_CK cycles after the CMD response. This bit is reset to not busy when the SDMMCD0 line changes from busy to not busy. This bit does not signal busy due to data transfer. This is a hardware status flag only, it does not generate an interrupt."] | 6129 | #[doc = "Data register"] |
| 5795 | pub const fn busyd0(&self) -> bool { | 6130 | pub fn set_dr(&mut self, val: u16) { |
| 5796 | let val = (self.0 >> 20usize) & 0x01; | 6131 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 5797 | val != 0 | ||
| 5798 | } | 6132 | } |
| 5799 | #[doc = "Inverted value of SDMMC_D0 line (Busy), sampled at the end of a CMD response and a second time 2 SDMMC_CK cycles after the CMD response. This bit is reset to not busy when the SDMMCD0 line changes from busy to not busy. This bit does not signal busy due to data transfer. This is a hardware status flag only, it does not generate an interrupt."] | 6133 | } |
| 5800 | pub fn set_busyd0(&mut self, val: bool) { | 6134 | impl Default for Dr { |
| 5801 | self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); | 6135 | fn default() -> Dr { |
| 6136 | Dr(0) | ||
| 5802 | } | 6137 | } |
| 5803 | #[doc = "end of SDMMC_D0 Busy following a CMD response detected. This indicates only end of busy following a CMD response. This bit does not signal busy due to data transfer. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6138 | } |
| 5804 | pub const fn busyd0end(&self) -> bool { | 6139 | #[doc = "status register"] |
| 5805 | let val = (self.0 >> 21usize) & 0x01; | 6140 | #[repr(transparent)] |
| 6141 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6142 | pub struct Sr(pub u32); | ||
| 6143 | impl Sr { | ||
| 6144 | #[doc = "Receive buffer not empty"] | ||
| 6145 | pub const fn rxne(&self) -> bool { | ||
| 6146 | let val = (self.0 >> 0usize) & 0x01; | ||
| 5806 | val != 0 | 6147 | val != 0 |
| 5807 | } | 6148 | } |
| 5808 | #[doc = "end of SDMMC_D0 Busy following a CMD response detected. This indicates only end of busy following a CMD response. This bit does not signal busy due to data transfer. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6149 | #[doc = "Receive buffer not empty"] |
| 5809 | pub fn set_busyd0end(&mut self, val: bool) { | 6150 | pub fn set_rxne(&mut self, val: bool) { |
| 5810 | self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); | 6151 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 5811 | } | 6152 | } |
| 5812 | #[doc = "SDIO interrupt received. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6153 | #[doc = "Transmit buffer empty"] |
| 5813 | pub const fn sdioit(&self) -> bool { | 6154 | pub const fn txe(&self) -> bool { |
| 5814 | let val = (self.0 >> 22usize) & 0x01; | 6155 | let val = (self.0 >> 1usize) & 0x01; |
| 5815 | val != 0 | 6156 | val != 0 |
| 5816 | } | 6157 | } |
| 5817 | #[doc = "SDIO interrupt received. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6158 | #[doc = "Transmit buffer empty"] |
| 5818 | pub fn set_sdioit(&mut self, val: bool) { | 6159 | pub fn set_txe(&mut self, val: bool) { |
| 5819 | self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); | 6160 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 5820 | } | 6161 | } |
| 5821 | #[doc = "Boot acknowledgment received (boot acknowledgment check fail). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6162 | #[doc = "CRC error flag"] |
| 5822 | pub const fn ackfail(&self) -> bool { | 6163 | pub const fn crcerr(&self) -> bool { |
| 5823 | let val = (self.0 >> 23usize) & 0x01; | 6164 | let val = (self.0 >> 4usize) & 0x01; |
| 5824 | val != 0 | 6165 | val != 0 |
| 5825 | } | 6166 | } |
| 5826 | #[doc = "Boot acknowledgment received (boot acknowledgment check fail). Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6167 | #[doc = "CRC error flag"] |
| 5827 | pub fn set_ackfail(&mut self, val: bool) { | 6168 | pub fn set_crcerr(&mut self, val: bool) { |
| 5828 | self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); | 6169 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); |
| 5829 | } | 6170 | } |
| 5830 | #[doc = "Boot acknowledgment timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6171 | #[doc = "Mode fault"] |
| 5831 | pub const fn acktimeout(&self) -> bool { | 6172 | pub const fn modf(&self) -> bool { |
| 5832 | let val = (self.0 >> 24usize) & 0x01; | 6173 | let val = (self.0 >> 5usize) & 0x01; |
| 5833 | val != 0 | 6174 | val != 0 |
| 5834 | } | 6175 | } |
| 5835 | #[doc = "Boot acknowledgment timeout. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6176 | #[doc = "Mode fault"] |
| 5836 | pub fn set_acktimeout(&mut self, val: bool) { | 6177 | pub fn set_modf(&mut self, val: bool) { |
| 5837 | self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); | 6178 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 5838 | } | 6179 | } |
| 5839 | #[doc = "Voltage switch critical timing section completion. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6180 | #[doc = "Overrun flag"] |
| 5840 | pub const fn vswend(&self) -> bool { | 6181 | pub const fn ovr(&self) -> bool { |
| 5841 | let val = (self.0 >> 25usize) & 0x01; | 6182 | let val = (self.0 >> 6usize) & 0x01; |
| 5842 | val != 0 | 6183 | val != 0 |
| 5843 | } | 6184 | } |
| 5844 | #[doc = "Voltage switch critical timing section completion. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6185 | #[doc = "Overrun flag"] |
| 5845 | pub fn set_vswend(&mut self, val: bool) { | 6186 | pub fn set_ovr(&mut self, val: bool) { |
| 5846 | self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); | 6187 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 5847 | } | 6188 | } |
| 5848 | #[doc = "SDMMC_CK stopped in Voltage switch procedure. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6189 | #[doc = "Busy flag"] |
| 5849 | pub const fn ckstop(&self) -> bool { | 6190 | pub const fn bsy(&self) -> bool { |
| 5850 | let val = (self.0 >> 26usize) & 0x01; | 6191 | let val = (self.0 >> 7usize) & 0x01; |
| 5851 | val != 0 | 6192 | val != 0 |
| 5852 | } | 6193 | } |
| 5853 | #[doc = "SDMMC_CK stopped in Voltage switch procedure. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6194 | #[doc = "Busy flag"] |
| 5854 | pub fn set_ckstop(&mut self, val: bool) { | 6195 | pub fn set_bsy(&mut self, val: bool) { |
| 5855 | self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); | 6196 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 5856 | } | 6197 | } |
| 5857 | #[doc = "IDMA transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6198 | #[doc = "Frame format error"] |
| 5858 | pub const fn idmate(&self) -> bool { | 6199 | pub const fn fre(&self) -> bool { |
| 5859 | let val = (self.0 >> 27usize) & 0x01; | 6200 | let val = (self.0 >> 8usize) & 0x01; |
| 5860 | val != 0 | 6201 | val != 0 |
| 5861 | } | 6202 | } |
| 5862 | #[doc = "IDMA transfer error. Interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6203 | #[doc = "Frame format error"] |
| 5863 | pub fn set_idmate(&mut self, val: bool) { | 6204 | pub fn set_fre(&mut self, val: bool) { |
| 5864 | self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); | 6205 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 5865 | } | 6206 | } |
| 5866 | #[doc = "IDMA buffer transfer complete. interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6207 | #[doc = "FIFO reception level"] |
| 5867 | pub const fn idmabtc(&self) -> bool { | 6208 | pub const fn frlvl(&self) -> u8 { |
| 5868 | let val = (self.0 >> 28usize) & 0x01; | 6209 | let val = (self.0 >> 9usize) & 0x03; |
| 5869 | val != 0 | 6210 | val as u8 |
| 5870 | } | 6211 | } |
| 5871 | #[doc = "IDMA buffer transfer complete. interrupt flag is cleared by writing corresponding interrupt clear bit in SDMMC_ICR."] | 6212 | #[doc = "FIFO reception level"] |
| 5872 | pub fn set_idmabtc(&mut self, val: bool) { | 6213 | pub fn set_frlvl(&mut self, val: u8) { |
| 5873 | self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); | 6214 | self.0 = (self.0 & !(0x03 << 9usize)) | (((val as u32) & 0x03) << 9usize); |
| 6215 | } | ||
| 6216 | #[doc = "FIFO Transmission Level"] | ||
| 6217 | pub const fn ftlvl(&self) -> u8 { | ||
| 6218 | let val = (self.0 >> 11usize) & 0x03; | ||
| 6219 | val as u8 | ||
| 6220 | } | ||
| 6221 | #[doc = "FIFO Transmission Level"] | ||
| 6222 | pub fn set_ftlvl(&mut self, val: u8) { | ||
| 6223 | self.0 = (self.0 & !(0x03 << 11usize)) | (((val as u32) & 0x03) << 11usize); | ||
| 5874 | } | 6224 | } |
| 5875 | } | 6225 | } |
| 5876 | impl Default for Star { | 6226 | impl Default for Sr { |
| 5877 | fn default() -> Star { | 6227 | fn default() -> Sr { |
| 5878 | Star(0) | 6228 | Sr(0) |
| 5879 | } | 6229 | } |
| 5880 | } | 6230 | } |
| 5881 | #[doc = "The SDMMC_ICR register is a write-only register. Writing a bit with 1 clears the corresponding bit in the SDMMC_STAR status register."] | 6231 | #[doc = "control register 2"] |
| 5882 | #[repr(transparent)] | 6232 | #[repr(transparent)] |
| 5883 | #[derive(Copy, Clone, Eq, PartialEq)] | 6233 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 5884 | pub struct Icr(pub u32); | 6234 | pub struct Cr2(pub u32); |
| 5885 | impl Icr { | 6235 | impl Cr2 { |
| 5886 | #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."] | 6236 | #[doc = "Rx buffer DMA enable"] |
| 5887 | pub const fn ccrcfailc(&self) -> bool { | 6237 | pub const fn rxdmaen(&self) -> bool { |
| 5888 | let val = (self.0 >> 0usize) & 0x01; | 6238 | let val = (self.0 >> 0usize) & 0x01; |
| 5889 | val != 0 | 6239 | val != 0 |
| 5890 | } | 6240 | } |
| 5891 | #[doc = "CCRCFAIL flag clear bit Set by software to clear the CCRCFAIL flag."] | 6241 | #[doc = "Rx buffer DMA enable"] |
| 5892 | pub fn set_ccrcfailc(&mut self, val: bool) { | 6242 | pub fn set_rxdmaen(&mut self, val: bool) { |
| 5893 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 6243 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 5894 | } | 6244 | } |
| 5895 | #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."] | 6245 | #[doc = "Tx buffer DMA enable"] |
| 5896 | pub const fn dcrcfailc(&self) -> bool { | 6246 | pub const fn txdmaen(&self) -> bool { |
| 5897 | let val = (self.0 >> 1usize) & 0x01; | 6247 | let val = (self.0 >> 1usize) & 0x01; |
| 5898 | val != 0 | 6248 | val != 0 |
| 5899 | } | 6249 | } |
| 5900 | #[doc = "DCRCFAIL flag clear bit Set by software to clear the DCRCFAIL flag."] | 6250 | #[doc = "Tx buffer DMA enable"] |
| 5901 | pub fn set_dcrcfailc(&mut self, val: bool) { | 6251 | pub fn set_txdmaen(&mut self, val: bool) { |
| 5902 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 6252 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 5903 | } | 6253 | } |
| 5904 | #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."] | 6254 | #[doc = "SS output enable"] |
| 5905 | pub const fn ctimeoutc(&self) -> bool { | 6255 | pub const fn ssoe(&self) -> bool { |
| 5906 | let val = (self.0 >> 2usize) & 0x01; | 6256 | let val = (self.0 >> 2usize) & 0x01; |
| 5907 | val != 0 | 6257 | val != 0 |
| 5908 | } | 6258 | } |
| 5909 | #[doc = "CTIMEOUT flag clear bit Set by software to clear the CTIMEOUT flag."] | 6259 | #[doc = "SS output enable"] |
| 5910 | pub fn set_ctimeoutc(&mut self, val: bool) { | 6260 | pub fn set_ssoe(&mut self, val: bool) { |
| 5911 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 6261 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 5912 | } | 6262 | } |
| 5913 | #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."] | 6263 | #[doc = "NSS pulse management"] |
| 5914 | pub const fn dtimeoutc(&self) -> bool { | 6264 | pub const fn nssp(&self) -> bool { |
| 5915 | let val = (self.0 >> 3usize) & 0x01; | 6265 | let val = (self.0 >> 3usize) & 0x01; |
| 5916 | val != 0 | 6266 | val != 0 |
| 5917 | } | 6267 | } |
| 5918 | #[doc = "DTIMEOUT flag clear bit Set by software to clear the DTIMEOUT flag."] | 6268 | #[doc = "NSS pulse management"] |
| 5919 | pub fn set_dtimeoutc(&mut self, val: bool) { | 6269 | pub fn set_nssp(&mut self, val: bool) { |
| 5920 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 6270 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 5921 | } | 6271 | } |
| 5922 | #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."] | 6272 | #[doc = "Frame format"] |
| 5923 | pub const fn txunderrc(&self) -> bool { | 6273 | pub const fn frf(&self) -> super::vals::Frf { |
| 5924 | let val = (self.0 >> 4usize) & 0x01; | 6274 | let val = (self.0 >> 4usize) & 0x01; |
| 5925 | val != 0 | 6275 | super::vals::Frf(val as u8) |
| 5926 | } | 6276 | } |
| 5927 | #[doc = "TXUNDERR flag clear bit Set by software to clear TXUNDERR flag."] | 6277 | #[doc = "Frame format"] |
| 5928 | pub fn set_txunderrc(&mut self, val: bool) { | 6278 | pub fn set_frf(&mut self, val: super::vals::Frf) { |
| 5929 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | 6279 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); |
| 5930 | } | 6280 | } |
| 5931 | #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."] | 6281 | #[doc = "Error interrupt enable"] |
| 5932 | pub const fn rxoverrc(&self) -> bool { | 6282 | pub const fn errie(&self) -> bool { |
| 5933 | let val = (self.0 >> 5usize) & 0x01; | 6283 | let val = (self.0 >> 5usize) & 0x01; |
| 5934 | val != 0 | 6284 | val != 0 |
| 5935 | } | 6285 | } |
| 5936 | #[doc = "RXOVERR flag clear bit Set by software to clear the RXOVERR flag."] | 6286 | #[doc = "Error interrupt enable"] |
| 5937 | pub fn set_rxoverrc(&mut self, val: bool) { | 6287 | pub fn set_errie(&mut self, val: bool) { |
| 5938 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 6288 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 5939 | } | 6289 | } |
| 5940 | #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."] | 6290 | #[doc = "RX buffer not empty interrupt enable"] |
| 5941 | pub const fn cmdrendc(&self) -> bool { | 6291 | pub const fn rxneie(&self) -> bool { |
| 5942 | let val = (self.0 >> 6usize) & 0x01; | 6292 | let val = (self.0 >> 6usize) & 0x01; |
| 5943 | val != 0 | 6293 | val != 0 |
| 5944 | } | 6294 | } |
| 5945 | #[doc = "CMDREND flag clear bit Set by software to clear the CMDREND flag."] | 6295 | #[doc = "RX buffer not empty interrupt enable"] |
| 5946 | pub fn set_cmdrendc(&mut self, val: bool) { | 6296 | pub fn set_rxneie(&mut self, val: bool) { |
| 5947 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 6297 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 5948 | } | 6298 | } |
| 5949 | #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."] | 6299 | #[doc = "Tx buffer empty interrupt enable"] |
| 5950 | pub const fn cmdsentc(&self) -> bool { | 6300 | pub const fn txeie(&self) -> bool { |
| 5951 | let val = (self.0 >> 7usize) & 0x01; | 6301 | let val = (self.0 >> 7usize) & 0x01; |
| 5952 | val != 0 | 6302 | val != 0 |
| 5953 | } | 6303 | } |
| 5954 | #[doc = "CMDSENT flag clear bit Set by software to clear the CMDSENT flag."] | 6304 | #[doc = "Tx buffer empty interrupt enable"] |
| 5955 | pub fn set_cmdsentc(&mut self, val: bool) { | 6305 | pub fn set_txeie(&mut self, val: bool) { |
| 5956 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 6306 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 5957 | } | 6307 | } |
| 5958 | #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."] | 6308 | #[doc = "Data size"] |
| 5959 | pub const fn dataendc(&self) -> bool { | 6309 | pub const fn ds(&self) -> super::vals::Ds { |
| 5960 | let val = (self.0 >> 8usize) & 0x01; | 6310 | let val = (self.0 >> 8usize) & 0x0f; |
| 5961 | val != 0 | 6311 | super::vals::Ds(val as u8) |
| 5962 | } | ||
| 5963 | #[doc = "DATAEND flag clear bit Set by software to clear the DATAEND flag."] | ||
| 5964 | pub fn set_dataendc(&mut self, val: bool) { | ||
| 5965 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | ||
| 5966 | } | ||
| 5967 | #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."] | ||
| 5968 | pub const fn dholdc(&self) -> bool { | ||
| 5969 | let val = (self.0 >> 9usize) & 0x01; | ||
| 5970 | val != 0 | ||
| 5971 | } | ||
| 5972 | #[doc = "DHOLD flag clear bit Set by software to clear the DHOLD flag."] | ||
| 5973 | pub fn set_dholdc(&mut self, val: bool) { | ||
| 5974 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | ||
| 5975 | } | ||
| 5976 | #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."] | ||
| 5977 | pub const fn dbckendc(&self) -> bool { | ||
| 5978 | let val = (self.0 >> 10usize) & 0x01; | ||
| 5979 | val != 0 | ||
| 5980 | } | ||
| 5981 | #[doc = "DBCKEND flag clear bit Set by software to clear the DBCKEND flag."] | ||
| 5982 | pub fn set_dbckendc(&mut self, val: bool) { | ||
| 5983 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); | ||
| 5984 | } | ||
| 5985 | #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."] | ||
| 5986 | pub const fn dabortc(&self) -> bool { | ||
| 5987 | let val = (self.0 >> 11usize) & 0x01; | ||
| 5988 | val != 0 | ||
| 5989 | } | ||
| 5990 | #[doc = "DABORT flag clear bit Set by software to clear the DABORT flag."] | ||
| 5991 | pub fn set_dabortc(&mut self, val: bool) { | ||
| 5992 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); | ||
| 5993 | } | ||
| 5994 | #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."] | ||
| 5995 | pub const fn busyd0endc(&self) -> bool { | ||
| 5996 | let val = (self.0 >> 21usize) & 0x01; | ||
| 5997 | val != 0 | ||
| 5998 | } | ||
| 5999 | #[doc = "BUSYD0END flag clear bit Set by software to clear the BUSYD0END flag."] | ||
| 6000 | pub fn set_busyd0endc(&mut self, val: bool) { | ||
| 6001 | self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); | ||
| 6002 | } | ||
| 6003 | #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."] | ||
| 6004 | pub const fn sdioitc(&self) -> bool { | ||
| 6005 | let val = (self.0 >> 22usize) & 0x01; | ||
| 6006 | val != 0 | ||
| 6007 | } | ||
| 6008 | #[doc = "SDIOIT flag clear bit Set by software to clear the SDIOIT flag."] | ||
| 6009 | pub fn set_sdioitc(&mut self, val: bool) { | ||
| 6010 | self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); | ||
| 6011 | } | ||
| 6012 | #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."] | ||
| 6013 | pub const fn ackfailc(&self) -> bool { | ||
| 6014 | let val = (self.0 >> 23usize) & 0x01; | ||
| 6015 | val != 0 | ||
| 6016 | } | ||
| 6017 | #[doc = "ACKFAIL flag clear bit Set by software to clear the ACKFAIL flag."] | ||
| 6018 | pub fn set_ackfailc(&mut self, val: bool) { | ||
| 6019 | self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); | ||
| 6020 | } | ||
| 6021 | #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."] | ||
| 6022 | pub const fn acktimeoutc(&self) -> bool { | ||
| 6023 | let val = (self.0 >> 24usize) & 0x01; | ||
| 6024 | val != 0 | ||
| 6025 | } | ||
| 6026 | #[doc = "ACKTIMEOUT flag clear bit Set by software to clear the ACKTIMEOUT flag."] | ||
| 6027 | pub fn set_acktimeoutc(&mut self, val: bool) { | ||
| 6028 | self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); | ||
| 6029 | } | ||
| 6030 | #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."] | ||
| 6031 | pub const fn vswendc(&self) -> bool { | ||
| 6032 | let val = (self.0 >> 25usize) & 0x01; | ||
| 6033 | val != 0 | ||
| 6034 | } | 6312 | } |
| 6035 | #[doc = "VSWEND flag clear bit Set by software to clear the VSWEND flag."] | 6313 | #[doc = "Data size"] |
| 6036 | pub fn set_vswendc(&mut self, val: bool) { | 6314 | pub fn set_ds(&mut self, val: super::vals::Ds) { |
| 6037 | self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); | 6315 | self.0 = (self.0 & !(0x0f << 8usize)) | (((val.0 as u32) & 0x0f) << 8usize); |
| 6038 | } | 6316 | } |
| 6039 | #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."] | 6317 | #[doc = "FIFO reception threshold"] |
| 6040 | pub const fn ckstopc(&self) -> bool { | 6318 | pub const fn frxth(&self) -> super::vals::Frxth { |
| 6041 | let val = (self.0 >> 26usize) & 0x01; | 6319 | let val = (self.0 >> 12usize) & 0x01; |
| 6042 | val != 0 | 6320 | super::vals::Frxth(val as u8) |
| 6043 | } | 6321 | } |
| 6044 | #[doc = "CKSTOP flag clear bit Set by software to clear the CKSTOP flag."] | 6322 | #[doc = "FIFO reception threshold"] |
| 6045 | pub fn set_ckstopc(&mut self, val: bool) { | 6323 | pub fn set_frxth(&mut self, val: super::vals::Frxth) { |
| 6046 | self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); | 6324 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); |
| 6047 | } | 6325 | } |
| 6048 | #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."] | 6326 | #[doc = "Last DMA transfer for reception"] |
| 6049 | pub const fn idmatec(&self) -> bool { | 6327 | pub const fn ldma_rx(&self) -> super::vals::LdmaRx { |
| 6050 | let val = (self.0 >> 27usize) & 0x01; | 6328 | let val = (self.0 >> 13usize) & 0x01; |
| 6051 | val != 0 | 6329 | super::vals::LdmaRx(val as u8) |
| 6052 | } | 6330 | } |
| 6053 | #[doc = "IDMA transfer error clear bit Set by software to clear the IDMATE flag."] | 6331 | #[doc = "Last DMA transfer for reception"] |
| 6054 | pub fn set_idmatec(&mut self, val: bool) { | 6332 | pub fn set_ldma_rx(&mut self, val: super::vals::LdmaRx) { |
| 6055 | self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); | 6333 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val.0 as u32) & 0x01) << 13usize); |
| 6056 | } | 6334 | } |
| 6057 | #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."] | 6335 | #[doc = "Last DMA transfer for transmission"] |
| 6058 | pub const fn idmabtcc(&self) -> bool { | 6336 | pub const fn ldma_tx(&self) -> super::vals::LdmaTx { |
| 6059 | let val = (self.0 >> 28usize) & 0x01; | 6337 | let val = (self.0 >> 14usize) & 0x01; |
| 6060 | val != 0 | 6338 | super::vals::LdmaTx(val as u8) |
| 6061 | } | 6339 | } |
| 6062 | #[doc = "IDMA buffer transfer complete clear bit Set by software to clear the IDMABTC flag."] | 6340 | #[doc = "Last DMA transfer for transmission"] |
| 6063 | pub fn set_idmabtcc(&mut self, val: bool) { | 6341 | pub fn set_ldma_tx(&mut self, val: super::vals::LdmaTx) { |
| 6064 | self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); | 6342 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); |
| 6065 | } | 6343 | } |
| 6066 | } | 6344 | } |
| 6067 | impl Default for Icr { | 6345 | impl Default for Cr2 { |
| 6068 | fn default() -> Icr { | 6346 | fn default() -> Cr2 { |
| 6069 | Icr(0) | 6347 | Cr2(0) |
| 6070 | } | 6348 | } |
| 6071 | } | 6349 | } |
| 6072 | #[doc = "SDMMC command response register"] | 6350 | } |
| 6351 | pub mod vals { | ||
| 6352 | use crate::generic::*; | ||
| 6073 | #[repr(transparent)] | 6353 | #[repr(transparent)] |
| 6074 | #[derive(Copy, Clone, Eq, PartialEq)] | 6354 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 6075 | pub struct Respcmdr(pub u32); | 6355 | pub struct Ds(pub u8); |
| 6076 | impl Respcmdr { | 6356 | impl Ds { |
| 6077 | #[doc = "Response command index"] | 6357 | #[doc = "4-bit"] |
| 6078 | pub const fn respcmd(&self) -> u8 { | 6358 | pub const FOURBIT: Self = Self(0x03); |
| 6079 | let val = (self.0 >> 0usize) & 0x3f; | 6359 | #[doc = "5-bit"] |
| 6080 | val as u8 | 6360 | pub const FIVEBIT: Self = Self(0x04); |
| 6081 | } | 6361 | #[doc = "6-bit"] |
| 6082 | #[doc = "Response command index"] | 6362 | pub const SIXBIT: Self = Self(0x05); |
| 6083 | pub fn set_respcmd(&mut self, val: u8) { | 6363 | #[doc = "7-bit"] |
| 6084 | self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); | 6364 | pub const SEVENBIT: Self = Self(0x06); |
| 6085 | } | 6365 | #[doc = "8-bit"] |
| 6366 | pub const EIGHTBIT: Self = Self(0x07); | ||
| 6367 | #[doc = "9-bit"] | ||
| 6368 | pub const NINEBIT: Self = Self(0x08); | ||
| 6369 | #[doc = "10-bit"] | ||
| 6370 | pub const TENBIT: Self = Self(0x09); | ||
| 6371 | #[doc = "11-bit"] | ||
| 6372 | pub const ELEVENBIT: Self = Self(0x0a); | ||
| 6373 | #[doc = "12-bit"] | ||
| 6374 | pub const TWELVEBIT: Self = Self(0x0b); | ||
| 6375 | #[doc = "13-bit"] | ||
| 6376 | pub const THIRTEENBIT: Self = Self(0x0c); | ||
| 6377 | #[doc = "14-bit"] | ||
| 6378 | pub const FOURTEENBIT: Self = Self(0x0d); | ||
| 6379 | #[doc = "15-bit"] | ||
| 6380 | pub const FIFTEENBIT: Self = Self(0x0e); | ||
| 6381 | #[doc = "16-bit"] | ||
| 6382 | pub const SIXTEENBIT: Self = Self(0x0f); | ||
| 6086 | } | 6383 | } |
| 6087 | impl Default for Respcmdr { | 6384 | #[repr(transparent)] |
| 6088 | fn default() -> Respcmdr { | 6385 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 6089 | Respcmdr(0) | 6386 | pub struct Cpha(pub u8); |
| 6090 | } | 6387 | impl Cpha { |
| 6388 | #[doc = "The first clock transition is the first data capture edge"] | ||
| 6389 | pub const FIRSTEDGE: Self = Self(0); | ||
| 6390 | #[doc = "The second clock transition is the first data capture edge"] | ||
| 6391 | pub const SECONDEDGE: Self = Self(0x01); | ||
| 6392 | } | ||
| 6393 | #[repr(transparent)] | ||
| 6394 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6395 | pub struct LdmaTx(pub u8); | ||
| 6396 | impl LdmaTx { | ||
| 6397 | #[doc = "Number of data to transfer for transmit is even"] | ||
| 6398 | pub const EVEN: Self = Self(0); | ||
| 6399 | #[doc = "Number of data to transfer for transmit is odd"] | ||
| 6400 | pub const ODD: Self = Self(0x01); | ||
| 6401 | } | ||
| 6402 | #[repr(transparent)] | ||
| 6403 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6404 | pub struct Frxth(pub u8); | ||
| 6405 | impl Frxth { | ||
| 6406 | #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit)"] | ||
| 6407 | pub const HALF: Self = Self(0); | ||
| 6408 | #[doc = "RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit)"] | ||
| 6409 | pub const QUARTER: Self = Self(0x01); | ||
| 6410 | } | ||
| 6411 | #[repr(transparent)] | ||
| 6412 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6413 | pub struct Cpol(pub u8); | ||
| 6414 | impl Cpol { | ||
| 6415 | #[doc = "CK to 0 when idle"] | ||
| 6416 | pub const IDLELOW: Self = Self(0); | ||
| 6417 | #[doc = "CK to 1 when idle"] | ||
| 6418 | pub const IDLEHIGH: Self = Self(0x01); | ||
| 6091 | } | 6419 | } |
| 6092 | #[doc = "The interrupt mask register determines which status flags generate an interrupt request by setting the corresponding bit to 1."] | 6420 | #[repr(transparent)] |
| 6421 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6422 | pub struct Frf(pub u8); | ||
| 6423 | impl Frf { | ||
| 6424 | #[doc = "SPI Motorola mode"] | ||
| 6425 | pub const MOTOROLA: Self = Self(0); | ||
| 6426 | #[doc = "SPI TI mode"] | ||
| 6427 | pub const TI: Self = Self(0x01); | ||
| 6428 | } | ||
| 6429 | #[repr(transparent)] | ||
| 6430 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6431 | pub struct Crcl(pub u8); | ||
| 6432 | impl Crcl { | ||
| 6433 | #[doc = "8-bit CRC length"] | ||
| 6434 | pub const EIGHTBIT: Self = Self(0); | ||
| 6435 | #[doc = "16-bit CRC length"] | ||
| 6436 | pub const SIXTEENBIT: Self = Self(0x01); | ||
| 6437 | } | ||
| 6438 | #[repr(transparent)] | ||
| 6439 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6440 | pub struct Bidimode(pub u8); | ||
| 6441 | impl Bidimode { | ||
| 6442 | #[doc = "2-line unidirectional data mode selected"] | ||
| 6443 | pub const UNIDIRECTIONAL: Self = Self(0); | ||
| 6444 | #[doc = "1-line bidirectional data mode selected"] | ||
| 6445 | pub const BIDIRECTIONAL: Self = Self(0x01); | ||
| 6446 | } | ||
| 6447 | #[repr(transparent)] | ||
| 6448 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6449 | pub struct Mstr(pub u8); | ||
| 6450 | impl Mstr { | ||
| 6451 | #[doc = "Slave configuration"] | ||
| 6452 | pub const SLAVE: Self = Self(0); | ||
| 6453 | #[doc = "Master configuration"] | ||
| 6454 | pub const MASTER: Self = Self(0x01); | ||
| 6455 | } | ||
| 6456 | #[repr(transparent)] | ||
| 6457 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6458 | pub struct LdmaRx(pub u8); | ||
| 6459 | impl LdmaRx { | ||
| 6460 | #[doc = "Number of data to transfer for receive is even"] | ||
| 6461 | pub const EVEN: Self = Self(0); | ||
| 6462 | #[doc = "Number of data to transfer for receive is odd"] | ||
| 6463 | pub const ODD: Self = Self(0x01); | ||
| 6464 | } | ||
| 6465 | #[repr(transparent)] | ||
| 6466 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6467 | pub struct Ftlvlr(pub u8); | ||
| 6468 | impl Ftlvlr { | ||
| 6469 | #[doc = "Tx FIFO Empty"] | ||
| 6470 | pub const EMPTY: Self = Self(0); | ||
| 6471 | #[doc = "Tx 1/4 FIFO"] | ||
| 6472 | pub const QUARTER: Self = Self(0x01); | ||
| 6473 | #[doc = "Tx 1/2 FIFO"] | ||
| 6474 | pub const HALF: Self = Self(0x02); | ||
| 6475 | #[doc = "Tx FIFO full"] | ||
| 6476 | pub const FULL: Self = Self(0x03); | ||
| 6477 | } | ||
| 6478 | #[repr(transparent)] | ||
| 6479 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6480 | pub struct Br(pub u8); | ||
| 6481 | impl Br { | ||
| 6482 | #[doc = "f_PCLK / 2"] | ||
| 6483 | pub const DIV2: Self = Self(0); | ||
| 6484 | #[doc = "f_PCLK / 4"] | ||
| 6485 | pub const DIV4: Self = Self(0x01); | ||
| 6486 | #[doc = "f_PCLK / 8"] | ||
| 6487 | pub const DIV8: Self = Self(0x02); | ||
| 6488 | #[doc = "f_PCLK / 16"] | ||
| 6489 | pub const DIV16: Self = Self(0x03); | ||
| 6490 | #[doc = "f_PCLK / 32"] | ||
| 6491 | pub const DIV32: Self = Self(0x04); | ||
| 6492 | #[doc = "f_PCLK / 64"] | ||
| 6493 | pub const DIV64: Self = Self(0x05); | ||
| 6494 | #[doc = "f_PCLK / 128"] | ||
| 6495 | pub const DIV128: Self = Self(0x06); | ||
| 6496 | #[doc = "f_PCLK / 256"] | ||
| 6497 | pub const DIV256: Self = Self(0x07); | ||
| 6498 | } | ||
| 6499 | #[repr(transparent)] | ||
| 6500 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6501 | pub struct Crcnext(pub u8); | ||
| 6502 | impl Crcnext { | ||
| 6503 | #[doc = "Next transmit value is from Tx buffer"] | ||
| 6504 | pub const TXBUFFER: Self = Self(0); | ||
| 6505 | #[doc = "Next transmit value is from Tx CRC register"] | ||
| 6506 | pub const CRC: Self = Self(0x01); | ||
| 6507 | } | ||
| 6508 | #[repr(transparent)] | ||
| 6509 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6510 | pub struct Bidioe(pub u8); | ||
| 6511 | impl Bidioe { | ||
| 6512 | #[doc = "Output disabled (receive-only mode)"] | ||
| 6513 | pub const OUTPUTDISABLED: Self = Self(0); | ||
| 6514 | #[doc = "Output enabled (transmit-only mode)"] | ||
| 6515 | pub const OUTPUTENABLED: Self = Self(0x01); | ||
| 6516 | } | ||
| 6517 | #[repr(transparent)] | ||
| 6518 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6519 | pub struct Frer(pub u8); | ||
| 6520 | impl Frer { | ||
| 6521 | #[doc = "No frame format error"] | ||
| 6522 | pub const NOERROR: Self = Self(0); | ||
| 6523 | #[doc = "A frame format error occurred"] | ||
| 6524 | pub const ERROR: Self = Self(0x01); | ||
| 6525 | } | ||
| 6526 | #[repr(transparent)] | ||
| 6527 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6528 | pub struct Lsbfirst(pub u8); | ||
| 6529 | impl Lsbfirst { | ||
| 6530 | #[doc = "Data is transmitted/received with the MSB first"] | ||
| 6531 | pub const MSBFIRST: Self = Self(0); | ||
| 6532 | #[doc = "Data is transmitted/received with the LSB first"] | ||
| 6533 | pub const LSBFIRST: Self = Self(0x01); | ||
| 6534 | } | ||
| 6535 | #[repr(transparent)] | ||
| 6536 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6537 | pub struct Frlvlr(pub u8); | ||
| 6538 | impl Frlvlr { | ||
| 6539 | #[doc = "Rx FIFO Empty"] | ||
| 6540 | pub const EMPTY: Self = Self(0); | ||
| 6541 | #[doc = "Rx 1/4 FIFO"] | ||
| 6542 | pub const QUARTER: Self = Self(0x01); | ||
| 6543 | #[doc = "Rx 1/2 FIFO"] | ||
| 6544 | pub const HALF: Self = Self(0x02); | ||
| 6545 | #[doc = "Rx FIFO full"] | ||
| 6546 | pub const FULL: Self = Self(0x03); | ||
| 6547 | } | ||
| 6548 | #[repr(transparent)] | ||
| 6549 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 6550 | pub struct Rxonly(pub u8); | ||
| 6551 | impl Rxonly { | ||
| 6552 | #[doc = "Full duplex (Transmit and receive)"] | ||
| 6553 | pub const FULLDUPLEX: Self = Self(0); | ||
| 6554 | #[doc = "Output disabled (Receive-only mode)"] | ||
| 6555 | pub const OUTPUTDISABLED: Self = Self(0x01); | ||
| 6556 | } | ||
| 6557 | } | ||
| 6558 | } | ||
| 6559 | pub mod usart_v1 { | ||
| 6560 | use crate::generic::*; | ||
| 6561 | #[doc = "Universal asynchronous receiver transmitter"] | ||
| 6562 | #[derive(Copy, Clone)] | ||
| 6563 | pub struct Uart(pub *mut u8); | ||
| 6564 | unsafe impl Send for Uart {} | ||
| 6565 | unsafe impl Sync for Uart {} | ||
| 6566 | impl Uart { | ||
| 6567 | #[doc = "Status register"] | ||
| 6568 | pub fn sr(self) -> Reg<regs::Sr, RW> { | ||
| 6569 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 6570 | } | ||
| 6571 | #[doc = "Data register"] | ||
| 6572 | pub fn dr(self) -> Reg<regs::Dr, RW> { | ||
| 6573 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 6574 | } | ||
| 6575 | #[doc = "Baud rate register"] | ||
| 6576 | pub fn brr(self) -> Reg<regs::Brr, RW> { | ||
| 6577 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 6578 | } | ||
| 6579 | #[doc = "Control register 1"] | ||
| 6580 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { | ||
| 6581 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 6582 | } | ||
| 6583 | #[doc = "Control register 2"] | ||
| 6584 | pub fn cr2(self) -> Reg<regs::Cr2, RW> { | ||
| 6585 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 6586 | } | ||
| 6587 | #[doc = "Control register 3"] | ||
| 6588 | pub fn cr3(self) -> Reg<regs::Cr3, RW> { | ||
| 6589 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 6590 | } | ||
| 6591 | } | ||
| 6592 | #[doc = "Universal synchronous asynchronous receiver transmitter"] | ||
| 6593 | #[derive(Copy, Clone)] | ||
| 6594 | pub struct Usart(pub *mut u8); | ||
| 6595 | unsafe impl Send for Usart {} | ||
| 6596 | unsafe impl Sync for Usart {} | ||
| 6597 | impl Usart { | ||
| 6598 | #[doc = "Status register"] | ||
| 6599 | pub fn sr(self) -> Reg<regs::Sr, RW> { | ||
| 6600 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 6601 | } | ||
| 6602 | #[doc = "Data register"] | ||
| 6603 | pub fn dr(self) -> Reg<regs::Dr, RW> { | ||
| 6604 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 6605 | } | ||
| 6606 | #[doc = "Baud rate register"] | ||
| 6607 | pub fn brr(self) -> Reg<regs::Brr, RW> { | ||
| 6608 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 6609 | } | ||
| 6610 | #[doc = "Control register 1"] | ||
| 6611 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { | ||
| 6612 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 6613 | } | ||
| 6614 | #[doc = "Control register 2"] | ||
| 6615 | pub fn cr2(self) -> Reg<regs::Cr2Usart, RW> { | ||
| 6616 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 6617 | } | ||
| 6618 | #[doc = "Control register 3"] | ||
| 6619 | pub fn cr3(self) -> Reg<regs::Cr3Usart, RW> { | ||
| 6620 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 6621 | } | ||
| 6622 | #[doc = "Guard time and prescaler register"] | ||
| 6623 | pub fn gtpr(self) -> Reg<regs::Gtpr, RW> { | ||
| 6624 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 6625 | } | ||
| 6626 | } | ||
| 6627 | pub mod regs { | ||
| 6628 | use crate::generic::*; | ||
| 6629 | #[doc = "Status register"] | ||
| 6093 | #[repr(transparent)] | 6630 | #[repr(transparent)] |
| 6094 | #[derive(Copy, Clone, Eq, PartialEq)] | 6631 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 6095 | pub struct Maskr(pub u32); | 6632 | pub struct Sr(pub u32); |
| 6096 | impl Maskr { | 6633 | impl Sr { |
| 6097 | #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."] | 6634 | #[doc = "Parity error"] |
| 6098 | pub const fn ccrcfailie(&self) -> bool { | 6635 | pub const fn pe(&self) -> bool { |
| 6099 | let val = (self.0 >> 0usize) & 0x01; | 6636 | let val = (self.0 >> 0usize) & 0x01; |
| 6100 | val != 0 | 6637 | val != 0 |
| 6101 | } | 6638 | } |
| 6102 | #[doc = "Command CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by command CRC failure."] | 6639 | #[doc = "Parity error"] |
| 6103 | pub fn set_ccrcfailie(&mut self, val: bool) { | 6640 | pub fn set_pe(&mut self, val: bool) { |
| 6104 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 6641 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 6105 | } | 6642 | } |
| 6106 | #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."] | 6643 | #[doc = "Framing error"] |
| 6107 | pub const fn dcrcfailie(&self) -> bool { | 6644 | pub const fn fe(&self) -> bool { |
| 6108 | let val = (self.0 >> 1usize) & 0x01; | 6645 | let val = (self.0 >> 1usize) & 0x01; |
| 6109 | val != 0 | 6646 | val != 0 |
| 6110 | } | 6647 | } |
| 6111 | #[doc = "Data CRC fail interrupt enable Set and cleared by software to enable/disable interrupt caused by data CRC failure."] | 6648 | #[doc = "Framing error"] |
| 6112 | pub fn set_dcrcfailie(&mut self, val: bool) { | 6649 | pub fn set_fe(&mut self, val: bool) { |
| 6113 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 6650 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 6114 | } | 6651 | } |
| 6115 | #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."] | 6652 | #[doc = "Noise error flag"] |
| 6116 | pub const fn ctimeoutie(&self) -> bool { | 6653 | pub const fn ne(&self) -> bool { |
| 6117 | let val = (self.0 >> 2usize) & 0x01; | 6654 | let val = (self.0 >> 2usize) & 0x01; |
| 6118 | val != 0 | 6655 | val != 0 |
| 6119 | } | 6656 | } |
| 6120 | #[doc = "Command timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by command timeout."] | 6657 | #[doc = "Noise error flag"] |
| 6121 | pub fn set_ctimeoutie(&mut self, val: bool) { | 6658 | pub fn set_ne(&mut self, val: bool) { |
| 6122 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 6659 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 6123 | } | 6660 | } |
| 6124 | #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."] | 6661 | #[doc = "Overrun error"] |
| 6125 | pub const fn dtimeoutie(&self) -> bool { | 6662 | pub const fn ore(&self) -> bool { |
| 6126 | let val = (self.0 >> 3usize) & 0x01; | 6663 | let val = (self.0 >> 3usize) & 0x01; |
| 6127 | val != 0 | 6664 | val != 0 |
| 6128 | } | 6665 | } |
| 6129 | #[doc = "Data timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by data timeout."] | 6666 | #[doc = "Overrun error"] |
| 6130 | pub fn set_dtimeoutie(&mut self, val: bool) { | 6667 | pub fn set_ore(&mut self, val: bool) { |
| 6131 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 6668 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 6132 | } | 6669 | } |
| 6133 | #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."] | 6670 | #[doc = "IDLE line detected"] |
| 6134 | pub const fn txunderrie(&self) -> bool { | 6671 | pub const fn idle(&self) -> bool { |
| 6135 | let val = (self.0 >> 4usize) & 0x01; | 6672 | let val = (self.0 >> 4usize) & 0x01; |
| 6136 | val != 0 | 6673 | val != 0 |
| 6137 | } | 6674 | } |
| 6138 | #[doc = "Tx FIFO underrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO underrun error."] | 6675 | #[doc = "IDLE line detected"] |
| 6139 | pub fn set_txunderrie(&mut self, val: bool) { | 6676 | pub fn set_idle(&mut self, val: bool) { |
| 6140 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | 6677 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); |
| 6141 | } | 6678 | } |
| 6142 | #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."] | 6679 | #[doc = "Read data register not empty"] |
| 6143 | pub const fn rxoverrie(&self) -> bool { | 6680 | pub const fn rxne(&self) -> bool { |
| 6144 | let val = (self.0 >> 5usize) & 0x01; | 6681 | let val = (self.0 >> 5usize) & 0x01; |
| 6145 | val != 0 | 6682 | val != 0 |
| 6146 | } | 6683 | } |
| 6147 | #[doc = "Rx FIFO overrun error interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO overrun error."] | 6684 | #[doc = "Read data register not empty"] |
| 6148 | pub fn set_rxoverrie(&mut self, val: bool) { | 6685 | pub fn set_rxne(&mut self, val: bool) { |
| 6149 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 6686 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 6150 | } | 6687 | } |
| 6151 | #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."] | 6688 | #[doc = "Transmission complete"] |
| 6152 | pub const fn cmdrendie(&self) -> bool { | 6689 | pub const fn tc(&self) -> bool { |
| 6153 | let val = (self.0 >> 6usize) & 0x01; | 6690 | let val = (self.0 >> 6usize) & 0x01; |
| 6154 | val != 0 | 6691 | val != 0 |
| 6155 | } | 6692 | } |
| 6156 | #[doc = "Command response received interrupt enable Set and cleared by software to enable/disable interrupt caused by receiving command response."] | 6693 | #[doc = "Transmission complete"] |
| 6157 | pub fn set_cmdrendie(&mut self, val: bool) { | 6694 | pub fn set_tc(&mut self, val: bool) { |
| 6158 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 6695 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 6159 | } | 6696 | } |
| 6160 | #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."] | 6697 | #[doc = "Transmit data register empty"] |
| 6161 | pub const fn cmdsentie(&self) -> bool { | 6698 | pub const fn txe(&self) -> bool { |
| 6162 | let val = (self.0 >> 7usize) & 0x01; | 6699 | let val = (self.0 >> 7usize) & 0x01; |
| 6163 | val != 0 | 6700 | val != 0 |
| 6164 | } | 6701 | } |
| 6165 | #[doc = "Command sent interrupt enable Set and cleared by software to enable/disable interrupt caused by sending command."] | 6702 | #[doc = "Transmit data register empty"] |
| 6166 | pub fn set_cmdsentie(&mut self, val: bool) { | 6703 | pub fn set_txe(&mut self, val: bool) { |
| 6167 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 6704 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 6168 | } | 6705 | } |
| 6169 | #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."] | 6706 | #[doc = "LIN break detection flag"] |
| 6170 | pub const fn dataendie(&self) -> bool { | 6707 | pub const fn lbd(&self) -> bool { |
| 6171 | let val = (self.0 >> 8usize) & 0x01; | 6708 | let val = (self.0 >> 8usize) & 0x01; |
| 6172 | val != 0 | 6709 | val != 0 |
| 6173 | } | 6710 | } |
| 6174 | #[doc = "Data end interrupt enable Set and cleared by software to enable/disable interrupt caused by data end."] | 6711 | #[doc = "LIN break detection flag"] |
| 6175 | pub fn set_dataendie(&mut self, val: bool) { | 6712 | pub fn set_lbd(&mut self, val: bool) { |
| 6176 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 6713 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 6177 | } | 6714 | } |
| 6178 | #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."] | 6715 | } |
| 6179 | pub const fn dholdie(&self) -> bool { | 6716 | impl Default for Sr { |
| 6180 | let val = (self.0 >> 9usize) & 0x01; | 6717 | fn default() -> Sr { |
| 6718 | Sr(0) | ||
| 6719 | } | ||
| 6720 | } | ||
| 6721 | #[doc = "Control register 3"] | ||
| 6722 | #[repr(transparent)] | ||
| 6723 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6724 | pub struct Cr3(pub u32); | ||
| 6725 | impl Cr3 { | ||
| 6726 | #[doc = "Error interrupt enable"] | ||
| 6727 | pub const fn eie(&self) -> bool { | ||
| 6728 | let val = (self.0 >> 0usize) & 0x01; | ||
| 6181 | val != 0 | 6729 | val != 0 |
| 6182 | } | 6730 | } |
| 6183 | #[doc = "Data hold interrupt enable Set and cleared by software to enable/disable the interrupt generated when sending new data is hold in the DPSM Wait_S state."] | 6731 | #[doc = "Error interrupt enable"] |
| 6184 | pub fn set_dholdie(&mut self, val: bool) { | 6732 | pub fn set_eie(&mut self, val: bool) { |
| 6185 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | 6733 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 6186 | } | 6734 | } |
| 6187 | #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."] | 6735 | #[doc = "IrDA mode enable"] |
| 6188 | pub const fn dbckendie(&self) -> bool { | 6736 | pub const fn iren(&self) -> bool { |
| 6189 | let val = (self.0 >> 10usize) & 0x01; | 6737 | let val = (self.0 >> 1usize) & 0x01; |
| 6190 | val != 0 | 6738 | val != 0 |
| 6191 | } | 6739 | } |
| 6192 | #[doc = "Data block end interrupt enable Set and cleared by software to enable/disable interrupt caused by data block end."] | 6740 | #[doc = "IrDA mode enable"] |
| 6193 | pub fn set_dbckendie(&mut self, val: bool) { | 6741 | pub fn set_iren(&mut self, val: bool) { |
| 6194 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); | 6742 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 6195 | } | 6743 | } |
| 6196 | #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."] | 6744 | #[doc = "IrDA low-power"] |
| 6197 | pub const fn dabortie(&self) -> bool { | 6745 | pub const fn irlp(&self) -> super::vals::Irlp { |
| 6198 | let val = (self.0 >> 11usize) & 0x01; | 6746 | let val = (self.0 >> 2usize) & 0x01; |
| 6747 | super::vals::Irlp(val as u8) | ||
| 6748 | } | ||
| 6749 | #[doc = "IrDA low-power"] | ||
| 6750 | pub fn set_irlp(&mut self, val: super::vals::Irlp) { | ||
| 6751 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | ||
| 6752 | } | ||
| 6753 | #[doc = "Half-duplex selection"] | ||
| 6754 | pub const fn hdsel(&self) -> super::vals::Hdsel { | ||
| 6755 | let val = (self.0 >> 3usize) & 0x01; | ||
| 6756 | super::vals::Hdsel(val as u8) | ||
| 6757 | } | ||
| 6758 | #[doc = "Half-duplex selection"] | ||
| 6759 | pub fn set_hdsel(&mut self, val: super::vals::Hdsel) { | ||
| 6760 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); | ||
| 6761 | } | ||
| 6762 | #[doc = "DMA enable receiver"] | ||
| 6763 | pub const fn dmar(&self) -> bool { | ||
| 6764 | let val = (self.0 >> 6usize) & 0x01; | ||
| 6199 | val != 0 | 6765 | val != 0 |
| 6200 | } | 6766 | } |
| 6201 | #[doc = "Data transfer aborted interrupt enable Set and cleared by software to enable/disable interrupt caused by a data transfer being aborted."] | 6767 | #[doc = "DMA enable receiver"] |
| 6202 | pub fn set_dabortie(&mut self, val: bool) { | 6768 | pub fn set_dmar(&mut self, val: bool) { |
| 6203 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); | 6769 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 6204 | } | 6770 | } |
| 6205 | #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."] | 6771 | #[doc = "DMA enable transmitter"] |
| 6206 | pub const fn txfifoheie(&self) -> bool { | 6772 | pub const fn dmat(&self) -> bool { |
| 6207 | let val = (self.0 >> 14usize) & 0x01; | 6773 | let val = (self.0 >> 7usize) & 0x01; |
| 6208 | val != 0 | 6774 | val != 0 |
| 6209 | } | 6775 | } |
| 6210 | #[doc = "Tx FIFO half empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO half empty."] | 6776 | #[doc = "DMA enable transmitter"] |
| 6211 | pub fn set_txfifoheie(&mut self, val: bool) { | 6777 | pub fn set_dmat(&mut self, val: bool) { |
| 6212 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | 6778 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 6213 | } | 6779 | } |
| 6214 | #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."] | 6780 | } |
| 6215 | pub const fn rxfifohfie(&self) -> bool { | 6781 | impl Default for Cr3 { |
| 6216 | let val = (self.0 >> 15usize) & 0x01; | 6782 | fn default() -> Cr3 { |
| 6783 | Cr3(0) | ||
| 6784 | } | ||
| 6785 | } | ||
| 6786 | #[doc = "Status register"] | ||
| 6787 | #[repr(transparent)] | ||
| 6788 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6789 | pub struct SrUsart(pub u32); | ||
| 6790 | impl SrUsart { | ||
| 6791 | #[doc = "Parity error"] | ||
| 6792 | pub const fn pe(&self) -> bool { | ||
| 6793 | let val = (self.0 >> 0usize) & 0x01; | ||
| 6217 | val != 0 | 6794 | val != 0 |
| 6218 | } | 6795 | } |
| 6219 | #[doc = "Rx FIFO half full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO half full."] | 6796 | #[doc = "Parity error"] |
| 6220 | pub fn set_rxfifohfie(&mut self, val: bool) { | 6797 | pub fn set_pe(&mut self, val: bool) { |
| 6221 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); | 6798 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 6222 | } | 6799 | } |
| 6223 | #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."] | 6800 | #[doc = "Framing error"] |
| 6224 | pub const fn rxfifofie(&self) -> bool { | 6801 | pub const fn fe(&self) -> bool { |
| 6225 | let val = (self.0 >> 17usize) & 0x01; | 6802 | let val = (self.0 >> 1usize) & 0x01; |
| 6226 | val != 0 | 6803 | val != 0 |
| 6227 | } | 6804 | } |
| 6228 | #[doc = "Rx FIFO full interrupt enable Set and cleared by software to enable/disable interrupt caused by Rx FIFO full."] | 6805 | #[doc = "Framing error"] |
| 6229 | pub fn set_rxfifofie(&mut self, val: bool) { | 6806 | pub fn set_fe(&mut self, val: bool) { |
| 6230 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | 6807 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 6231 | } | 6808 | } |
| 6232 | #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."] | 6809 | #[doc = "Noise error flag"] |
| 6233 | pub const fn txfifoeie(&self) -> bool { | 6810 | pub const fn ne(&self) -> bool { |
| 6234 | let val = (self.0 >> 18usize) & 0x01; | 6811 | let val = (self.0 >> 2usize) & 0x01; |
| 6235 | val != 0 | 6812 | val != 0 |
| 6236 | } | 6813 | } |
| 6237 | #[doc = "Tx FIFO empty interrupt enable Set and cleared by software to enable/disable interrupt caused by Tx FIFO empty."] | 6814 | #[doc = "Noise error flag"] |
| 6238 | pub fn set_txfifoeie(&mut self, val: bool) { | 6815 | pub fn set_ne(&mut self, val: bool) { |
| 6239 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); | 6816 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 6240 | } | 6817 | } |
| 6241 | #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."] | 6818 | #[doc = "Overrun error"] |
| 6242 | pub const fn busyd0endie(&self) -> bool { | 6819 | pub const fn ore(&self) -> bool { |
| 6243 | let val = (self.0 >> 21usize) & 0x01; | 6820 | let val = (self.0 >> 3usize) & 0x01; |
| 6244 | val != 0 | 6821 | val != 0 |
| 6245 | } | 6822 | } |
| 6246 | #[doc = "BUSYD0END interrupt enable Set and cleared by software to enable/disable the interrupt generated when SDMMC_D0 signal changes from busy to NOT busy following a CMD response."] | 6823 | #[doc = "Overrun error"] |
| 6247 | pub fn set_busyd0endie(&mut self, val: bool) { | 6824 | pub fn set_ore(&mut self, val: bool) { |
| 6248 | self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); | 6825 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 6249 | } | 6826 | } |
| 6250 | #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."] | 6827 | #[doc = "IDLE line detected"] |
| 6251 | pub const fn sdioitie(&self) -> bool { | 6828 | pub const fn idle(&self) -> bool { |
| 6252 | let val = (self.0 >> 22usize) & 0x01; | 6829 | let val = (self.0 >> 4usize) & 0x01; |
| 6253 | val != 0 | 6830 | val != 0 |
| 6254 | } | 6831 | } |
| 6255 | #[doc = "SDIO mode interrupt received interrupt enable Set and cleared by software to enable/disable the interrupt generated when receiving the SDIO mode interrupt."] | 6832 | #[doc = "IDLE line detected"] |
| 6256 | pub fn set_sdioitie(&mut self, val: bool) { | 6833 | pub fn set_idle(&mut self, val: bool) { |
| 6257 | self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); | 6834 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); |
| 6258 | } | 6835 | } |
| 6259 | #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."] | 6836 | #[doc = "Read data register not empty"] |
| 6260 | pub const fn ackfailie(&self) -> bool { | 6837 | pub const fn rxne(&self) -> bool { |
| 6261 | let val = (self.0 >> 23usize) & 0x01; | 6838 | let val = (self.0 >> 5usize) & 0x01; |
| 6262 | val != 0 | 6839 | val != 0 |
| 6263 | } | 6840 | } |
| 6264 | #[doc = "Acknowledgment Fail interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment Fail."] | 6841 | #[doc = "Read data register not empty"] |
| 6265 | pub fn set_ackfailie(&mut self, val: bool) { | 6842 | pub fn set_rxne(&mut self, val: bool) { |
| 6266 | self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); | 6843 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 6267 | } | 6844 | } |
| 6268 | #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."] | 6845 | #[doc = "Transmission complete"] |
| 6269 | pub const fn acktimeoutie(&self) -> bool { | 6846 | pub const fn tc(&self) -> bool { |
| 6270 | let val = (self.0 >> 24usize) & 0x01; | 6847 | let val = (self.0 >> 6usize) & 0x01; |
| 6271 | val != 0 | 6848 | val != 0 |
| 6272 | } | 6849 | } |
| 6273 | #[doc = "Acknowledgment timeout interrupt enable Set and cleared by software to enable/disable interrupt caused by acknowledgment timeout."] | 6850 | #[doc = "Transmission complete"] |
| 6274 | pub fn set_acktimeoutie(&mut self, val: bool) { | 6851 | pub fn set_tc(&mut self, val: bool) { |
| 6275 | self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); | 6852 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 6276 | } | 6853 | } |
| 6277 | #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."] | 6854 | #[doc = "Transmit data register empty"] |
| 6278 | pub const fn vswendie(&self) -> bool { | 6855 | pub const fn txe(&self) -> bool { |
| 6279 | let val = (self.0 >> 25usize) & 0x01; | 6856 | let val = (self.0 >> 7usize) & 0x01; |
| 6280 | val != 0 | 6857 | val != 0 |
| 6281 | } | 6858 | } |
| 6282 | #[doc = "Voltage switch critical timing section completion interrupt enable Set and cleared by software to enable/disable the interrupt generated when voltage switch critical timing section completion."] | 6859 | #[doc = "Transmit data register empty"] |
| 6283 | pub fn set_vswendie(&mut self, val: bool) { | 6860 | pub fn set_txe(&mut self, val: bool) { |
| 6284 | self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); | 6861 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 6285 | } | 6862 | } |
| 6286 | #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."] | 6863 | #[doc = "LIN break detection flag"] |
| 6287 | pub const fn ckstopie(&self) -> bool { | 6864 | pub const fn lbd(&self) -> bool { |
| 6288 | let val = (self.0 >> 26usize) & 0x01; | 6865 | let val = (self.0 >> 8usize) & 0x01; |
| 6289 | val != 0 | 6866 | val != 0 |
| 6290 | } | 6867 | } |
| 6291 | #[doc = "Voltage Switch clock stopped interrupt enable Set and cleared by software to enable/disable interrupt caused by Voltage Switch clock stopped."] | 6868 | #[doc = "LIN break detection flag"] |
| 6292 | pub fn set_ckstopie(&mut self, val: bool) { | 6869 | pub fn set_lbd(&mut self, val: bool) { |
| 6293 | self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); | 6870 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 6294 | } | 6871 | } |
| 6295 | #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."] | 6872 | #[doc = "CTS flag"] |
| 6296 | pub const fn idmabtcie(&self) -> bool { | 6873 | pub const fn cts(&self) -> bool { |
| 6297 | let val = (self.0 >> 28usize) & 0x01; | 6874 | let val = (self.0 >> 9usize) & 0x01; |
| 6298 | val != 0 | 6875 | val != 0 |
| 6299 | } | 6876 | } |
| 6300 | #[doc = "IDMA buffer transfer complete interrupt enable Set and cleared by software to enable/disable the interrupt generated when the IDMA has transferred all data belonging to a memory buffer."] | 6877 | #[doc = "CTS flag"] |
| 6301 | pub fn set_idmabtcie(&mut self, val: bool) { | 6878 | pub fn set_cts(&mut self, val: bool) { |
| 6302 | self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); | 6879 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); |
| 6303 | } | 6880 | } |
| 6304 | } | 6881 | } |
| 6305 | impl Default for Maskr { | 6882 | impl Default for SrUsart { |
| 6306 | fn default() -> Maskr { | 6883 | fn default() -> SrUsart { |
| 6307 | Maskr(0) | 6884 | SrUsart(0) |
| 6308 | } | 6885 | } |
| 6309 | } | 6886 | } |
| 6310 | #[doc = "The SDMMC_CMDR register contains the command index and command type bits. The command index is sent to a card as part of a command message. The command type bits control the command path state machine (CPSM)."] | 6887 | #[doc = "Control register 2"] |
| 6311 | #[repr(transparent)] | 6888 | #[repr(transparent)] |
| 6312 | #[derive(Copy, Clone, Eq, PartialEq)] | 6889 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 6313 | pub struct Cmdr(pub u32); | 6890 | pub struct Cr2Usart(pub u32); |
| 6314 | impl Cmdr { | 6891 | impl Cr2Usart { |
| 6315 | #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."] | 6892 | #[doc = "Address of the USART node"] |
| 6316 | pub const fn cmdindex(&self) -> u8 { | 6893 | pub const fn add(&self) -> u8 { |
| 6317 | let val = (self.0 >> 0usize) & 0x3f; | 6894 | let val = (self.0 >> 0usize) & 0x0f; |
| 6318 | val as u8 | 6895 | val as u8 |
| 6319 | } | 6896 | } |
| 6320 | #[doc = "Command index. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). The command index is sent to the card as part of a command message."] | 6897 | #[doc = "Address of the USART node"] |
| 6321 | pub fn set_cmdindex(&mut self, val: u8) { | 6898 | pub fn set_add(&mut self, val: u8) { |
| 6322 | self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); | 6899 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 6323 | } | 6900 | } |
| 6324 | #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."] | 6901 | #[doc = "lin break detection length"] |
| 6325 | pub const fn cmdtrans(&self) -> bool { | 6902 | pub const fn lbdl(&self) -> super::vals::Lbdl { |
| 6903 | let val = (self.0 >> 5usize) & 0x01; | ||
| 6904 | super::vals::Lbdl(val as u8) | ||
| 6905 | } | ||
| 6906 | #[doc = "lin break detection length"] | ||
| 6907 | pub fn set_lbdl(&mut self, val: super::vals::Lbdl) { | ||
| 6908 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | ||
| 6909 | } | ||
| 6910 | #[doc = "LIN break detection interrupt enable"] | ||
| 6911 | pub const fn lbdie(&self) -> bool { | ||
| 6326 | let val = (self.0 >> 6usize) & 0x01; | 6912 | let val = (self.0 >> 6usize) & 0x01; |
| 6327 | val != 0 | 6913 | val != 0 |
| 6328 | } | 6914 | } |
| 6329 | #[doc = "The CPSM treats the command as a data transfer command, stops the interrupt period, and signals DataEnable to the DPSM This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues an end of interrupt period and issues DataEnable signal to the DPSM when the command is sent."] | 6915 | #[doc = "LIN break detection interrupt enable"] |
| 6330 | pub fn set_cmdtrans(&mut self, val: bool) { | 6916 | pub fn set_lbdie(&mut self, val: bool) { |
| 6331 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 6917 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 6332 | } | 6918 | } |
| 6333 | #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."] | 6919 | #[doc = "Last bit clock pulse"] |
| 6334 | pub const fn cmdstop(&self) -> bool { | 6920 | pub const fn lbcl(&self) -> bool { |
| 6335 | let val = (self.0 >> 7usize) & 0x01; | 6921 | let val = (self.0 >> 8usize) & 0x01; |
| 6336 | val != 0 | 6922 | val != 0 |
| 6337 | } | 6923 | } |
| 6338 | #[doc = "The CPSM treats the command as a Stop Transmission command and signals Abort to the DPSM. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). If this bit is set, the CPSM issues the Abort signal to the DPSM when the command is sent."] | 6924 | #[doc = "Last bit clock pulse"] |
| 6339 | pub fn set_cmdstop(&mut self, val: bool) { | 6925 | pub fn set_lbcl(&mut self, val: bool) { |
| 6340 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 6926 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 6341 | } | 6927 | } |
| 6342 | #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."] | 6928 | #[doc = "Clock phase"] |
| 6343 | pub const fn waitresp(&self) -> u8 { | 6929 | pub const fn cpha(&self) -> super::vals::Cpha { |
| 6344 | let val = (self.0 >> 8usize) & 0x03; | 6930 | let val = (self.0 >> 9usize) & 0x01; |
| 6345 | val as u8 | 6931 | super::vals::Cpha(val as u8) |
| 6346 | } | 6932 | } |
| 6347 | #[doc = "Wait for response bits. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). They are used to configure whether the CPSM is to wait for a response, and if yes, which kind of response."] | 6933 | #[doc = "Clock phase"] |
| 6348 | pub fn set_waitresp(&mut self, val: u8) { | 6934 | pub fn set_cpha(&mut self, val: super::vals::Cpha) { |
| 6349 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); | 6935 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); |
| 6350 | } | 6936 | } |
| 6351 | #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."] | 6937 | #[doc = "Clock polarity"] |
| 6352 | pub const fn waitint(&self) -> bool { | 6938 | pub const fn cpol(&self) -> super::vals::Cpol { |
| 6353 | let val = (self.0 >> 10usize) & 0x01; | 6939 | let val = (self.0 >> 10usize) & 0x01; |
| 6354 | val != 0 | 6940 | super::vals::Cpol(val as u8) |
| 6355 | } | 6941 | } |
| 6356 | #[doc = "CPSM waits for interrupt request. If this bit is set, the CPSM disables command timeout and waits for an card interrupt request (Response). If this bit is cleared in the CPSM Wait state, will cause the abort of the interrupt mode."] | 6942 | #[doc = "Clock polarity"] |
| 6357 | pub fn set_waitint(&mut self, val: bool) { | 6943 | pub fn set_cpol(&mut self, val: super::vals::Cpol) { |
| 6358 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); | 6944 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); |
| 6359 | } | 6945 | } |
| 6360 | #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."] | 6946 | #[doc = "Clock enable"] |
| 6361 | pub const fn waitpend(&self) -> bool { | 6947 | pub const fn clken(&self) -> bool { |
| 6362 | let val = (self.0 >> 11usize) & 0x01; | 6948 | let val = (self.0 >> 11usize) & 0x01; |
| 6363 | val != 0 | 6949 | val != 0 |
| 6364 | } | 6950 | } |
| 6365 | #[doc = "CPSM Waits for end of data transfer (CmdPend internal signal) from DPSM. This bit when set, the CPSM waits for the end of data transfer trigger before it starts sending a command. WAITPEND is only taken into account when DTMODE = MMC stream data transfer, WIDBUS = 1-bit wide bus mode, DPSMACT = 1 and DTDIR = from host to card."] | 6951 | #[doc = "Clock enable"] |
| 6366 | pub fn set_waitpend(&mut self, val: bool) { | 6952 | pub fn set_clken(&mut self, val: bool) { |
| 6367 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); | 6953 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); |
| 6368 | } | 6954 | } |
| 6369 | #[doc = "Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0."] | 6955 | #[doc = "STOP bits"] |
| 6370 | pub const fn cpsmen(&self) -> bool { | 6956 | pub const fn stop(&self) -> super::vals::Stop { |
| 6371 | let val = (self.0 >> 12usize) & 0x01; | 6957 | let val = (self.0 >> 12usize) & 0x03; |
| 6372 | val != 0 | 6958 | super::vals::Stop(val as u8) |
| 6373 | } | ||
| 6374 | #[doc = "Command path state machine (CPSM) Enable bit This bit is written 1 by firmware, and cleared by hardware when the CPSM enters the Idle state. If this bit is set, the CPSM is enabled. When DTEN = 1, no command will be transfered nor boot procedure will be started. CPSMEN is cleared to 0."] | ||
| 6375 | pub fn set_cpsmen(&mut self, val: bool) { | ||
| 6376 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); | ||
| 6377 | } | ||
| 6378 | #[doc = "Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state."] | ||
| 6379 | pub const fn dthold(&self) -> bool { | ||
| 6380 | let val = (self.0 >> 13usize) & 0x01; | ||
| 6381 | val != 0 | ||
| 6382 | } | 6959 | } |
| 6383 | #[doc = "Hold new data block transmission and reception in the DPSM. If this bit is set, the DPSM will not move from the Wait_S state to the Send state or from the Wait_R state to the Receive state."] | 6960 | #[doc = "STOP bits"] |
| 6384 | pub fn set_dthold(&mut self, val: bool) { | 6961 | pub fn set_stop(&mut self, val: super::vals::Stop) { |
| 6385 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | 6962 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); |
| 6386 | } | 6963 | } |
| 6387 | #[doc = "Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)"] | 6964 | #[doc = "LIN mode enable"] |
| 6388 | pub const fn bootmode(&self) -> bool { | 6965 | pub const fn linen(&self) -> bool { |
| 6389 | let val = (self.0 >> 14usize) & 0x01; | 6966 | let val = (self.0 >> 14usize) & 0x01; |
| 6390 | val != 0 | 6967 | val != 0 |
| 6391 | } | 6968 | } |
| 6392 | #[doc = "Select the boot mode procedure to be used. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0)"] | 6969 | #[doc = "LIN mode enable"] |
| 6393 | pub fn set_bootmode(&mut self, val: bool) { | 6970 | pub fn set_linen(&mut self, val: bool) { |
| 6394 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); | 6971 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); |
| 6395 | } | 6972 | } |
| 6396 | #[doc = "Enable boot mode procedure."] | ||
| 6397 | pub const fn booten(&self) -> bool { | ||
| 6398 | let val = (self.0 >> 15usize) & 0x01; | ||
| 6399 | val != 0 | ||
| 6400 | } | ||
| 6401 | #[doc = "Enable boot mode procedure."] | ||
| 6402 | pub fn set_booten(&mut self, val: bool) { | ||
| 6403 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); | ||
| 6404 | } | ||
| 6405 | #[doc = "The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1."] | ||
| 6406 | pub const fn cmdsuspend(&self) -> bool { | ||
| 6407 | let val = (self.0 >> 16usize) & 0x01; | ||
| 6408 | val != 0 | ||
| 6409 | } | ||
| 6410 | #[doc = "The CPSM treats the command as a Suspend or Resume command and signals interrupt period start/end. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). CMDSUSPEND = 1 and CMDTRANS = 0 Suspend command, start interrupt period when response bit BS=0. CMDSUSPEND = 1 and CMDTRANS = 1 Resume command with data, end interrupt period when response bit DF=1."] | ||
| 6411 | pub fn set_cmdsuspend(&mut self, val: bool) { | ||
| 6412 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 6413 | } | ||
| 6414 | } | 6973 | } |
| 6415 | impl Default for Cmdr { | 6974 | impl Default for Cr2Usart { |
| 6416 | fn default() -> Cmdr { | 6975 | fn default() -> Cr2Usart { |
| 6417 | Cmdr(0) | 6976 | Cr2Usart(0) |
| 6418 | } | 6977 | } |
| 6419 | } | 6978 | } |
| 6420 | #[doc = "The SDMMC_IDMABSIZER register contains the buffers size when in double buffer configuration."] | 6979 | #[doc = "Control register 3"] |
| 6421 | #[repr(transparent)] | 6980 | #[repr(transparent)] |
| 6422 | #[derive(Copy, Clone, Eq, PartialEq)] | 6981 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 6423 | pub struct Idmabsizer(pub u32); | 6982 | pub struct Cr3Usart(pub u32); |
| 6424 | impl Idmabsizer { | 6983 | impl Cr3Usart { |
| 6425 | #[doc = "Number of transfers per buffer. This 8-bit value shall be multiplied by 8 to get the size of the buffer in 32-bit words and by 32 to get the size of the buffer in bytes. Example: IDMABNDT = 0x01: buffer size = 8 words = 32 bytes. These bits can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 6984 | #[doc = "Error interrupt enable"] |
| 6426 | pub const fn idmabndt(&self) -> u8 { | 6985 | pub const fn eie(&self) -> bool { |
| 6427 | let val = (self.0 >> 5usize) & 0xff; | 6986 | let val = (self.0 >> 0usize) & 0x01; |
| 6428 | val as u8 | 6987 | val != 0 |
| 6429 | } | ||
| 6430 | #[doc = "Number of transfers per buffer. This 8-bit value shall be multiplied by 8 to get the size of the buffer in 32-bit words and by 32 to get the size of the buffer in bytes. Example: IDMABNDT = 0x01: buffer size = 8 words = 32 bytes. These bits can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 6431 | pub fn set_idmabndt(&mut self, val: u8) { | ||
| 6432 | self.0 = (self.0 & !(0xff << 5usize)) | (((val as u32) & 0xff) << 5usize); | ||
| 6433 | } | 6988 | } |
| 6434 | } | 6989 | #[doc = "Error interrupt enable"] |
| 6435 | impl Default for Idmabsizer { | 6990 | pub fn set_eie(&mut self, val: bool) { |
| 6436 | fn default() -> Idmabsizer { | 6991 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 6437 | Idmabsizer(0) | ||
| 6438 | } | 6992 | } |
| 6439 | } | 6993 | #[doc = "IrDA mode enable"] |
| 6440 | #[doc = "SDMMC power control register"] | 6994 | pub const fn iren(&self) -> bool { |
| 6441 | #[repr(transparent)] | 6995 | let val = (self.0 >> 1usize) & 0x01; |
| 6442 | #[derive(Copy, Clone, Eq, PartialEq)] | 6996 | val != 0 |
| 6443 | pub struct Power(pub u32); | ||
| 6444 | impl Power { | ||
| 6445 | #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."] | ||
| 6446 | pub const fn pwrctrl(&self) -> u8 { | ||
| 6447 | let val = (self.0 >> 0usize) & 0x03; | ||
| 6448 | val as u8 | ||
| 6449 | } | 6997 | } |
| 6450 | #[doc = "SDMMC state control bits. These bits can only be written when the SDMMC is not in the power-on state (PWRCTRL?11). These bits are used to define the functional state of the SDMMC signals: Any further write will be ignored, PWRCTRL value will keep 11."] | 6998 | #[doc = "IrDA mode enable"] |
| 6451 | pub fn set_pwrctrl(&mut self, val: u8) { | 6999 | pub fn set_iren(&mut self, val: bool) { |
| 6452 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); | 7000 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 6453 | } | 7001 | } |
| 6454 | #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"] | 7002 | #[doc = "IrDA low-power"] |
| 6455 | pub const fn vswitch(&self) -> bool { | 7003 | pub const fn irlp(&self) -> super::vals::Irlp { |
| 6456 | let val = (self.0 >> 2usize) & 0x01; | 7004 | let val = (self.0 >> 2usize) & 0x01; |
| 6457 | val != 0 | 7005 | super::vals::Irlp(val as u8) |
| 6458 | } | 7006 | } |
| 6459 | #[doc = "Voltage switch sequence start. This bit is used to start the timing critical section of the voltage switch sequence:"] | 7007 | #[doc = "IrDA low-power"] |
| 6460 | pub fn set_vswitch(&mut self, val: bool) { | 7008 | pub fn set_irlp(&mut self, val: super::vals::Irlp) { |
| 6461 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 7009 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); |
| 6462 | } | 7010 | } |
| 6463 | #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"] | 7011 | #[doc = "Half-duplex selection"] |
| 6464 | pub const fn vswitchen(&self) -> bool { | 7012 | pub const fn hdsel(&self) -> super::vals::Hdsel { |
| 6465 | let val = (self.0 >> 3usize) & 0x01; | 7013 | let val = (self.0 >> 3usize) & 0x01; |
| 6466 | val != 0 | 7014 | super::vals::Hdsel(val as u8) |
| 6467 | } | 7015 | } |
| 6468 | #[doc = "Voltage switch procedure enable. This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). This bit is used to stop the SDMMC_CK after the voltage switch command response:"] | 7016 | #[doc = "Half-duplex selection"] |
| 6469 | pub fn set_vswitchen(&mut self, val: bool) { | 7017 | pub fn set_hdsel(&mut self, val: super::vals::Hdsel) { |
| 6470 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 7018 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val.0 as u32) & 0x01) << 3usize); |
| 6471 | } | 7019 | } |
| 6472 | #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."] | 7020 | #[doc = "Smartcard NACK enable"] |
| 6473 | pub const fn dirpol(&self) -> bool { | 7021 | pub const fn nack(&self) -> bool { |
| 6474 | let val = (self.0 >> 4usize) & 0x01; | 7022 | let val = (self.0 >> 4usize) & 0x01; |
| 6475 | val != 0 | 7023 | val != 0 |
| 6476 | } | 7024 | } |
| 6477 | #[doc = "Data and command direction signals polarity selection. This bit can only be written when the SDMMC is in the power-off state (PWRCTRL = 00)."] | 7025 | #[doc = "Smartcard NACK enable"] |
| 6478 | pub fn set_dirpol(&mut self, val: bool) { | 7026 | pub fn set_nack(&mut self, val: bool) { |
| 6479 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | 7027 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); |
| 6480 | } | 7028 | } |
| 6481 | } | 7029 | #[doc = "Smartcard mode enable"] |
| 6482 | impl Default for Power { | 7030 | pub const fn scen(&self) -> bool { |
| 6483 | fn default() -> Power { | 7031 | let val = (self.0 >> 5usize) & 0x01; |
| 6484 | Power(0) | ||
| 6485 | } | ||
| 6486 | } | ||
| 6487 | #[doc = "SDMMC IP identification register"] | ||
| 6488 | #[repr(transparent)] | ||
| 6489 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6490 | pub struct Id(pub u32); | ||
| 6491 | impl Id { | ||
| 6492 | #[doc = "SDMMC IP identification."] | ||
| 6493 | pub const fn ip_id(&self) -> u32 { | ||
| 6494 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 6495 | val as u32 | ||
| 6496 | } | ||
| 6497 | #[doc = "SDMMC IP identification."] | ||
| 6498 | pub fn set_ip_id(&mut self, val: u32) { | ||
| 6499 | self.0 = | ||
| 6500 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 6501 | } | ||
| 6502 | } | ||
| 6503 | impl Default for Id { | ||
| 6504 | fn default() -> Id { | ||
| 6505 | Id(0) | ||
| 6506 | } | ||
| 6507 | } | ||
| 6508 | #[doc = "The SDMMC_DTIMER register contains the data timeout period, in card bus clock periods. A counter loads the value from the SDMMC_DTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_R or Busy state. If the timer reaches 0 while the DPSM is in either of these states, the timeout status flag is set."] | ||
| 6509 | #[repr(transparent)] | ||
| 6510 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6511 | pub struct Dtimer(pub u32); | ||
| 6512 | impl Dtimer { | ||
| 6513 | #[doc = "Data and R1b busy timeout period This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). Data and R1b busy timeout period expressed in card bus clock periods."] | ||
| 6514 | pub const fn datatime(&self) -> u32 { | ||
| 6515 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 6516 | val as u32 | ||
| 6517 | } | ||
| 6518 | #[doc = "Data and R1b busy timeout period This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). Data and R1b busy timeout period expressed in card bus clock periods."] | ||
| 6519 | pub fn set_datatime(&mut self, val: u32) { | ||
| 6520 | self.0 = | ||
| 6521 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 6522 | } | ||
| 6523 | } | ||
| 6524 | impl Default for Dtimer { | ||
| 6525 | fn default() -> Dtimer { | ||
| 6526 | Dtimer(0) | ||
| 6527 | } | ||
| 6528 | } | ||
| 6529 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | ||
| 6530 | #[repr(transparent)] | ||
| 6531 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6532 | pub struct Resp1r(pub u32); | ||
| 6533 | impl Resp1r { | ||
| 6534 | #[doc = "see Table 432"] | ||
| 6535 | pub const fn cardstatus1(&self) -> u32 { | ||
| 6536 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 6537 | val as u32 | ||
| 6538 | } | ||
| 6539 | #[doc = "see Table 432"] | ||
| 6540 | pub fn set_cardstatus1(&mut self, val: u32) { | ||
| 6541 | self.0 = | ||
| 6542 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 6543 | } | ||
| 6544 | } | ||
| 6545 | impl Default for Resp1r { | ||
| 6546 | fn default() -> Resp1r { | ||
| 6547 | Resp1r(0) | ||
| 6548 | } | ||
| 6549 | } | ||
| 6550 | #[doc = "The SDMMC_DCTRL register control the data path state machine (DPSM)."] | ||
| 6551 | #[repr(transparent)] | ||
| 6552 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6553 | pub struct Dctrl(pub u32); | ||
| 6554 | impl Dctrl { | ||
| 6555 | #[doc = "Data transfer enable bit This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). This bit is cleared by Hardware when data transfer completes. This bit shall only be used to transfer data when no associated data transfer command is used, i.e. shall not be used with SD or eMMC cards."] | ||
| 6556 | pub const fn dten(&self) -> bool { | ||
| 6557 | let val = (self.0 >> 0usize) & 0x01; | ||
| 6558 | val != 0 | 7032 | val != 0 |
| 6559 | } | 7033 | } |
| 6560 | #[doc = "Data transfer enable bit This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). This bit is cleared by Hardware when data transfer completes. This bit shall only be used to transfer data when no associated data transfer command is used, i.e. shall not be used with SD or eMMC cards."] | 7034 | #[doc = "Smartcard mode enable"] |
| 6561 | pub fn set_dten(&mut self, val: bool) { | 7035 | pub fn set_scen(&mut self, val: bool) { |
| 6562 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 7036 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 6563 | } | 7037 | } |
| 6564 | #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7038 | #[doc = "DMA enable receiver"] |
| 6565 | pub const fn dtdir(&self) -> bool { | 7039 | pub const fn dmar(&self) -> bool { |
| 6566 | let val = (self.0 >> 1usize) & 0x01; | 7040 | let val = (self.0 >> 6usize) & 0x01; |
| 6567 | val != 0 | 7041 | val != 0 |
| 6568 | } | 7042 | } |
| 6569 | #[doc = "Data transfer direction selection This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7043 | #[doc = "DMA enable receiver"] |
| 6570 | pub fn set_dtdir(&mut self, val: bool) { | 7044 | pub fn set_dmar(&mut self, val: bool) { |
| 6571 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 7045 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 6572 | } | ||
| 6573 | #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 6574 | pub const fn dtmode(&self) -> u8 { | ||
| 6575 | let val = (self.0 >> 2usize) & 0x03; | ||
| 6576 | val as u8 | ||
| 6577 | } | ||
| 6578 | #[doc = "Data transfer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 6579 | pub fn set_dtmode(&mut self, val: u8) { | ||
| 6580 | self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize); | ||
| 6581 | } | 7046 | } |
| 6582 | #[doc = "Data block size This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). Define the data block length when the block data transfer mode is selected: When DATALENGTH is not a multiple of DBLOCKSIZE, the transfered data is truncated at a multiple of DBLOCKSIZE. (Any remain data will not be transfered.) When DDR = 1, DBLOCKSIZE = 0000 shall not be used. (No data will be transfered)"] | 7047 | #[doc = "DMA enable transmitter"] |
| 6583 | pub const fn dblocksize(&self) -> u8 { | 7048 | pub const fn dmat(&self) -> bool { |
| 6584 | let val = (self.0 >> 4usize) & 0x0f; | 7049 | let val = (self.0 >> 7usize) & 0x01; |
| 6585 | val as u8 | 7050 | val != 0 |
| 6586 | } | 7051 | } |
| 6587 | #[doc = "Data block size This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). Define the data block length when the block data transfer mode is selected: When DATALENGTH is not a multiple of DBLOCKSIZE, the transfered data is truncated at a multiple of DBLOCKSIZE. (Any remain data will not be transfered.) When DDR = 1, DBLOCKSIZE = 0000 shall not be used. (No data will be transfered)"] | 7052 | #[doc = "DMA enable transmitter"] |
| 6588 | pub fn set_dblocksize(&mut self, val: u8) { | 7053 | pub fn set_dmat(&mut self, val: bool) { |
| 6589 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); | 7054 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 6590 | } | 7055 | } |
| 6591 | #[doc = "Read wait start. If this bit is set, read wait operation starts."] | 7056 | #[doc = "RTS enable"] |
| 6592 | pub const fn rwstart(&self) -> bool { | 7057 | pub const fn rtse(&self) -> bool { |
| 6593 | let val = (self.0 >> 8usize) & 0x01; | 7058 | let val = (self.0 >> 8usize) & 0x01; |
| 6594 | val != 0 | 7059 | val != 0 |
| 6595 | } | 7060 | } |
| 6596 | #[doc = "Read wait start. If this bit is set, read wait operation starts."] | 7061 | #[doc = "RTS enable"] |
| 6597 | pub fn set_rwstart(&mut self, val: bool) { | 7062 | pub fn set_rtse(&mut self, val: bool) { |
| 6598 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 7063 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 6599 | } | 7064 | } |
| 6600 | #[doc = "Read wait stop This bit is written by firmware and auto cleared by hardware when the DPSM moves from the READ_WAIT state to the WAIT_R or IDLE state."] | 7065 | #[doc = "CTS enable"] |
| 6601 | pub const fn rwstop(&self) -> bool { | 7066 | pub const fn ctse(&self) -> bool { |
| 6602 | let val = (self.0 >> 9usize) & 0x01; | 7067 | let val = (self.0 >> 9usize) & 0x01; |
| 6603 | val != 0 | 7068 | val != 0 |
| 6604 | } | 7069 | } |
| 6605 | #[doc = "Read wait stop This bit is written by firmware and auto cleared by hardware when the DPSM moves from the READ_WAIT state to the WAIT_R or IDLE state."] | 7070 | #[doc = "CTS enable"] |
| 6606 | pub fn set_rwstop(&mut self, val: bool) { | 7071 | pub fn set_ctse(&mut self, val: bool) { |
| 6607 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | 7072 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); |
| 6608 | } | 7073 | } |
| 6609 | #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7074 | #[doc = "CTS interrupt enable"] |
| 6610 | pub const fn rwmod(&self) -> bool { | 7075 | pub const fn ctsie(&self) -> bool { |
| 6611 | let val = (self.0 >> 10usize) & 0x01; | 7076 | let val = (self.0 >> 10usize) & 0x01; |
| 6612 | val != 0 | 7077 | val != 0 |
| 6613 | } | 7078 | } |
| 6614 | #[doc = "Read wait mode. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7079 | #[doc = "CTS interrupt enable"] |
| 6615 | pub fn set_rwmod(&mut self, val: bool) { | 7080 | pub fn set_ctsie(&mut self, val: bool) { |
| 6616 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); | 7081 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); |
| 6617 | } | 7082 | } |
| 6618 | #[doc = "SD I/O interrupt enable functions This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). If this bit is set, the DPSM enables the SD I/O card specific interrupt operation."] | 7083 | } |
| 6619 | pub const fn sdioen(&self) -> bool { | 7084 | impl Default for Cr3Usart { |
| 6620 | let val = (self.0 >> 11usize) & 0x01; | 7085 | fn default() -> Cr3Usart { |
| 6621 | val != 0 | 7086 | Cr3Usart(0) |
| 6622 | } | ||
| 6623 | #[doc = "SD I/O interrupt enable functions This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). If this bit is set, the DPSM enables the SD I/O card specific interrupt operation."] | ||
| 6624 | pub fn set_sdioen(&mut self, val: bool) { | ||
| 6625 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); | ||
| 6626 | } | ||
| 6627 | #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 6628 | pub const fn bootacken(&self) -> bool { | ||
| 6629 | let val = (self.0 >> 12usize) & 0x01; | ||
| 6630 | val != 0 | ||
| 6631 | } | ||
| 6632 | #[doc = "Enable the reception of the boot acknowledgment. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | ||
| 6633 | pub fn set_bootacken(&mut self, val: bool) { | ||
| 6634 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); | ||
| 6635 | } | 7087 | } |
| 6636 | #[doc = "FIFO reset, will flush any remaining data. This bit can only be written by firmware when IDMAEN= 0 and DPSM is active (DPSMACT = 1). This bit will only take effect when a transfer error or transfer hold occurs."] | 7088 | } |
| 6637 | pub const fn fiforst(&self) -> bool { | 7089 | #[doc = "Data register"] |
| 6638 | let val = (self.0 >> 13usize) & 0x01; | 7090 | #[repr(transparent)] |
| 6639 | val != 0 | 7091 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 7092 | pub struct Dr(pub u32); | ||
| 7093 | impl Dr { | ||
| 7094 | #[doc = "Data value"] | ||
| 7095 | pub const fn dr(&self) -> u16 { | ||
| 7096 | let val = (self.0 >> 0usize) & 0x01ff; | ||
| 7097 | val as u16 | ||
| 6640 | } | 7098 | } |
| 6641 | #[doc = "FIFO reset, will flush any remaining data. This bit can only be written by firmware when IDMAEN= 0 and DPSM is active (DPSMACT = 1). This bit will only take effect when a transfer error or transfer hold occurs."] | 7099 | #[doc = "Data value"] |
| 6642 | pub fn set_fiforst(&mut self, val: bool) { | 7100 | pub fn set_dr(&mut self, val: u16) { |
| 6643 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | 7101 | self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); |
| 6644 | } | 7102 | } |
| 6645 | } | 7103 | } |
| 6646 | impl Default for Dctrl { | 7104 | impl Default for Dr { |
| 6647 | fn default() -> Dctrl { | 7105 | fn default() -> Dr { |
| 6648 | Dctrl(0) | 7106 | Dr(0) |
| 6649 | } | 7107 | } |
| 6650 | } | 7108 | } |
| 6651 | #[doc = "SDMMC IP version register"] | 7109 | #[doc = "Control register 2"] |
| 6652 | #[repr(transparent)] | 7110 | #[repr(transparent)] |
| 6653 | #[derive(Copy, Clone, Eq, PartialEq)] | 7111 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 6654 | pub struct Ver(pub u32); | 7112 | pub struct Cr2(pub u32); |
| 6655 | impl Ver { | 7113 | impl Cr2 { |
| 6656 | #[doc = "IP minor revision number."] | 7114 | #[doc = "Address of the USART node"] |
| 6657 | pub const fn minrev(&self) -> u8 { | 7115 | pub const fn add(&self) -> u8 { |
| 6658 | let val = (self.0 >> 0usize) & 0x0f; | 7116 | let val = (self.0 >> 0usize) & 0x0f; |
| 6659 | val as u8 | 7117 | val as u8 |
| 6660 | } | 7118 | } |
| 6661 | #[doc = "IP minor revision number."] | 7119 | #[doc = "Address of the USART node"] |
| 6662 | pub fn set_minrev(&mut self, val: u8) { | 7120 | pub fn set_add(&mut self, val: u8) { |
| 6663 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); | 7121 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 6664 | } | 7122 | } |
| 6665 | #[doc = "IP major revision number."] | 7123 | #[doc = "lin break detection length"] |
| 6666 | pub const fn majrev(&self) -> u8 { | 7124 | pub const fn lbdl(&self) -> super::vals::Lbdl { |
| 6667 | let val = (self.0 >> 4usize) & 0x0f; | 7125 | let val = (self.0 >> 5usize) & 0x01; |
| 6668 | val as u8 | 7126 | super::vals::Lbdl(val as u8) |
| 6669 | } | ||
| 6670 | #[doc = "IP major revision number."] | ||
| 6671 | pub fn set_majrev(&mut self, val: u8) { | ||
| 6672 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); | ||
| 6673 | } | ||
| 6674 | } | ||
| 6675 | impl Default for Ver { | ||
| 6676 | fn default() -> Ver { | ||
| 6677 | Ver(0) | ||
| 6678 | } | ||
| 6679 | } | ||
| 6680 | #[doc = "The SDMMC_DCNTR register loads the value from the data length register (see SDMMC_DLENR) when the DPSM moves from the Idle state to the Wait_R or Wait_S state. As data is transferred, the counter decrements the value until it reaches 0. The DPSM then moves to the Idle state and when there has been no error, the data status end flag (DATAEND) is set."] | ||
| 6681 | #[repr(transparent)] | ||
| 6682 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6683 | pub struct Dcntr(pub u32); | ||
| 6684 | impl Dcntr { | ||
| 6685 | #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."] | ||
| 6686 | pub const fn datacount(&self) -> u32 { | ||
| 6687 | let val = (self.0 >> 0usize) & 0x01ff_ffff; | ||
| 6688 | val as u32 | ||
| 6689 | } | 7127 | } |
| 6690 | #[doc = "Data count value When read, the number of remaining data bytes to be transferred is returned. Write has no effect."] | 7128 | #[doc = "lin break detection length"] |
| 6691 | pub fn set_datacount(&mut self, val: u32) { | 7129 | pub fn set_lbdl(&mut self, val: super::vals::Lbdl) { |
| 6692 | self.0 = | 7130 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); |
| 6693 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); | ||
| 6694 | } | 7131 | } |
| 6695 | } | 7132 | #[doc = "LIN break detection interrupt enable"] |
| 6696 | impl Default for Dcntr { | 7133 | pub const fn lbdie(&self) -> bool { |
| 6697 | fn default() -> Dcntr { | 7134 | let val = (self.0 >> 6usize) & 0x01; |
| 6698 | Dcntr(0) | 7135 | val != 0 |
| 6699 | } | 7136 | } |
| 6700 | } | 7137 | #[doc = "LIN break detection interrupt enable"] |
| 6701 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | 7138 | pub fn set_lbdie(&mut self, val: bool) { |
| 6702 | #[repr(transparent)] | 7139 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 6703 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6704 | pub struct Resp3r(pub u32); | ||
| 6705 | impl Resp3r { | ||
| 6706 | #[doc = "see Table404."] | ||
| 6707 | pub const fn cardstatus3(&self) -> u32 { | ||
| 6708 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 6709 | val as u32 | ||
| 6710 | } | 7140 | } |
| 6711 | #[doc = "see Table404."] | 7141 | #[doc = "STOP bits"] |
| 6712 | pub fn set_cardstatus3(&mut self, val: u32) { | 7142 | pub const fn stop(&self) -> super::vals::Stop { |
| 6713 | self.0 = | 7143 | let val = (self.0 >> 12usize) & 0x03; |
| 6714 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | 7144 | super::vals::Stop(val as u8) |
| 6715 | } | 7145 | } |
| 6716 | } | 7146 | #[doc = "STOP bits"] |
| 6717 | impl Default for Resp3r { | 7147 | pub fn set_stop(&mut self, val: super::vals::Stop) { |
| 6718 | fn default() -> Resp3r { | 7148 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); |
| 6719 | Resp3r(0) | ||
| 6720 | } | 7149 | } |
| 6721 | } | 7150 | #[doc = "LIN mode enable"] |
| 6722 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | 7151 | pub const fn linen(&self) -> bool { |
| 6723 | #[repr(transparent)] | 7152 | let val = (self.0 >> 14usize) & 0x01; |
| 6724 | #[derive(Copy, Clone, Eq, PartialEq)] | 7153 | val != 0 |
| 6725 | pub struct Resp2r(pub u32); | ||
| 6726 | impl Resp2r { | ||
| 6727 | #[doc = "see Table404."] | ||
| 6728 | pub const fn cardstatus2(&self) -> u32 { | ||
| 6729 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 6730 | val as u32 | ||
| 6731 | } | 7154 | } |
| 6732 | #[doc = "see Table404."] | 7155 | #[doc = "LIN mode enable"] |
| 6733 | pub fn set_cardstatus2(&mut self, val: u32) { | 7156 | pub fn set_linen(&mut self, val: bool) { |
| 6734 | self.0 = | 7157 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); |
| 6735 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 6736 | } | 7158 | } |
| 6737 | } | 7159 | } |
| 6738 | impl Default for Resp2r { | 7160 | impl Default for Cr2 { |
| 6739 | fn default() -> Resp2r { | 7161 | fn default() -> Cr2 { |
| 6740 | Resp2r(0) | 7162 | Cr2(0) |
| 6741 | } | 7163 | } |
| 6742 | } | 7164 | } |
| 6743 | #[doc = "The SDMMC_ACKTIMER register contains the acknowledgment timeout period, in SDMMC_CK bus clock periods. A counter loads the value from the SDMMC_ACKTIMER register, and starts decrementing when the data path state machine (DPSM) enters the Wait_Ack state. If the timer reaches 0 while the DPSM is in this states, the acknowledgment timeout status flag is set."] | 7165 | #[doc = "Baud rate register"] |
| 6744 | #[repr(transparent)] | 7166 | #[repr(transparent)] |
| 6745 | #[derive(Copy, Clone, Eq, PartialEq)] | 7167 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 6746 | pub struct Acktimer(pub u32); | 7168 | pub struct Brr(pub u32); |
| 6747 | impl Acktimer { | 7169 | impl Brr { |
| 6748 | #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."] | 7170 | #[doc = "fraction of USARTDIV"] |
| 6749 | pub const fn acktime(&self) -> u32 { | 7171 | pub const fn div_fraction(&self) -> u8 { |
| 6750 | let val = (self.0 >> 0usize) & 0x01ff_ffff; | 7172 | let val = (self.0 >> 0usize) & 0x0f; |
| 6751 | val as u32 | 7173 | val as u8 |
| 6752 | } | ||
| 6753 | #[doc = "Boot acknowledgment timeout period This bit can only be written by firmware when CPSM is disabled (CPSMEN = 0). Boot acknowledgment timeout period expressed in card bus clock periods."] | ||
| 6754 | pub fn set_acktime(&mut self, val: u32) { | ||
| 6755 | self.0 = | ||
| 6756 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); | ||
| 6757 | } | 7174 | } |
| 6758 | } | 7175 | #[doc = "fraction of USARTDIV"] |
| 6759 | impl Default for Acktimer { | 7176 | pub fn set_div_fraction(&mut self, val: u8) { |
| 6760 | fn default() -> Acktimer { | 7177 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 6761 | Acktimer(0) | ||
| 6762 | } | 7178 | } |
| 6763 | } | 7179 | #[doc = "mantissa of USARTDIV"] |
| 6764 | #[doc = "The SDMMC_DLENR register contains the number of data bytes to be transferred. The value is loaded into the data counter when data transfer starts."] | 7180 | pub const fn div_mantissa(&self) -> u16 { |
| 6765 | #[repr(transparent)] | 7181 | let val = (self.0 >> 4usize) & 0x0fff; |
| 6766 | #[derive(Copy, Clone, Eq, PartialEq)] | 7182 | val as u16 |
| 6767 | pub struct Dlenr(pub u32); | ||
| 6768 | impl Dlenr { | ||
| 6769 | #[doc = "Data length value This register can only be written by firmware when DPSM is inactive (DPSMACT = 0). Number of data bytes to be transferred. When DDR = 1 DATALENGTH is truncated to a multiple of 2. (The last odd byte is not transfered) When DATALENGTH = 0 no data will be transfered, when requested by a CPSMEN and CMDTRANS = 1 also no command will be transfered. DTEN and CPSMEN are cleared to 0."] | ||
| 6770 | pub const fn datalength(&self) -> u32 { | ||
| 6771 | let val = (self.0 >> 0usize) & 0x01ff_ffff; | ||
| 6772 | val as u32 | ||
| 6773 | } | 7183 | } |
| 6774 | #[doc = "Data length value This register can only be written by firmware when DPSM is inactive (DPSMACT = 0). Number of data bytes to be transferred. When DDR = 1 DATALENGTH is truncated to a multiple of 2. (The last odd byte is not transfered) When DATALENGTH = 0 no data will be transfered, when requested by a CPSMEN and CMDTRANS = 1 also no command will be transfered. DTEN and CPSMEN are cleared to 0."] | 7184 | #[doc = "mantissa of USARTDIV"] |
| 6775 | pub fn set_datalength(&mut self, val: u32) { | 7185 | pub fn set_div_mantissa(&mut self, val: u16) { |
| 6776 | self.0 = | 7186 | self.0 = (self.0 & !(0x0fff << 4usize)) | (((val as u32) & 0x0fff) << 4usize); |
| 6777 | (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); | ||
| 6778 | } | 7187 | } |
| 6779 | } | 7188 | } |
| 6780 | impl Default for Dlenr { | 7189 | impl Default for Brr { |
| 6781 | fn default() -> Dlenr { | 7190 | fn default() -> Brr { |
| 6782 | Dlenr(0) | 7191 | Brr(0) |
| 6783 | } | 7192 | } |
| 6784 | } | 7193 | } |
| 6785 | #[doc = "The receive and transmit FIFOs can be read or written as 32-bit wide registers. The FIFOs contain 32 entries on 32 sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO."] | 7194 | #[doc = "Control register 1"] |
| 6786 | #[repr(transparent)] | 7195 | #[repr(transparent)] |
| 6787 | #[derive(Copy, Clone, Eq, PartialEq)] | 7196 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 6788 | pub struct Idmactrlr(pub u32); | 7197 | pub struct Cr1(pub u32); |
| 6789 | impl Idmactrlr { | 7198 | impl Cr1 { |
| 6790 | #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7199 | #[doc = "Send break"] |
| 6791 | pub const fn idmaen(&self) -> bool { | 7200 | pub const fn sbk(&self) -> super::vals::Sbk { |
| 6792 | let val = (self.0 >> 0usize) & 0x01; | 7201 | let val = (self.0 >> 0usize) & 0x01; |
| 6793 | val != 0 | 7202 | super::vals::Sbk(val as u8) |
| 6794 | } | 7203 | } |
| 6795 | #[doc = "IDMA enable This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7204 | #[doc = "Send break"] |
| 6796 | pub fn set_idmaen(&mut self, val: bool) { | 7205 | pub fn set_sbk(&mut self, val: super::vals::Sbk) { |
| 6797 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 7206 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize); |
| 6798 | } | 7207 | } |
| 6799 | #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7208 | #[doc = "Receiver wakeup"] |
| 6800 | pub const fn idmabmode(&self) -> bool { | 7209 | pub const fn rwu(&self) -> super::vals::Rwu { |
| 6801 | let val = (self.0 >> 1usize) & 0x01; | 7210 | let val = (self.0 >> 1usize) & 0x01; |
| 6802 | val != 0 | 7211 | super::vals::Rwu(val as u8) |
| 6803 | } | 7212 | } |
| 6804 | #[doc = "Buffer mode selection. This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0)."] | 7213 | #[doc = "Receiver wakeup"] |
| 6805 | pub fn set_idmabmode(&mut self, val: bool) { | 7214 | pub fn set_rwu(&mut self, val: super::vals::Rwu) { |
| 6806 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 7215 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize); |
| 6807 | } | 7216 | } |
| 6808 | #[doc = "Double buffer mode active buffer indication This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). When IDMA is enabled this bit is toggled by hardware."] | 7217 | #[doc = "Receiver enable"] |
| 6809 | pub const fn idmabact(&self) -> bool { | 7218 | pub const fn re(&self) -> bool { |
| 6810 | let val = (self.0 >> 2usize) & 0x01; | 7219 | let val = (self.0 >> 2usize) & 0x01; |
| 6811 | val != 0 | 7220 | val != 0 |
| 6812 | } | 7221 | } |
| 6813 | #[doc = "Double buffer mode active buffer indication This bit can only be written by firmware when DPSM is inactive (DPSMACT = 0). When IDMA is enabled this bit is toggled by hardware."] | 7222 | #[doc = "Receiver enable"] |
| 6814 | pub fn set_idmabact(&mut self, val: bool) { | 7223 | pub fn set_re(&mut self, val: bool) { |
| 6815 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 7224 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 6816 | } | 7225 | } |
| 6817 | } | 7226 | #[doc = "Transmitter enable"] |
| 6818 | impl Default for Idmactrlr { | 7227 | pub const fn te(&self) -> bool { |
| 6819 | fn default() -> Idmactrlr { | 7228 | let val = (self.0 >> 3usize) & 0x01; |
| 6820 | Idmactrlr(0) | ||
| 6821 | } | ||
| 6822 | } | ||
| 6823 | #[doc = "The SDMMC_ARGR register contains a 32-bit command argument, which is sent to a card as part of a command message."] | ||
| 6824 | #[repr(transparent)] | ||
| 6825 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6826 | pub struct Argr(pub u32); | ||
| 6827 | impl Argr { | ||
| 6828 | #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."] | ||
| 6829 | pub const fn cmdarg(&self) -> u32 { | ||
| 6830 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 6831 | val as u32 | ||
| 6832 | } | ||
| 6833 | #[doc = "Command argument. These bits can only be written by firmware when CPSM is disabled (CPSMEN = 0). Command argument sent to a card as part of a command message. If a command contains an argument, it must be loaded into this register before writing a command to the command register."] | ||
| 6834 | pub fn set_cmdarg(&mut self, val: u32) { | ||
| 6835 | self.0 = | ||
| 6836 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 6837 | } | ||
| 6838 | } | ||
| 6839 | impl Default for Argr { | ||
| 6840 | fn default() -> Argr { | ||
| 6841 | Argr(0) | ||
| 6842 | } | ||
| 6843 | } | ||
| 6844 | #[doc = "The SDMMC_RESP1/2/3/4R registers contain the status of a card, which is part of the received response."] | ||
| 6845 | #[repr(transparent)] | ||
| 6846 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6847 | pub struct Resp4r(pub u32); | ||
| 6848 | impl Resp4r { | ||
| 6849 | #[doc = "see Table404."] | ||
| 6850 | pub const fn cardstatus4(&self) -> u32 { | ||
| 6851 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 6852 | val as u32 | ||
| 6853 | } | ||
| 6854 | #[doc = "see Table404."] | ||
| 6855 | pub fn set_cardstatus4(&mut self, val: u32) { | ||
| 6856 | self.0 = | ||
| 6857 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 6858 | } | ||
| 6859 | } | ||
| 6860 | impl Default for Resp4r { | ||
| 6861 | fn default() -> Resp4r { | ||
| 6862 | Resp4r(0) | ||
| 6863 | } | ||
| 6864 | } | ||
| 6865 | #[doc = "The SDMMC_IDMABASE1R register contains the double buffer configuration second buffer memory base address."] | ||
| 6866 | #[repr(transparent)] | ||
| 6867 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6868 | pub struct Idmabase1r(pub u32); | ||
| 6869 | impl Idmabase1r { | ||
| 6870 | #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0] | ||
| 6871 | are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 1 is inactive (IDMABACT = 0)."] | ||
| 6872 | pub const fn idmabase1(&self) -> u32 { | ||
| 6873 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 6874 | val as u32 | ||
| 6875 | } | ||
| 6876 | #[doc = "Buffer 1 memory base address, shall be word aligned (bit [1:0] | ||
| 6877 | are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 1 is inactive (IDMABACT = 0)."] | ||
| 6878 | pub fn set_idmabase1(&mut self, val: u32) { | ||
| 6879 | self.0 = | ||
| 6880 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 6881 | } | ||
| 6882 | } | ||
| 6883 | impl Default for Idmabase1r { | ||
| 6884 | fn default() -> Idmabase1r { | ||
| 6885 | Idmabase1r(0) | ||
| 6886 | } | ||
| 6887 | } | ||
| 6888 | #[doc = "The receive and transmit FIFOs can be only read or written as word (32-bit) wide registers. The FIFOs contain 16 entries on sequential addresses. This allows the CPU to use its load and store multiple operands to read from/write to the FIFO.When accessing SDMMC_FIFOR with half word or byte access an AHB bus fault is generated."] | ||
| 6889 | #[repr(transparent)] | ||
| 6890 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6891 | pub struct Fifor(pub u32); | ||
| 6892 | impl Fifor { | ||
| 6893 | #[doc = "Receive and transmit FIFO data This register can only be read or written by firmware when the DPSM is active (DPSMACT=1). The FIFO data occupies 16 entries of 32-bit words."] | ||
| 6894 | pub const fn fifodata(&self) -> u32 { | ||
| 6895 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 6896 | val as u32 | ||
| 6897 | } | ||
| 6898 | #[doc = "Receive and transmit FIFO data This register can only be read or written by firmware when the DPSM is active (DPSMACT=1). The FIFO data occupies 16 entries of 32-bit words."] | ||
| 6899 | pub fn set_fifodata(&mut self, val: u32) { | ||
| 6900 | self.0 = | ||
| 6901 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 6902 | } | ||
| 6903 | } | ||
| 6904 | impl Default for Fifor { | ||
| 6905 | fn default() -> Fifor { | ||
| 6906 | Fifor(0) | ||
| 6907 | } | ||
| 6908 | } | ||
| 6909 | #[doc = "The SDMMC_IDMABASE0R register contains the memory buffer base address in single buffer configuration and the buffer 0 base address in double buffer configuration."] | ||
| 6910 | #[repr(transparent)] | ||
| 6911 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6912 | pub struct Idmabase0r(pub u32); | ||
| 6913 | impl Idmabase0r { | ||
| 6914 | #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0] | ||
| 6915 | are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 0 is inactive (IDMABACT = 1)."] | ||
| 6916 | pub const fn idmabase0(&self) -> u32 { | ||
| 6917 | let val = (self.0 >> 0usize) & 0xffff_ffff; | ||
| 6918 | val as u32 | ||
| 6919 | } | ||
| 6920 | #[doc = "Buffer 0 memory base address bits [31:2], shall be word aligned (bit [1:0] | ||
| 6921 | are always 0 and read only). This register can be written by firmware when DPSM is inactive (DPSMACT = 0), and can dynamically be written by firmware when DPSM active (DPSMACT = 1) and memory buffer 0 is inactive (IDMABACT = 1)."] | ||
| 6922 | pub fn set_idmabase0(&mut self, val: u32) { | ||
| 6923 | self.0 = | ||
| 6924 | (self.0 & !(0xffff_ffff << 0usize)) | (((val as u32) & 0xffff_ffff) << 0usize); | ||
| 6925 | } | ||
| 6926 | } | ||
| 6927 | impl Default for Idmabase0r { | ||
| 6928 | fn default() -> Idmabase0r { | ||
| 6929 | Idmabase0r(0) | ||
| 6930 | } | ||
| 6931 | } | ||
| 6932 | #[doc = "The SDMMC_CLKCR register controls the SDMMC_CK output clock, the SDMMC_RX_CLK receive clock, and the bus width."] | ||
| 6933 | #[repr(transparent)] | ||
| 6934 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 6935 | pub struct Clkcr(pub u32); | ||
| 6936 | impl Clkcr { | ||
| 6937 | #[doc = "Clock divide factor This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). This field defines the divide factor between the input clock (SDMMCCLK) and the output clock (SDMMC_CK): SDMMC_CK frequency = SDMMCCLK / [2 * CLKDIV]. 0xx: etc.. xxx: etc.."] | ||
| 6938 | pub const fn clkdiv(&self) -> u16 { | ||
| 6939 | let val = (self.0 >> 0usize) & 0x03ff; | ||
| 6940 | val as u16 | ||
| 6941 | } | ||
| 6942 | #[doc = "Clock divide factor This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). This field defines the divide factor between the input clock (SDMMCCLK) and the output clock (SDMMC_CK): SDMMC_CK frequency = SDMMCCLK / [2 * CLKDIV]. 0xx: etc.. xxx: etc.."] | ||
| 6943 | pub fn set_clkdiv(&mut self, val: u16) { | ||
| 6944 | self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize); | ||
| 6945 | } | ||
| 6946 | #[doc = "Power saving configuration bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) For power saving, the SDMMC_CK clock output can be disabled when the bus is idle by setting PWRSAV:"] | ||
| 6947 | pub const fn pwrsav(&self) -> bool { | ||
| 6948 | let val = (self.0 >> 12usize) & 0x01; | ||
| 6949 | val != 0 | ||
| 6950 | } | ||
| 6951 | #[doc = "Power saving configuration bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) For power saving, the SDMMC_CK clock output can be disabled when the bus is idle by setting PWRSAV:"] | ||
| 6952 | pub fn set_pwrsav(&mut self, val: bool) { | ||
| 6953 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); | ||
| 6954 | } | ||
| 6955 | #[doc = "Wide bus mode enable bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] | ||
| 6956 | pub const fn widbus(&self) -> u8 { | ||
| 6957 | let val = (self.0 >> 14usize) & 0x03; | ||
| 6958 | val as u8 | ||
| 6959 | } | ||
| 6960 | #[doc = "Wide bus mode enable bit This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] | ||
| 6961 | pub fn set_widbus(&mut self, val: u8) { | ||
| 6962 | self.0 = (self.0 & !(0x03 << 14usize)) | (((val as u32) & 0x03) << 14usize); | ||
| 6963 | } | ||
| 6964 | #[doc = "SDMMC_CK dephasing selection bit for data and Command. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). When clock division = 1 (CLKDIV = 0), this bit has no effect. Data and Command change on SDMMC_CK falling edge. When clock division >1 (CLKDIV > 0) & DDR = 0: - SDMMC_CK edge occurs on SDMMCCLK rising edge. When clock division >1 (CLKDIV > 0) & DDR = 1: - Data changed on the SDMMCCLK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge. - Data changed on the SDMMC_CK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge."] | ||
| 6965 | pub const fn negedge(&self) -> bool { | ||
| 6966 | let val = (self.0 >> 16usize) & 0x01; | ||
| 6967 | val != 0 | 7229 | val != 0 |
| 6968 | } | 7230 | } |
| 6969 | #[doc = "SDMMC_CK dephasing selection bit for data and Command. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0). When clock division = 1 (CLKDIV = 0), this bit has no effect. Data and Command change on SDMMC_CK falling edge. When clock division >1 (CLKDIV > 0) & DDR = 0: - SDMMC_CK edge occurs on SDMMCCLK rising edge. When clock division >1 (CLKDIV > 0) & DDR = 1: - Data changed on the SDMMCCLK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge. - Data changed on the SDMMC_CK falling edge succeeding a SDMMC_CK edge. - SDMMC_CK edge occurs on SDMMCCLK rising edge."] | 7231 | #[doc = "Transmitter enable"] |
| 6970 | pub fn set_negedge(&mut self, val: bool) { | 7232 | pub fn set_te(&mut self, val: bool) { |
| 6971 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 7233 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 6972 | } | 7234 | } |
| 6973 | #[doc = "Hardware flow control enable This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) When Hardware flow control is enabled, the meaning of the TXFIFOE and RXFIFOF flags change, please see SDMMC status register definition in Section56.8.11."] | 7235 | #[doc = "IDLE interrupt enable"] |
| 6974 | pub const fn hwfc_en(&self) -> bool { | 7236 | pub const fn idleie(&self) -> bool { |
| 6975 | let val = (self.0 >> 17usize) & 0x01; | 7237 | let val = (self.0 >> 4usize) & 0x01; |
| 6976 | val != 0 | 7238 | val != 0 |
| 6977 | } | 7239 | } |
| 6978 | #[doc = "Hardware flow control enable This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) When Hardware flow control is enabled, the meaning of the TXFIFOE and RXFIFOF flags change, please see SDMMC status register definition in Section56.8.11."] | 7240 | #[doc = "IDLE interrupt enable"] |
| 6979 | pub fn set_hwfc_en(&mut self, val: bool) { | 7241 | pub fn set_idleie(&mut self, val: bool) { |
| 6980 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | 7242 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); |
| 6981 | } | 7243 | } |
| 6982 | #[doc = "Data rate signaling selection This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) DDR rate shall only be selected with 4-bit or 8-bit wide bus mode. (WIDBUS > 00). DDR = 1 has no effect when WIDBUS = 00 (1-bit wide bus). DDR rate shall only be selected with clock division >1. (CLKDIV > 0)"] | 7244 | #[doc = "RXNE interrupt enable"] |
| 6983 | pub const fn ddr(&self) -> bool { | 7245 | pub const fn rxneie(&self) -> bool { |
| 6984 | let val = (self.0 >> 18usize) & 0x01; | 7246 | let val = (self.0 >> 5usize) & 0x01; |
| 6985 | val != 0 | 7247 | val != 0 |
| 6986 | } | 7248 | } |
| 6987 | #[doc = "Data rate signaling selection This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0) DDR rate shall only be selected with 4-bit or 8-bit wide bus mode. (WIDBUS > 00). DDR = 1 has no effect when WIDBUS = 00 (1-bit wide bus). DDR rate shall only be selected with clock division >1. (CLKDIV > 0)"] | 7249 | #[doc = "RXNE interrupt enable"] |
| 6988 | pub fn set_ddr(&mut self, val: bool) { | 7250 | pub fn set_rxneie(&mut self, val: bool) { |
| 6989 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); | 7251 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); |
| 6990 | } | 7252 | } |
| 6991 | #[doc = "Bus speed mode selection between DS, HS, SDR12, SDR25 and SDR50, DDR50, SDR104. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] | 7253 | #[doc = "Transmission complete interrupt enable"] |
| 6992 | pub const fn busspeed(&self) -> bool { | 7254 | pub const fn tcie(&self) -> bool { |
| 6993 | let val = (self.0 >> 19usize) & 0x01; | 7255 | let val = (self.0 >> 6usize) & 0x01; |
| 6994 | val != 0 | 7256 | val != 0 |
| 6995 | } | 7257 | } |
| 6996 | #[doc = "Bus speed mode selection between DS, HS, SDR12, SDR25 and SDR50, DDR50, SDR104. This bit can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] | 7258 | #[doc = "Transmission complete interrupt enable"] |
| 6997 | pub fn set_busspeed(&mut self, val: bool) { | 7259 | pub fn set_tcie(&mut self, val: bool) { |
| 6998 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); | 7260 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); |
| 6999 | } | ||
| 7000 | #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] | ||
| 7001 | pub const fn selclkrx(&self) -> u8 { | ||
| 7002 | let val = (self.0 >> 20usize) & 0x03; | ||
| 7003 | val as u8 | ||
| 7004 | } | ||
| 7005 | #[doc = "Receive clock selection. These bits can only be written when the CPSM and DPSM are not active (CPSMACT = 0 and DPSMACT = 0)"] | ||
| 7006 | pub fn set_selclkrx(&mut self, val: u8) { | ||
| 7007 | self.0 = (self.0 & !(0x03 << 20usize)) | (((val as u32) & 0x03) << 20usize); | ||
| 7008 | } | ||
| 7009 | } | ||
| 7010 | impl Default for Clkcr { | ||
| 7011 | fn default() -> Clkcr { | ||
| 7012 | Clkcr(0) | ||
| 7013 | } | ||
| 7014 | } | ||
| 7015 | } | ||
| 7016 | } | ||
| 7017 | pub mod gpio_v2 { | ||
| 7018 | use crate::generic::*; | ||
| 7019 | #[doc = "General-purpose I/Os"] | ||
| 7020 | #[derive(Copy, Clone)] | ||
| 7021 | pub struct Gpio(pub *mut u8); | ||
| 7022 | unsafe impl Send for Gpio {} | ||
| 7023 | unsafe impl Sync for Gpio {} | ||
| 7024 | impl Gpio { | ||
| 7025 | #[doc = "GPIO port mode register"] | ||
| 7026 | pub fn moder(self) -> Reg<regs::Moder, RW> { | ||
| 7027 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 7028 | } | ||
| 7029 | #[doc = "GPIO port output type register"] | ||
| 7030 | pub fn otyper(self) -> Reg<regs::Otyper, RW> { | ||
| 7031 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 7032 | } | ||
| 7033 | #[doc = "GPIO port output speed register"] | ||
| 7034 | pub fn ospeedr(self) -> Reg<regs::Ospeedr, RW> { | ||
| 7035 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | ||
| 7036 | } | ||
| 7037 | #[doc = "GPIO port pull-up/pull-down register"] | ||
| 7038 | pub fn pupdr(self) -> Reg<regs::Pupdr, RW> { | ||
| 7039 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 7040 | } | ||
| 7041 | #[doc = "GPIO port input data register"] | ||
| 7042 | pub fn idr(self) -> Reg<regs::Idr, R> { | ||
| 7043 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 7044 | } | ||
| 7045 | #[doc = "GPIO port output data register"] | ||
| 7046 | pub fn odr(self) -> Reg<regs::Odr, RW> { | ||
| 7047 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 7048 | } | ||
| 7049 | #[doc = "GPIO port bit set/reset register"] | ||
| 7050 | pub fn bsrr(self) -> Reg<regs::Bsrr, W> { | ||
| 7051 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 7052 | } | ||
| 7053 | #[doc = "GPIO port configuration lock register"] | ||
| 7054 | pub fn lckr(self) -> Reg<regs::Lckr, RW> { | ||
| 7055 | unsafe { Reg::from_ptr(self.0.add(28usize)) } | ||
| 7056 | } | ||
| 7057 | #[doc = "GPIO alternate function register (low, high)"] | ||
| 7058 | pub fn afr(self, n: usize) -> Reg<regs::Afr, RW> { | ||
| 7059 | assert!(n < 2usize); | ||
| 7060 | unsafe { Reg::from_ptr(self.0.add(32usize + n * 4usize)) } | ||
| 7061 | } | ||
| 7062 | } | ||
| 7063 | pub mod regs { | ||
| 7064 | use crate::generic::*; | ||
| 7065 | #[doc = "GPIO port output type register"] | ||
| 7066 | #[repr(transparent)] | ||
| 7067 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7068 | pub struct Otyper(pub u32); | ||
| 7069 | impl Otyper { | ||
| 7070 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 7071 | pub fn ot(&self, n: usize) -> super::vals::Ot { | ||
| 7072 | assert!(n < 16usize); | ||
| 7073 | let offs = 0usize + n * 1usize; | ||
| 7074 | let val = (self.0 >> offs) & 0x01; | ||
| 7075 | super::vals::Ot(val as u8) | ||
| 7076 | } | ||
| 7077 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 7078 | pub fn set_ot(&mut self, n: usize, val: super::vals::Ot) { | ||
| 7079 | assert!(n < 16usize); | ||
| 7080 | let offs = 0usize + n * 1usize; | ||
| 7081 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 7082 | } | ||
| 7083 | } | ||
| 7084 | impl Default for Otyper { | ||
| 7085 | fn default() -> Otyper { | ||
| 7086 | Otyper(0) | ||
| 7087 | } | ||
| 7088 | } | ||
| 7089 | #[doc = "GPIO port pull-up/pull-down register"] | ||
| 7090 | #[repr(transparent)] | ||
| 7091 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7092 | pub struct Pupdr(pub u32); | ||
| 7093 | impl Pupdr { | ||
| 7094 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 7095 | pub fn pupdr(&self, n: usize) -> super::vals::Pupdr { | ||
| 7096 | assert!(n < 16usize); | ||
| 7097 | let offs = 0usize + n * 2usize; | ||
| 7098 | let val = (self.0 >> offs) & 0x03; | ||
| 7099 | super::vals::Pupdr(val as u8) | ||
| 7100 | } | ||
| 7101 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 7102 | pub fn set_pupdr(&mut self, n: usize, val: super::vals::Pupdr) { | ||
| 7103 | assert!(n < 16usize); | ||
| 7104 | let offs = 0usize + n * 2usize; | ||
| 7105 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 7106 | } | ||
| 7107 | } | ||
| 7108 | impl Default for Pupdr { | ||
| 7109 | fn default() -> Pupdr { | ||
| 7110 | Pupdr(0) | ||
| 7111 | } | ||
| 7112 | } | ||
| 7113 | #[doc = "GPIO port output speed register"] | ||
| 7114 | #[repr(transparent)] | ||
| 7115 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7116 | pub struct Ospeedr(pub u32); | ||
| 7117 | impl Ospeedr { | ||
| 7118 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 7119 | pub fn ospeedr(&self, n: usize) -> super::vals::Ospeedr { | ||
| 7120 | assert!(n < 16usize); | ||
| 7121 | let offs = 0usize + n * 2usize; | ||
| 7122 | let val = (self.0 >> offs) & 0x03; | ||
| 7123 | super::vals::Ospeedr(val as u8) | ||
| 7124 | } | ||
| 7125 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 7126 | pub fn set_ospeedr(&mut self, n: usize, val: super::vals::Ospeedr) { | ||
| 7127 | assert!(n < 16usize); | ||
| 7128 | let offs = 0usize + n * 2usize; | ||
| 7129 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 7130 | } | ||
| 7131 | } | ||
| 7132 | impl Default for Ospeedr { | ||
| 7133 | fn default() -> Ospeedr { | ||
| 7134 | Ospeedr(0) | ||
| 7135 | } | 7261 | } |
| 7136 | } | 7262 | #[doc = "TXE interrupt enable"] |
| 7137 | #[doc = "GPIO port bit set/reset register"] | 7263 | pub const fn txeie(&self) -> bool { |
| 7138 | #[repr(transparent)] | 7264 | let val = (self.0 >> 7usize) & 0x01; |
| 7139 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7140 | pub struct Bsrr(pub u32); | ||
| 7141 | impl Bsrr { | ||
| 7142 | #[doc = "Port x set bit y (y= 0..15)"] | ||
| 7143 | pub fn bs(&self, n: usize) -> bool { | ||
| 7144 | assert!(n < 16usize); | ||
| 7145 | let offs = 0usize + n * 1usize; | ||
| 7146 | let val = (self.0 >> offs) & 0x01; | ||
| 7147 | val != 0 | 7265 | val != 0 |
| 7148 | } | 7266 | } |
| 7149 | #[doc = "Port x set bit y (y= 0..15)"] | 7267 | #[doc = "TXE interrupt enable"] |
| 7150 | pub fn set_bs(&mut self, n: usize, val: bool) { | 7268 | pub fn set_txeie(&mut self, val: bool) { |
| 7151 | assert!(n < 16usize); | 7269 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 7152 | let offs = 0usize + n * 1usize; | ||
| 7153 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7154 | } | 7270 | } |
| 7155 | #[doc = "Port x set bit y (y= 0..15)"] | 7271 | #[doc = "PE interrupt enable"] |
| 7156 | pub fn br(&self, n: usize) -> bool { | 7272 | pub const fn peie(&self) -> bool { |
| 7157 | assert!(n < 16usize); | 7273 | let val = (self.0 >> 8usize) & 0x01; |
| 7158 | let offs = 16usize + n * 1usize; | ||
| 7159 | let val = (self.0 >> offs) & 0x01; | ||
| 7160 | val != 0 | 7274 | val != 0 |
| 7161 | } | 7275 | } |
| 7162 | #[doc = "Port x set bit y (y= 0..15)"] | 7276 | #[doc = "PE interrupt enable"] |
| 7163 | pub fn set_br(&mut self, n: usize, val: bool) { | 7277 | pub fn set_peie(&mut self, val: bool) { |
| 7164 | assert!(n < 16usize); | 7278 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 7165 | let offs = 16usize + n * 1usize; | ||
| 7166 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7167 | } | ||
| 7168 | } | ||
| 7169 | impl Default for Bsrr { | ||
| 7170 | fn default() -> Bsrr { | ||
| 7171 | Bsrr(0) | ||
| 7172 | } | ||
| 7173 | } | ||
| 7174 | #[doc = "GPIO alternate function register"] | ||
| 7175 | #[repr(transparent)] | ||
| 7176 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7177 | pub struct Afr(pub u32); | ||
| 7178 | impl Afr { | ||
| 7179 | #[doc = "Alternate function selection for port x bit y (y = 0..15)"] | ||
| 7180 | pub fn afr(&self, n: usize) -> super::vals::Afr { | ||
| 7181 | assert!(n < 8usize); | ||
| 7182 | let offs = 0usize + n * 4usize; | ||
| 7183 | let val = (self.0 >> offs) & 0x0f; | ||
| 7184 | super::vals::Afr(val as u8) | ||
| 7185 | } | 7279 | } |
| 7186 | #[doc = "Alternate function selection for port x bit y (y = 0..15)"] | 7280 | #[doc = "Parity selection"] |
| 7187 | pub fn set_afr(&mut self, n: usize, val: super::vals::Afr) { | 7281 | pub const fn ps(&self) -> super::vals::Ps { |
| 7188 | assert!(n < 8usize); | 7282 | let val = (self.0 >> 9usize) & 0x01; |
| 7189 | let offs = 0usize + n * 4usize; | 7283 | super::vals::Ps(val as u8) |
| 7190 | self.0 = (self.0 & !(0x0f << offs)) | (((val.0 as u32) & 0x0f) << offs); | ||
| 7191 | } | 7284 | } |
| 7192 | } | 7285 | #[doc = "Parity selection"] |
| 7193 | impl Default for Afr { | 7286 | pub fn set_ps(&mut self, val: super::vals::Ps) { |
| 7194 | fn default() -> Afr { | 7287 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); |
| 7195 | Afr(0) | ||
| 7196 | } | 7288 | } |
| 7197 | } | 7289 | #[doc = "Parity control enable"] |
| 7198 | #[doc = "GPIO port output data register"] | 7290 | pub const fn pce(&self) -> bool { |
| 7199 | #[repr(transparent)] | 7291 | let val = (self.0 >> 10usize) & 0x01; |
| 7200 | #[derive(Copy, Clone, Eq, PartialEq)] | 7292 | val != 0 |
| 7201 | pub struct Odr(pub u32); | ||
| 7202 | impl Odr { | ||
| 7203 | #[doc = "Port output data (y = 0..15)"] | ||
| 7204 | pub fn odr(&self, n: usize) -> super::vals::Odr { | ||
| 7205 | assert!(n < 16usize); | ||
| 7206 | let offs = 0usize + n * 1usize; | ||
| 7207 | let val = (self.0 >> offs) & 0x01; | ||
| 7208 | super::vals::Odr(val as u8) | ||
| 7209 | } | 7293 | } |
| 7210 | #[doc = "Port output data (y = 0..15)"] | 7294 | #[doc = "Parity control enable"] |
| 7211 | pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { | 7295 | pub fn set_pce(&mut self, val: bool) { |
| 7212 | assert!(n < 16usize); | 7296 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); |
| 7213 | let offs = 0usize + n * 1usize; | ||
| 7214 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 7215 | } | 7297 | } |
| 7216 | } | 7298 | #[doc = "Wakeup method"] |
| 7217 | impl Default for Odr { | 7299 | pub const fn wake(&self) -> super::vals::Wake { |
| 7218 | fn default() -> Odr { | 7300 | let val = (self.0 >> 11usize) & 0x01; |
| 7219 | Odr(0) | 7301 | super::vals::Wake(val as u8) |
| 7220 | } | 7302 | } |
| 7221 | } | 7303 | #[doc = "Wakeup method"] |
| 7222 | #[doc = "GPIO port mode register"] | 7304 | pub fn set_wake(&mut self, val: super::vals::Wake) { |
| 7223 | #[repr(transparent)] | 7305 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); |
| 7224 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7225 | pub struct Moder(pub u32); | ||
| 7226 | impl Moder { | ||
| 7227 | #[doc = "Port x configuration bits (y = 0..15)"] | ||
| 7228 | pub fn moder(&self, n: usize) -> super::vals::Moder { | ||
| 7229 | assert!(n < 16usize); | ||
| 7230 | let offs = 0usize + n * 2usize; | ||
| 7231 | let val = (self.0 >> offs) & 0x03; | ||
| 7232 | super::vals::Moder(val as u8) | ||
| 7233 | } | 7306 | } |
| 7234 | #[doc = "Port x configuration bits (y = 0..15)"] | 7307 | #[doc = "Word length"] |
| 7235 | pub fn set_moder(&mut self, n: usize, val: super::vals::Moder) { | 7308 | pub const fn m(&self) -> super::vals::M { |
| 7236 | assert!(n < 16usize); | 7309 | let val = (self.0 >> 12usize) & 0x01; |
| 7237 | let offs = 0usize + n * 2usize; | 7310 | super::vals::M(val as u8) |
| 7238 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 7239 | } | 7311 | } |
| 7240 | } | 7312 | #[doc = "Word length"] |
| 7241 | impl Default for Moder { | 7313 | pub fn set_m(&mut self, val: super::vals::M) { |
| 7242 | fn default() -> Moder { | 7314 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); |
| 7243 | Moder(0) | ||
| 7244 | } | 7315 | } |
| 7245 | } | 7316 | #[doc = "USART enable"] |
| 7246 | #[doc = "GPIO port input data register"] | 7317 | pub const fn ue(&self) -> bool { |
| 7247 | #[repr(transparent)] | 7318 | let val = (self.0 >> 13usize) & 0x01; |
| 7248 | #[derive(Copy, Clone, Eq, PartialEq)] | 7319 | val != 0 |
| 7249 | pub struct Idr(pub u32); | ||
| 7250 | impl Idr { | ||
| 7251 | #[doc = "Port input data (y = 0..15)"] | ||
| 7252 | pub fn idr(&self, n: usize) -> super::vals::Idr { | ||
| 7253 | assert!(n < 16usize); | ||
| 7254 | let offs = 0usize + n * 1usize; | ||
| 7255 | let val = (self.0 >> offs) & 0x01; | ||
| 7256 | super::vals::Idr(val as u8) | ||
| 7257 | } | 7320 | } |
| 7258 | #[doc = "Port input data (y = 0..15)"] | 7321 | #[doc = "USART enable"] |
| 7259 | pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { | 7322 | pub fn set_ue(&mut self, val: bool) { |
| 7260 | assert!(n < 16usize); | 7323 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); |
| 7261 | let offs = 0usize + n * 1usize; | ||
| 7262 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 7263 | } | 7324 | } |
| 7264 | } | 7325 | } |
| 7265 | impl Default for Idr { | 7326 | impl Default for Cr1 { |
| 7266 | fn default() -> Idr { | 7327 | fn default() -> Cr1 { |
| 7267 | Idr(0) | 7328 | Cr1(0) |
| 7268 | } | 7329 | } |
| 7269 | } | 7330 | } |
| 7270 | #[doc = "GPIO port configuration lock register"] | 7331 | #[doc = "Guard time and prescaler register"] |
| 7271 | #[repr(transparent)] | 7332 | #[repr(transparent)] |
| 7272 | #[derive(Copy, Clone, Eq, PartialEq)] | 7333 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 7273 | pub struct Lckr(pub u32); | 7334 | pub struct Gtpr(pub u32); |
| 7274 | impl Lckr { | 7335 | impl Gtpr { |
| 7275 | #[doc = "Port x lock bit y (y= 0..15)"] | 7336 | #[doc = "Prescaler value"] |
| 7276 | pub fn lck(&self, n: usize) -> super::vals::Lck { | 7337 | pub const fn psc(&self) -> u8 { |
| 7277 | assert!(n < 16usize); | 7338 | let val = (self.0 >> 0usize) & 0xff; |
| 7278 | let offs = 0usize + n * 1usize; | 7339 | val as u8 |
| 7279 | let val = (self.0 >> offs) & 0x01; | ||
| 7280 | super::vals::Lck(val as u8) | ||
| 7281 | } | 7340 | } |
| 7282 | #[doc = "Port x lock bit y (y= 0..15)"] | 7341 | #[doc = "Prescaler value"] |
| 7283 | pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { | 7342 | pub fn set_psc(&mut self, val: u8) { |
| 7284 | assert!(n < 16usize); | 7343 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); |
| 7285 | let offs = 0usize + n * 1usize; | ||
| 7286 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 7287 | } | 7344 | } |
| 7288 | #[doc = "Port x lock bit y (y= 0..15)"] | 7345 | #[doc = "Guard time value"] |
| 7289 | pub const fn lckk(&self) -> super::vals::Lckk { | 7346 | pub const fn gt(&self) -> u8 { |
| 7290 | let val = (self.0 >> 16usize) & 0x01; | 7347 | let val = (self.0 >> 8usize) & 0xff; |
| 7291 | super::vals::Lckk(val as u8) | 7348 | val as u8 |
| 7292 | } | 7349 | } |
| 7293 | #[doc = "Port x lock bit y (y= 0..15)"] | 7350 | #[doc = "Guard time value"] |
| 7294 | pub fn set_lckk(&mut self, val: super::vals::Lckk) { | 7351 | pub fn set_gt(&mut self, val: u8) { |
| 7295 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); | 7352 | self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); |
| 7296 | } | 7353 | } |
| 7297 | } | 7354 | } |
| 7298 | impl Default for Lckr { | 7355 | impl Default for Gtpr { |
| 7299 | fn default() -> Lckr { | 7356 | fn default() -> Gtpr { |
| 7300 | Lckr(0) | 7357 | Gtpr(0) |
| 7301 | } | 7358 | } |
| 7302 | } | 7359 | } |
| 7303 | } | 7360 | } |
| @@ -7305,682 +7362,278 @@ pub mod gpio_v2 { | |||
| 7305 | use crate::generic::*; | 7362 | use crate::generic::*; |
| 7306 | #[repr(transparent)] | 7363 | #[repr(transparent)] |
| 7307 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 7364 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 7308 | pub struct Lck(pub u8); | 7365 | pub struct Wake(pub u8); |
| 7309 | impl Lck { | 7366 | impl Wake { |
| 7310 | #[doc = "Port configuration not locked"] | 7367 | #[doc = "USART wakeup on idle line"] |
| 7311 | pub const UNLOCKED: Self = Self(0); | 7368 | pub const IDLELINE: Self = Self(0); |
| 7312 | #[doc = "Port configuration locked"] | 7369 | #[doc = "USART wakeup on address mark"] |
| 7313 | pub const LOCKED: Self = Self(0x01); | 7370 | pub const ADDRESSMARK: Self = Self(0x01); |
| 7314 | } | 7371 | } |
| 7315 | #[repr(transparent)] | 7372 | #[repr(transparent)] |
| 7316 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 7373 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 7317 | pub struct Pupdr(pub u8); | 7374 | pub struct M(pub u8); |
| 7318 | impl Pupdr { | 7375 | impl M { |
| 7319 | #[doc = "No pull-up, pull-down"] | 7376 | #[doc = "8 data bits"] |
| 7320 | pub const FLOATING: Self = Self(0); | 7377 | pub const M8: Self = Self(0); |
| 7321 | #[doc = "Pull-up"] | 7378 | #[doc = "9 data bits"] |
| 7322 | pub const PULLUP: Self = Self(0x01); | 7379 | pub const M9: Self = Self(0x01); |
| 7323 | #[doc = "Pull-down"] | ||
| 7324 | pub const PULLDOWN: Self = Self(0x02); | ||
| 7325 | } | 7380 | } |
| 7326 | #[repr(transparent)] | 7381 | #[repr(transparent)] |
| 7327 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 7382 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 7328 | pub struct Idr(pub u8); | 7383 | pub struct Ps(pub u8); |
| 7329 | impl Idr { | 7384 | impl Ps { |
| 7330 | #[doc = "Input is logic low"] | 7385 | #[doc = "Even parity"] |
| 7331 | pub const LOW: Self = Self(0); | 7386 | pub const EVEN: Self = Self(0); |
| 7332 | #[doc = "Input is logic high"] | 7387 | #[doc = "Odd parity"] |
| 7333 | pub const HIGH: Self = Self(0x01); | 7388 | pub const ODD: Self = Self(0x01); |
| 7334 | } | 7389 | } |
| 7335 | #[repr(transparent)] | 7390 | #[repr(transparent)] |
| 7336 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 7391 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 7337 | pub struct Ot(pub u8); | 7392 | pub struct Sbk(pub u8); |
| 7338 | impl Ot { | 7393 | impl Sbk { |
| 7339 | #[doc = "Output push-pull (reset state)"] | 7394 | #[doc = "No break character is transmitted"] |
| 7340 | pub const PUSHPULL: Self = Self(0); | 7395 | pub const NOBREAK: Self = Self(0); |
| 7341 | #[doc = "Output open-drain"] | 7396 | #[doc = "Break character transmitted"] |
| 7342 | pub const OPENDRAIN: Self = Self(0x01); | 7397 | pub const BREAK: Self = Self(0x01); |
| 7343 | } | 7398 | } |
| 7344 | #[repr(transparent)] | 7399 | #[repr(transparent)] |
| 7345 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 7400 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 7346 | pub struct Ospeedr(pub u8); | 7401 | pub struct Hdsel(pub u8); |
| 7347 | impl Ospeedr { | 7402 | impl Hdsel { |
| 7348 | #[doc = "Low speed"] | 7403 | #[doc = "Half duplex mode is not selected"] |
| 7349 | pub const LOWSPEED: Self = Self(0); | 7404 | pub const FULLDUPLEX: Self = Self(0); |
| 7350 | #[doc = "Medium speed"] | 7405 | #[doc = "Half duplex mode is selected"] |
| 7351 | pub const MEDIUMSPEED: Self = Self(0x01); | 7406 | pub const HALFDUPLEX: Self = Self(0x01); |
| 7352 | #[doc = "High speed"] | ||
| 7353 | pub const HIGHSPEED: Self = Self(0x02); | ||
| 7354 | #[doc = "Very high speed"] | ||
| 7355 | pub const VERYHIGHSPEED: Self = Self(0x03); | ||
| 7356 | } | 7407 | } |
| 7357 | #[repr(transparent)] | 7408 | #[repr(transparent)] |
| 7358 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 7409 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 7359 | pub struct Bsw(pub u8); | 7410 | pub struct Rwu(pub u8); |
| 7360 | impl Bsw { | 7411 | impl Rwu { |
| 7361 | #[doc = "Sets the corresponding ODRx bit"] | 7412 | #[doc = "Receiver in active mode"] |
| 7362 | pub const SET: Self = Self(0x01); | 7413 | pub const ACTIVE: Self = Self(0); |
| 7414 | #[doc = "Receiver in mute mode"] | ||
| 7415 | pub const MUTE: Self = Self(0x01); | ||
| 7363 | } | 7416 | } |
| 7364 | #[repr(transparent)] | 7417 | #[repr(transparent)] |
| 7365 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 7418 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 7366 | pub struct Lckk(pub u8); | 7419 | pub struct Cpol(pub u8); |
| 7367 | impl Lckk { | 7420 | impl Cpol { |
| 7368 | #[doc = "Port configuration lock key not active"] | 7421 | #[doc = "Steady low value on CK pin outside transmission window"] |
| 7369 | pub const NOTACTIVE: Self = Self(0); | 7422 | pub const LOW: Self = Self(0); |
| 7370 | #[doc = "Port configuration lock key active"] | 7423 | #[doc = "Steady high value on CK pin outside transmission window"] |
| 7371 | pub const ACTIVE: Self = Self(0x01); | 7424 | pub const HIGH: Self = Self(0x01); |
| 7372 | } | 7425 | } |
| 7373 | #[repr(transparent)] | 7426 | #[repr(transparent)] |
| 7374 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 7427 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 7375 | pub struct Moder(pub u8); | 7428 | pub struct Stop(pub u8); |
| 7376 | impl Moder { | 7429 | impl Stop { |
| 7377 | #[doc = "Input mode (reset state)"] | 7430 | #[doc = "1 stop bit"] |
| 7378 | pub const INPUT: Self = Self(0); | 7431 | pub const STOP1: Self = Self(0); |
| 7379 | #[doc = "General purpose output mode"] | 7432 | #[doc = "0.5 stop bits"] |
| 7380 | pub const OUTPUT: Self = Self(0x01); | 7433 | pub const STOP0P5: Self = Self(0x01); |
| 7381 | #[doc = "Alternate function mode"] | 7434 | #[doc = "2 stop bits"] |
| 7382 | pub const ALTERNATE: Self = Self(0x02); | 7435 | pub const STOP2: Self = Self(0x02); |
| 7383 | #[doc = "Analog mode"] | 7436 | #[doc = "1.5 stop bits"] |
| 7384 | pub const ANALOG: Self = Self(0x03); | 7437 | pub const STOP1P5: Self = Self(0x03); |
| 7385 | } | 7438 | } |
| 7386 | #[repr(transparent)] | 7439 | #[repr(transparent)] |
| 7387 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 7440 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 7388 | pub struct Brw(pub u8); | 7441 | pub struct Cpha(pub u8); |
| 7389 | impl Brw { | 7442 | impl Cpha { |
| 7390 | #[doc = "Resets the corresponding ODRx bit"] | 7443 | #[doc = "The first clock transition is the first data capture edge"] |
| 7391 | pub const RESET: Self = Self(0x01); | 7444 | pub const FIRST: Self = Self(0); |
| 7445 | #[doc = "The second clock transition is the first data capture edge"] | ||
| 7446 | pub const SECOND: Self = Self(0x01); | ||
| 7392 | } | 7447 | } |
| 7393 | #[repr(transparent)] | 7448 | #[repr(transparent)] |
| 7394 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 7449 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 7395 | pub struct Afr(pub u8); | 7450 | pub struct Irlp(pub u8); |
| 7396 | impl Afr { | 7451 | impl Irlp { |
| 7397 | #[doc = "AF0"] | 7452 | #[doc = "Normal mode"] |
| 7398 | pub const AF0: Self = Self(0); | 7453 | pub const NORMAL: Self = Self(0); |
| 7399 | #[doc = "AF1"] | 7454 | #[doc = "Low-power mode"] |
| 7400 | pub const AF1: Self = Self(0x01); | 7455 | pub const LOWPOWER: Self = Self(0x01); |
| 7401 | #[doc = "AF2"] | ||
| 7402 | pub const AF2: Self = Self(0x02); | ||
| 7403 | #[doc = "AF3"] | ||
| 7404 | pub const AF3: Self = Self(0x03); | ||
| 7405 | #[doc = "AF4"] | ||
| 7406 | pub const AF4: Self = Self(0x04); | ||
| 7407 | #[doc = "AF5"] | ||
| 7408 | pub const AF5: Self = Self(0x05); | ||
| 7409 | #[doc = "AF6"] | ||
| 7410 | pub const AF6: Self = Self(0x06); | ||
| 7411 | #[doc = "AF7"] | ||
| 7412 | pub const AF7: Self = Self(0x07); | ||
| 7413 | #[doc = "AF8"] | ||
| 7414 | pub const AF8: Self = Self(0x08); | ||
| 7415 | #[doc = "AF9"] | ||
| 7416 | pub const AF9: Self = Self(0x09); | ||
| 7417 | #[doc = "AF10"] | ||
| 7418 | pub const AF10: Self = Self(0x0a); | ||
| 7419 | #[doc = "AF11"] | ||
| 7420 | pub const AF11: Self = Self(0x0b); | ||
| 7421 | #[doc = "AF12"] | ||
| 7422 | pub const AF12: Self = Self(0x0c); | ||
| 7423 | #[doc = "AF13"] | ||
| 7424 | pub const AF13: Self = Self(0x0d); | ||
| 7425 | #[doc = "AF14"] | ||
| 7426 | pub const AF14: Self = Self(0x0e); | ||
| 7427 | #[doc = "AF15"] | ||
| 7428 | pub const AF15: Self = Self(0x0f); | ||
| 7429 | } | 7456 | } |
| 7430 | #[repr(transparent)] | 7457 | #[repr(transparent)] |
| 7431 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 7458 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 7432 | pub struct Odr(pub u8); | 7459 | pub struct Lbdl(pub u8); |
| 7433 | impl Odr { | 7460 | impl Lbdl { |
| 7434 | #[doc = "Set output to logic low"] | 7461 | #[doc = "10-bit break detection"] |
| 7435 | pub const LOW: Self = Self(0); | 7462 | pub const LBDL10: Self = Self(0); |
| 7436 | #[doc = "Set output to logic high"] | 7463 | #[doc = "11-bit break detection"] |
| 7437 | pub const HIGH: Self = Self(0x01); | 7464 | pub const LBDL11: Self = Self(0x01); |
| 7438 | } | 7465 | } |
| 7439 | } | 7466 | } |
| 7440 | } | 7467 | } |
| 7441 | pub mod spi_v1 { | 7468 | pub mod syscfg_f4 { |
| 7442 | use crate::generic::*; | 7469 | use crate::generic::*; |
| 7443 | #[doc = "Serial peripheral interface"] | 7470 | #[doc = "System configuration controller"] |
| 7444 | #[derive(Copy, Clone)] | 7471 | #[derive(Copy, Clone)] |
| 7445 | pub struct Spi(pub *mut u8); | 7472 | pub struct Syscfg(pub *mut u8); |
| 7446 | unsafe impl Send for Spi {} | 7473 | unsafe impl Send for Syscfg {} |
| 7447 | unsafe impl Sync for Spi {} | 7474 | unsafe impl Sync for Syscfg {} |
| 7448 | impl Spi { | 7475 | impl Syscfg { |
| 7449 | #[doc = "control register 1"] | 7476 | #[doc = "memory remap register"] |
| 7450 | pub fn cr1(self) -> Reg<regs::Cr1, RW> { | 7477 | pub fn memrm(self) -> Reg<regs::Memrm, RW> { |
| 7451 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 7478 | unsafe { Reg::from_ptr(self.0.add(0usize)) } |
| 7452 | } | 7479 | } |
| 7453 | #[doc = "control register 2"] | 7480 | #[doc = "peripheral mode configuration register"] |
| 7454 | pub fn cr2(self) -> Reg<regs::Cr2, RW> { | 7481 | pub fn pmc(self) -> Reg<regs::Pmc, RW> { |
| 7455 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 7482 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 7456 | } | 7483 | } |
| 7457 | #[doc = "status register"] | 7484 | #[doc = "external interrupt configuration register"] |
| 7458 | pub fn sr(self) -> Reg<regs::Sr, RW> { | 7485 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { |
| 7459 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 7486 | assert!(n < 4usize); |
| 7460 | } | 7487 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } |
| 7461 | #[doc = "data register"] | ||
| 7462 | pub fn dr(self) -> Reg<regs::Dr, RW> { | ||
| 7463 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | ||
| 7464 | } | ||
| 7465 | #[doc = "CRC polynomial register"] | ||
| 7466 | pub fn crcpr(self) -> Reg<regs::Crcpr, RW> { | ||
| 7467 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 7468 | } | ||
| 7469 | #[doc = "RX CRC register"] | ||
| 7470 | pub fn rxcrcr(self) -> Reg<regs::Rxcrcr, R> { | ||
| 7471 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 7472 | } | 7488 | } |
| 7473 | #[doc = "TX CRC register"] | 7489 | #[doc = "Compensation cell control register"] |
| 7474 | pub fn txcrcr(self) -> Reg<regs::Txcrcr, R> { | 7490 | pub fn cmpcr(self) -> Reg<regs::Cmpcr, R> { |
| 7475 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | 7491 | unsafe { Reg::from_ptr(self.0.add(32usize)) } |
| 7476 | } | 7492 | } |
| 7477 | } | 7493 | } |
| 7478 | pub mod regs { | 7494 | pub mod regs { |
| 7479 | use crate::generic::*; | 7495 | use crate::generic::*; |
| 7480 | #[doc = "TX CRC register"] | 7496 | #[doc = "memory remap register"] |
| 7481 | #[repr(transparent)] | ||
| 7482 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7483 | pub struct Txcrcr(pub u32); | ||
| 7484 | impl Txcrcr { | ||
| 7485 | #[doc = "Tx CRC register"] | ||
| 7486 | pub const fn tx_crc(&self) -> u16 { | ||
| 7487 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 7488 | val as u16 | ||
| 7489 | } | ||
| 7490 | #[doc = "Tx CRC register"] | ||
| 7491 | pub fn set_tx_crc(&mut self, val: u16) { | ||
| 7492 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 7493 | } | ||
| 7494 | } | ||
| 7495 | impl Default for Txcrcr { | ||
| 7496 | fn default() -> Txcrcr { | ||
| 7497 | Txcrcr(0) | ||
| 7498 | } | ||
| 7499 | } | ||
| 7500 | #[doc = "status register"] | ||
| 7501 | #[repr(transparent)] | 7497 | #[repr(transparent)] |
| 7502 | #[derive(Copy, Clone, Eq, PartialEq)] | 7498 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 7503 | pub struct Sr(pub u32); | 7499 | pub struct Memrm(pub u32); |
| 7504 | impl Sr { | 7500 | impl Memrm { |
| 7505 | #[doc = "Receive buffer not empty"] | 7501 | #[doc = "Memory mapping selection"] |
| 7506 | pub const fn rxne(&self) -> bool { | 7502 | pub const fn mem_mode(&self) -> u8 { |
| 7507 | let val = (self.0 >> 0usize) & 0x01; | 7503 | let val = (self.0 >> 0usize) & 0x07; |
| 7508 | val != 0 | 7504 | val as u8 |
| 7509 | } | ||
| 7510 | #[doc = "Receive buffer not empty"] | ||
| 7511 | pub fn set_rxne(&mut self, val: bool) { | ||
| 7512 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 7513 | } | ||
| 7514 | #[doc = "Transmit buffer empty"] | ||
| 7515 | pub const fn txe(&self) -> bool { | ||
| 7516 | let val = (self.0 >> 1usize) & 0x01; | ||
| 7517 | val != 0 | ||
| 7518 | } | ||
| 7519 | #[doc = "Transmit buffer empty"] | ||
| 7520 | pub fn set_txe(&mut self, val: bool) { | ||
| 7521 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 7522 | } | ||
| 7523 | #[doc = "CRC error flag"] | ||
| 7524 | pub const fn crcerr(&self) -> bool { | ||
| 7525 | let val = (self.0 >> 4usize) & 0x01; | ||
| 7526 | val != 0 | ||
| 7527 | } | ||
| 7528 | #[doc = "CRC error flag"] | ||
| 7529 | pub fn set_crcerr(&mut self, val: bool) { | ||
| 7530 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 7531 | } | ||
| 7532 | #[doc = "Mode fault"] | ||
| 7533 | pub const fn modf(&self) -> bool { | ||
| 7534 | let val = (self.0 >> 5usize) & 0x01; | ||
| 7535 | val != 0 | ||
| 7536 | } | ||
| 7537 | #[doc = "Mode fault"] | ||
| 7538 | pub fn set_modf(&mut self, val: bool) { | ||
| 7539 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 7540 | } | ||
| 7541 | #[doc = "Overrun flag"] | ||
| 7542 | pub const fn ovr(&self) -> bool { | ||
| 7543 | let val = (self.0 >> 6usize) & 0x01; | ||
| 7544 | val != 0 | ||
| 7545 | } | ||
| 7546 | #[doc = "Overrun flag"] | ||
| 7547 | pub fn set_ovr(&mut self, val: bool) { | ||
| 7548 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 7549 | } | ||
| 7550 | #[doc = "Busy flag"] | ||
| 7551 | pub const fn bsy(&self) -> bool { | ||
| 7552 | let val = (self.0 >> 7usize) & 0x01; | ||
| 7553 | val != 0 | ||
| 7554 | } | 7505 | } |
| 7555 | #[doc = "Busy flag"] | 7506 | #[doc = "Memory mapping selection"] |
| 7556 | pub fn set_bsy(&mut self, val: bool) { | 7507 | pub fn set_mem_mode(&mut self, val: u8) { |
| 7557 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 7508 | self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); |
| 7558 | } | 7509 | } |
| 7559 | #[doc = "TI frame format error"] | 7510 | #[doc = "Flash bank mode selection"] |
| 7560 | pub const fn fre(&self) -> bool { | 7511 | pub const fn fb_mode(&self) -> bool { |
| 7561 | let val = (self.0 >> 8usize) & 0x01; | 7512 | let val = (self.0 >> 8usize) & 0x01; |
| 7562 | val != 0 | 7513 | val != 0 |
| 7563 | } | 7514 | } |
| 7564 | #[doc = "TI frame format error"] | 7515 | #[doc = "Flash bank mode selection"] |
| 7565 | pub fn set_fre(&mut self, val: bool) { | 7516 | pub fn set_fb_mode(&mut self, val: bool) { |
| 7566 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 7517 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 7567 | } | 7518 | } |
| 7568 | } | 7519 | #[doc = "FMC memory mapping swap"] |
| 7569 | impl Default for Sr { | 7520 | pub const fn swp_fmc(&self) -> u8 { |
| 7570 | fn default() -> Sr { | 7521 | let val = (self.0 >> 10usize) & 0x03; |
| 7571 | Sr(0) | 7522 | val as u8 |
| 7572 | } | ||
| 7573 | } | ||
| 7574 | #[doc = "CRC polynomial register"] | ||
| 7575 | #[repr(transparent)] | ||
| 7576 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7577 | pub struct Crcpr(pub u32); | ||
| 7578 | impl Crcpr { | ||
| 7579 | #[doc = "CRC polynomial register"] | ||
| 7580 | pub const fn crcpoly(&self) -> u16 { | ||
| 7581 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 7582 | val as u16 | ||
| 7583 | } | ||
| 7584 | #[doc = "CRC polynomial register"] | ||
| 7585 | pub fn set_crcpoly(&mut self, val: u16) { | ||
| 7586 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 7587 | } | ||
| 7588 | } | ||
| 7589 | impl Default for Crcpr { | ||
| 7590 | fn default() -> Crcpr { | ||
| 7591 | Crcpr(0) | ||
| 7592 | } | ||
| 7593 | } | ||
| 7594 | #[doc = "RX CRC register"] | ||
| 7595 | #[repr(transparent)] | ||
| 7596 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7597 | pub struct Rxcrcr(pub u32); | ||
| 7598 | impl Rxcrcr { | ||
| 7599 | #[doc = "Rx CRC register"] | ||
| 7600 | pub const fn rx_crc(&self) -> u16 { | ||
| 7601 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 7602 | val as u16 | ||
| 7603 | } | ||
| 7604 | #[doc = "Rx CRC register"] | ||
| 7605 | pub fn set_rx_crc(&mut self, val: u16) { | ||
| 7606 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | ||
| 7607 | } | ||
| 7608 | } | ||
| 7609 | impl Default for Rxcrcr { | ||
| 7610 | fn default() -> Rxcrcr { | ||
| 7611 | Rxcrcr(0) | ||
| 7612 | } | ||
| 7613 | } | ||
| 7614 | #[doc = "data register"] | ||
| 7615 | #[repr(transparent)] | ||
| 7616 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 7617 | pub struct Dr(pub u32); | ||
| 7618 | impl Dr { | ||
| 7619 | #[doc = "Data register"] | ||
| 7620 | pub const fn dr(&self) -> u16 { | ||
| 7621 | let val = (self.0 >> 0usize) & 0xffff; | ||
| 7622 | val as u16 | ||
| 7623 | } | 7523 | } |
| 7624 | #[doc = "Data register"] | 7524 | #[doc = "FMC memory mapping swap"] |
| 7625 | pub fn set_dr(&mut self, val: u16) { | 7525 | pub fn set_swp_fmc(&mut self, val: u8) { |
| 7626 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 7526 | self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize); |
| 7627 | } | 7527 | } |
| 7628 | } | 7528 | } |
| 7629 | impl Default for Dr { | 7529 | impl Default for Memrm { |
| 7630 | fn default() -> Dr { | 7530 | fn default() -> Memrm { |
| 7631 | Dr(0) | 7531 | Memrm(0) |
| 7632 | } | 7532 | } |
| 7633 | } | 7533 | } |
| 7634 | #[doc = "control register 1"] | 7534 | #[doc = "peripheral mode configuration register"] |
| 7635 | #[repr(transparent)] | 7535 | #[repr(transparent)] |
| 7636 | #[derive(Copy, Clone, Eq, PartialEq)] | 7536 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 7637 | pub struct Cr1(pub u32); | 7537 | pub struct Pmc(pub u32); |
| 7638 | impl Cr1 { | 7538 | impl Pmc { |
| 7639 | #[doc = "Clock phase"] | 7539 | #[doc = "ADC1DC2"] |
| 7640 | pub const fn cpha(&self) -> super::vals::Cpha { | 7540 | pub const fn adc1dc2(&self) -> bool { |
| 7641 | let val = (self.0 >> 0usize) & 0x01; | 7541 | let val = (self.0 >> 16usize) & 0x01; |
| 7642 | super::vals::Cpha(val as u8) | ||
| 7643 | } | ||
| 7644 | #[doc = "Clock phase"] | ||
| 7645 | pub fn set_cpha(&mut self, val: super::vals::Cpha) { | ||
| 7646 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val.0 as u32) & 0x01) << 0usize); | ||
| 7647 | } | ||
| 7648 | #[doc = "Clock polarity"] | ||
| 7649 | pub const fn cpol(&self) -> super::vals::Cpol { | ||
| 7650 | let val = (self.0 >> 1usize) & 0x01; | ||
| 7651 | super::vals::Cpol(val as u8) | ||
| 7652 | } | ||
| 7653 | #[doc = "Clock polarity"] | ||
| 7654 | pub fn set_cpol(&mut self, val: super::vals::Cpol) { | ||
| 7655 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val.0 as u32) & 0x01) << 1usize); | ||
| 7656 | } | ||
| 7657 | #[doc = "Master selection"] | ||
| 7658 | pub const fn mstr(&self) -> super::vals::Mstr { | ||
| 7659 | let val = (self.0 >> 2usize) & 0x01; | ||
| 7660 | super::vals::Mstr(val as u8) | ||
| 7661 | } | ||
| 7662 | #[doc = "Master selection"] | ||
| 7663 | pub fn set_mstr(&mut self, val: super::vals::Mstr) { | ||
| 7664 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); | ||
| 7665 | } | ||
| 7666 | #[doc = "Baud rate control"] | ||
| 7667 | pub const fn br(&self) -> super::vals::Br { | ||
| 7668 | let val = (self.0 >> 3usize) & 0x07; | ||
| 7669 | super::vals::Br(val as u8) | ||
| 7670 | } | ||
| 7671 | #[doc = "Baud rate control"] | ||
| 7672 | pub fn set_br(&mut self, val: super::vals::Br) { | ||
| 7673 | self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize); | ||
| 7674 | } | ||
| 7675 | #[doc = "SPI enable"] | ||
| 7676 | pub const fn spe(&self) -> bool { | ||
| 7677 | let val = (self.0 >> 6usize) & 0x01; | ||
| 7678 | val != 0 | 7542 | val != 0 |
| 7679 | } | 7543 | } |
| 7680 | #[doc = "SPI enable"] | 7544 | #[doc = "ADC1DC2"] |
| 7681 | pub fn set_spe(&mut self, val: bool) { | 7545 | pub fn set_adc1dc2(&mut self, val: bool) { |
| 7682 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 7546 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 7683 | } | ||
| 7684 | #[doc = "Frame format"] | ||
| 7685 | pub const fn lsbfirst(&self) -> super::vals::Lsbfirst { | ||
| 7686 | let val = (self.0 >> 7usize) & 0x01; | ||
| 7687 | super::vals::Lsbfirst(val as u8) | ||
| 7688 | } | ||
| 7689 | #[doc = "Frame format"] | ||
| 7690 | pub fn set_lsbfirst(&mut self, val: super::vals::Lsbfirst) { | ||
| 7691 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | ||
| 7692 | } | 7547 | } |
| 7693 | #[doc = "Internal slave select"] | 7548 | #[doc = "ADC2DC2"] |
| 7694 | pub const fn ssi(&self) -> bool { | 7549 | pub const fn adc2dc2(&self) -> bool { |
| 7695 | let val = (self.0 >> 8usize) & 0x01; | 7550 | let val = (self.0 >> 17usize) & 0x01; |
| 7696 | val != 0 | 7551 | val != 0 |
| 7697 | } | 7552 | } |
| 7698 | #[doc = "Internal slave select"] | 7553 | #[doc = "ADC2DC2"] |
| 7699 | pub fn set_ssi(&mut self, val: bool) { | 7554 | pub fn set_adc2dc2(&mut self, val: bool) { |
| 7700 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 7555 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); |
| 7701 | } | 7556 | } |
| 7702 | #[doc = "Software slave management"] | 7557 | #[doc = "ADC3DC2"] |
| 7703 | pub const fn ssm(&self) -> bool { | 7558 | pub const fn adc3dc2(&self) -> bool { |
| 7704 | let val = (self.0 >> 9usize) & 0x01; | 7559 | let val = (self.0 >> 18usize) & 0x01; |
| 7705 | val != 0 | 7560 | val != 0 |
| 7706 | } | 7561 | } |
| 7707 | #[doc = "Software slave management"] | 7562 | #[doc = "ADC3DC2"] |
| 7708 | pub fn set_ssm(&mut self, val: bool) { | 7563 | pub fn set_adc3dc2(&mut self, val: bool) { |
| 7709 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | 7564 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); |
| 7710 | } | ||
| 7711 | #[doc = "Receive only"] | ||
| 7712 | pub const fn rxonly(&self) -> super::vals::Rxonly { | ||
| 7713 | let val = (self.0 >> 10usize) & 0x01; | ||
| 7714 | super::vals::Rxonly(val as u8) | ||
| 7715 | } | ||
| 7716 | #[doc = "Receive only"] | ||
| 7717 | pub fn set_rxonly(&mut self, val: super::vals::Rxonly) { | ||
| 7718 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); | ||
| 7719 | } | ||
| 7720 | #[doc = "Data frame format"] | ||
| 7721 | pub const fn dff(&self) -> super::vals::Dff { | ||
| 7722 | let val = (self.0 >> 11usize) & 0x01; | ||
| 7723 | super::vals::Dff(val as u8) | ||
| 7724 | } | ||
| 7725 | #[doc = "Data frame format"] | ||
| 7726 | pub fn set_dff(&mut self, val: super::vals::Dff) { | ||
| 7727 | self.0 = (self.0 & !(0x01 << 11usize)) | (((val.0 as u32) & 0x01) << 11usize); | ||
| 7728 | } | ||
| 7729 | #[doc = "CRC transfer next"] | ||
| 7730 | pub const fn crcnext(&self) -> super::vals::Crcnext { | ||
| 7731 | let val = (self.0 >> 12usize) & 0x01; | ||
| 7732 | super::vals::Crcnext(val as u8) | ||
| 7733 | } | ||
| 7734 | #[doc = "CRC transfer next"] | ||
| 7735 | pub fn set_crcnext(&mut self, val: super::vals::Crcnext) { | ||
| 7736 | self.0 = (self.0 & !(0x01 << 12usize)) | (((val.0 as u32) & 0x01) << 12usize); | ||
| 7737 | } | 7565 | } |
| 7738 | #[doc = "Hardware CRC calculation enable"] | 7566 | #[doc = "Ethernet PHY interface selection"] |
| 7739 | pub const fn crcen(&self) -> bool { | 7567 | pub const fn mii_rmii_sel(&self) -> bool { |
| 7740 | let val = (self.0 >> 13usize) & 0x01; | 7568 | let val = (self.0 >> 23usize) & 0x01; |
| 7741 | val != 0 | 7569 | val != 0 |
| 7742 | } | 7570 | } |
| 7743 | #[doc = "Hardware CRC calculation enable"] | 7571 | #[doc = "Ethernet PHY interface selection"] |
| 7744 | pub fn set_crcen(&mut self, val: bool) { | 7572 | pub fn set_mii_rmii_sel(&mut self, val: bool) { |
| 7745 | self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); | 7573 | self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); |
| 7746 | } | ||
| 7747 | #[doc = "Output enable in bidirectional mode"] | ||
| 7748 | pub const fn bidioe(&self) -> super::vals::Bidioe { | ||
| 7749 | let val = (self.0 >> 14usize) & 0x01; | ||
| 7750 | super::vals::Bidioe(val as u8) | ||
| 7751 | } | 7574 | } |
| 7752 | #[doc = "Output enable in bidirectional mode"] | 7575 | } |
| 7753 | pub fn set_bidioe(&mut self, val: super::vals::Bidioe) { | 7576 | impl Default for Pmc { |
| 7754 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); | 7577 | fn default() -> Pmc { |
| 7578 | Pmc(0) | ||
| 7755 | } | 7579 | } |
| 7756 | #[doc = "Bidirectional data mode enable"] | 7580 | } |
| 7757 | pub const fn bidimode(&self) -> super::vals::Bidimode { | 7581 | #[doc = "external interrupt configuration register"] |
| 7758 | let val = (self.0 >> 15usize) & 0x01; | 7582 | #[repr(transparent)] |
| 7759 | super::vals::Bidimode(val as u8) | 7583 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 7584 | pub struct Exticr(pub u32); | ||
| 7585 | impl Exticr { | ||
| 7586 | #[doc = "EXTI x configuration"] | ||
| 7587 | pub fn exti(&self, n: usize) -> u8 { | ||
| 7588 | assert!(n < 4usize); | ||
| 7589 | let offs = 0usize + n * 4usize; | ||
| 7590 | let val = (self.0 >> offs) & 0x0f; | ||
| 7591 | val as u8 | ||
| 7760 | } | 7592 | } |
| 7761 | #[doc = "Bidirectional data mode enable"] | 7593 | #[doc = "EXTI x configuration"] |
| 7762 | pub fn set_bidimode(&mut self, val: super::vals::Bidimode) { | 7594 | pub fn set_exti(&mut self, n: usize, val: u8) { |
| 7763 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); | 7595 | assert!(n < 4usize); |
| 7596 | let offs = 0usize + n * 4usize; | ||
| 7597 | self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); | ||
| 7764 | } | 7598 | } |
| 7765 | } | 7599 | } |
| 7766 | impl Default for Cr1 { | 7600 | impl Default for Exticr { |
| 7767 | fn default() -> Cr1 { | 7601 | fn default() -> Exticr { |
| 7768 | Cr1(0) | 7602 | Exticr(0) |
| 7769 | } | 7603 | } |
| 7770 | } | 7604 | } |
| 7771 | #[doc = "control register 2"] | 7605 | #[doc = "Compensation cell control register"] |
| 7772 | #[repr(transparent)] | 7606 | #[repr(transparent)] |
| 7773 | #[derive(Copy, Clone, Eq, PartialEq)] | 7607 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 7774 | pub struct Cr2(pub u32); | 7608 | pub struct Cmpcr(pub u32); |
| 7775 | impl Cr2 { | 7609 | impl Cmpcr { |
| 7776 | #[doc = "Rx buffer DMA enable"] | 7610 | #[doc = "Compensation cell power-down"] |
| 7777 | pub const fn rxdmaen(&self) -> bool { | 7611 | pub const fn cmp_pd(&self) -> bool { |
| 7778 | let val = (self.0 >> 0usize) & 0x01; | 7612 | let val = (self.0 >> 0usize) & 0x01; |
| 7779 | val != 0 | 7613 | val != 0 |
| 7780 | } | 7614 | } |
| 7781 | #[doc = "Rx buffer DMA enable"] | 7615 | #[doc = "Compensation cell power-down"] |
| 7782 | pub fn set_rxdmaen(&mut self, val: bool) { | 7616 | pub fn set_cmp_pd(&mut self, val: bool) { |
| 7783 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 7617 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 7784 | } | 7618 | } |
| 7785 | #[doc = "Tx buffer DMA enable"] | 7619 | #[doc = "READY"] |
| 7786 | pub const fn txdmaen(&self) -> bool { | 7620 | pub const fn ready(&self) -> bool { |
| 7787 | let val = (self.0 >> 1usize) & 0x01; | 7621 | let val = (self.0 >> 8usize) & 0x01; |
| 7788 | val != 0 | ||
| 7789 | } | ||
| 7790 | #[doc = "Tx buffer DMA enable"] | ||
| 7791 | pub fn set_txdmaen(&mut self, val: bool) { | ||
| 7792 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 7793 | } | ||
| 7794 | #[doc = "SS output enable"] | ||
| 7795 | pub const fn ssoe(&self) -> bool { | ||
| 7796 | let val = (self.0 >> 2usize) & 0x01; | ||
| 7797 | val != 0 | ||
| 7798 | } | ||
| 7799 | #[doc = "SS output enable"] | ||
| 7800 | pub fn set_ssoe(&mut self, val: bool) { | ||
| 7801 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 7802 | } | ||
| 7803 | #[doc = "Frame format"] | ||
| 7804 | pub const fn frf(&self) -> super::vals::Frf { | ||
| 7805 | let val = (self.0 >> 4usize) & 0x01; | ||
| 7806 | super::vals::Frf(val as u8) | ||
| 7807 | } | ||
| 7808 | #[doc = "Frame format"] | ||
| 7809 | pub fn set_frf(&mut self, val: super::vals::Frf) { | ||
| 7810 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | ||
| 7811 | } | ||
| 7812 | #[doc = "Error interrupt enable"] | ||
| 7813 | pub const fn errie(&self) -> bool { | ||
| 7814 | let val = (self.0 >> 5usize) & 0x01; | ||
| 7815 | val != 0 | ||
| 7816 | } | ||
| 7817 | #[doc = "Error interrupt enable"] | ||
| 7818 | pub fn set_errie(&mut self, val: bool) { | ||
| 7819 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 7820 | } | ||
| 7821 | #[doc = "RX buffer not empty interrupt enable"] | ||
| 7822 | pub const fn rxneie(&self) -> bool { | ||
| 7823 | let val = (self.0 >> 6usize) & 0x01; | ||
| 7824 | val != 0 | ||
| 7825 | } | ||
| 7826 | #[doc = "RX buffer not empty interrupt enable"] | ||
| 7827 | pub fn set_rxneie(&mut self, val: bool) { | ||
| 7828 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 7829 | } | ||
| 7830 | #[doc = "Tx buffer empty interrupt enable"] | ||
| 7831 | pub const fn txeie(&self) -> bool { | ||
| 7832 | let val = (self.0 >> 7usize) & 0x01; | ||
| 7833 | val != 0 | 7622 | val != 0 |
| 7834 | } | 7623 | } |
| 7835 | #[doc = "Tx buffer empty interrupt enable"] | 7624 | #[doc = "READY"] |
| 7836 | pub fn set_txeie(&mut self, val: bool) { | 7625 | pub fn set_ready(&mut self, val: bool) { |
| 7837 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | 7626 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 7838 | } | 7627 | } |
| 7839 | } | 7628 | } |
| 7840 | impl Default for Cr2 { | 7629 | impl Default for Cmpcr { |
| 7841 | fn default() -> Cr2 { | 7630 | fn default() -> Cmpcr { |
| 7842 | Cr2(0) | 7631 | Cmpcr(0) |
| 7843 | } | 7632 | } |
| 7844 | } | 7633 | } |
| 7845 | } | 7634 | } |
| 7846 | pub mod vals { | ||
| 7847 | use crate::generic::*; | ||
| 7848 | #[repr(transparent)] | ||
| 7849 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7850 | pub struct Crcnext(pub u8); | ||
| 7851 | impl Crcnext { | ||
| 7852 | #[doc = "Next transmit value is from Tx buffer"] | ||
| 7853 | pub const TXBUFFER: Self = Self(0); | ||
| 7854 | #[doc = "Next transmit value is from Tx CRC register"] | ||
| 7855 | pub const CRC: Self = Self(0x01); | ||
| 7856 | } | ||
| 7857 | #[repr(transparent)] | ||
| 7858 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7859 | pub struct Cpha(pub u8); | ||
| 7860 | impl Cpha { | ||
| 7861 | #[doc = "The first clock transition is the first data capture edge"] | ||
| 7862 | pub const FIRSTEDGE: Self = Self(0); | ||
| 7863 | #[doc = "The second clock transition is the first data capture edge"] | ||
| 7864 | pub const SECONDEDGE: Self = Self(0x01); | ||
| 7865 | } | ||
| 7866 | #[repr(transparent)] | ||
| 7867 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7868 | pub struct Iscfg(pub u8); | ||
| 7869 | impl Iscfg { | ||
| 7870 | #[doc = "Slave - transmit"] | ||
| 7871 | pub const SLAVETX: Self = Self(0); | ||
| 7872 | #[doc = "Slave - receive"] | ||
| 7873 | pub const SLAVERX: Self = Self(0x01); | ||
| 7874 | #[doc = "Master - transmit"] | ||
| 7875 | pub const MASTERTX: Self = Self(0x02); | ||
| 7876 | #[doc = "Master - receive"] | ||
| 7877 | pub const MASTERRX: Self = Self(0x03); | ||
| 7878 | } | ||
| 7879 | #[repr(transparent)] | ||
| 7880 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7881 | pub struct Br(pub u8); | ||
| 7882 | impl Br { | ||
| 7883 | #[doc = "f_PCLK / 2"] | ||
| 7884 | pub const DIV2: Self = Self(0); | ||
| 7885 | #[doc = "f_PCLK / 4"] | ||
| 7886 | pub const DIV4: Self = Self(0x01); | ||
| 7887 | #[doc = "f_PCLK / 8"] | ||
| 7888 | pub const DIV8: Self = Self(0x02); | ||
| 7889 | #[doc = "f_PCLK / 16"] | ||
| 7890 | pub const DIV16: Self = Self(0x03); | ||
| 7891 | #[doc = "f_PCLK / 32"] | ||
| 7892 | pub const DIV32: Self = Self(0x04); | ||
| 7893 | #[doc = "f_PCLK / 64"] | ||
| 7894 | pub const DIV64: Self = Self(0x05); | ||
| 7895 | #[doc = "f_PCLK / 128"] | ||
| 7896 | pub const DIV128: Self = Self(0x06); | ||
| 7897 | #[doc = "f_PCLK / 256"] | ||
| 7898 | pub const DIV256: Self = Self(0x07); | ||
| 7899 | } | ||
| 7900 | #[repr(transparent)] | ||
| 7901 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7902 | pub struct Bidimode(pub u8); | ||
| 7903 | impl Bidimode { | ||
| 7904 | #[doc = "2-line unidirectional data mode selected"] | ||
| 7905 | pub const UNIDIRECTIONAL: Self = Self(0); | ||
| 7906 | #[doc = "1-line bidirectional data mode selected"] | ||
| 7907 | pub const BIDIRECTIONAL: Self = Self(0x01); | ||
| 7908 | } | ||
| 7909 | #[repr(transparent)] | ||
| 7910 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7911 | pub struct Rxonly(pub u8); | ||
| 7912 | impl Rxonly { | ||
| 7913 | #[doc = "Full duplex (Transmit and receive)"] | ||
| 7914 | pub const FULLDUPLEX: Self = Self(0); | ||
| 7915 | #[doc = "Output disabled (Receive-only mode)"] | ||
| 7916 | pub const OUTPUTDISABLED: Self = Self(0x01); | ||
| 7917 | } | ||
| 7918 | #[repr(transparent)] | ||
| 7919 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7920 | pub struct Cpol(pub u8); | ||
| 7921 | impl Cpol { | ||
| 7922 | #[doc = "CK to 0 when idle"] | ||
| 7923 | pub const IDLELOW: Self = Self(0); | ||
| 7924 | #[doc = "CK to 1 when idle"] | ||
| 7925 | pub const IDLEHIGH: Self = Self(0x01); | ||
| 7926 | } | ||
| 7927 | #[repr(transparent)] | ||
| 7928 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7929 | pub struct Lsbfirst(pub u8); | ||
| 7930 | impl Lsbfirst { | ||
| 7931 | #[doc = "Data is transmitted/received with the MSB first"] | ||
| 7932 | pub const MSBFIRST: Self = Self(0); | ||
| 7933 | #[doc = "Data is transmitted/received with the LSB first"] | ||
| 7934 | pub const LSBFIRST: Self = Self(0x01); | ||
| 7935 | } | ||
| 7936 | #[repr(transparent)] | ||
| 7937 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7938 | pub struct Dff(pub u8); | ||
| 7939 | impl Dff { | ||
| 7940 | #[doc = "8-bit data frame format is selected for transmission/reception"] | ||
| 7941 | pub const EIGHTBIT: Self = Self(0); | ||
| 7942 | #[doc = "16-bit data frame format is selected for transmission/reception"] | ||
| 7943 | pub const SIXTEENBIT: Self = Self(0x01); | ||
| 7944 | } | ||
| 7945 | #[repr(transparent)] | ||
| 7946 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7947 | pub struct Bidioe(pub u8); | ||
| 7948 | impl Bidioe { | ||
| 7949 | #[doc = "Output disabled (receive-only mode)"] | ||
| 7950 | pub const OUTPUTDISABLED: Self = Self(0); | ||
| 7951 | #[doc = "Output enabled (transmit-only mode)"] | ||
| 7952 | pub const OUTPUTENABLED: Self = Self(0x01); | ||
| 7953 | } | ||
| 7954 | #[repr(transparent)] | ||
| 7955 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7956 | pub struct Frer(pub u8); | ||
| 7957 | impl Frer { | ||
| 7958 | #[doc = "No frame format error"] | ||
| 7959 | pub const NOERROR: Self = Self(0); | ||
| 7960 | #[doc = "A frame format error occurred"] | ||
| 7961 | pub const ERROR: Self = Self(0x01); | ||
| 7962 | } | ||
| 7963 | #[repr(transparent)] | ||
| 7964 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7965 | pub struct Mstr(pub u8); | ||
| 7966 | impl Mstr { | ||
| 7967 | #[doc = "Slave configuration"] | ||
| 7968 | pub const SLAVE: Self = Self(0); | ||
| 7969 | #[doc = "Master configuration"] | ||
| 7970 | pub const MASTER: Self = Self(0x01); | ||
| 7971 | } | ||
| 7972 | #[repr(transparent)] | ||
| 7973 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 7974 | pub struct Frf(pub u8); | ||
| 7975 | impl Frf { | ||
| 7976 | #[doc = "SPI Motorola mode"] | ||
| 7977 | pub const MOTOROLA: Self = Self(0); | ||
| 7978 | #[doc = "SPI TI mode"] | ||
| 7979 | pub const TI: Self = Self(0x01); | ||
| 7980 | } | ||
| 7981 | } | ||
| 7982 | } | 7635 | } |
| 7983 | pub mod dma_v1 { | 7636 | pub mod dma_v2 { |
| 7984 | use crate::generic::*; | 7637 | use crate::generic::*; |
| 7985 | #[doc = "DMA controller"] | 7638 | #[doc = "DMA controller"] |
| 7986 | #[derive(Copy, Clone)] | 7639 | #[derive(Copy, Clone)] |
| @@ -7988,283 +7641,373 @@ pub mod dma_v1 { | |||
| 7988 | unsafe impl Send for Dma {} | 7641 | unsafe impl Send for Dma {} |
| 7989 | unsafe impl Sync for Dma {} | 7642 | unsafe impl Sync for Dma {} |
| 7990 | impl Dma { | 7643 | impl Dma { |
| 7991 | #[doc = "DMA interrupt status register (DMA_ISR)"] | 7644 | #[doc = "low interrupt status register"] |
| 7992 | pub fn isr(self) -> Reg<regs::Isr, R> { | 7645 | pub fn isr(self, n: usize) -> Reg<regs::Isr, R> { |
| 7993 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 7646 | assert!(n < 2usize); |
| 7647 | unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) } | ||
| 7994 | } | 7648 | } |
| 7995 | #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] | 7649 | #[doc = "low interrupt flag clear register"] |
| 7996 | pub fn ifcr(self) -> Reg<regs::Ifcr, W> { | 7650 | pub fn ifcr(self, n: usize) -> Reg<regs::Ifcr, W> { |
| 7997 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 7651 | assert!(n < 2usize); |
| 7652 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 7998 | } | 7653 | } |
| 7999 | #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] | 7654 | #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] |
| 8000 | pub fn ch(self, n: usize) -> Ch { | 7655 | pub fn st(self, n: usize) -> St { |
| 8001 | assert!(n < 7usize); | 7656 | assert!(n < 8usize); |
| 8002 | unsafe { Ch(self.0.add(8usize + n * 20usize)) } | 7657 | unsafe { St(self.0.add(16usize + n * 24usize)) } |
| 8003 | } | 7658 | } |
| 8004 | } | 7659 | } |
| 8005 | #[doc = "Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers"] | 7660 | #[doc = "Stream cluster: S?CR, S?NDTR, S?M0AR, S?M1AR and S?FCR registers"] |
| 8006 | #[derive(Copy, Clone)] | 7661 | #[derive(Copy, Clone)] |
| 8007 | pub struct Ch(pub *mut u8); | 7662 | pub struct St(pub *mut u8); |
| 8008 | unsafe impl Send for Ch {} | 7663 | unsafe impl Send for St {} |
| 8009 | unsafe impl Sync for Ch {} | 7664 | unsafe impl Sync for St {} |
| 8010 | impl Ch { | 7665 | impl St { |
| 8011 | #[doc = "DMA channel configuration register (DMA_CCR)"] | 7666 | #[doc = "stream x configuration register"] |
| 8012 | pub fn cr(self) -> Reg<regs::Cr, RW> { | 7667 | pub fn cr(self) -> Reg<regs::Cr, RW> { |
| 8013 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 7668 | unsafe { Reg::from_ptr(self.0.add(0usize)) } |
| 8014 | } | 7669 | } |
| 8015 | #[doc = "DMA channel 1 number of data register"] | 7670 | #[doc = "stream x number of data register"] |
| 8016 | pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { | 7671 | pub fn ndtr(self) -> Reg<regs::Ndtr, RW> { |
| 8017 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 7672 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 8018 | } | 7673 | } |
| 8019 | #[doc = "DMA channel 1 peripheral address register"] | 7674 | #[doc = "stream x peripheral address register"] |
| 8020 | pub fn par(self) -> Reg<u32, RW> { | 7675 | pub fn par(self) -> Reg<u32, RW> { |
| 8021 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 7676 | unsafe { Reg::from_ptr(self.0.add(8usize)) } |
| 8022 | } | 7677 | } |
| 8023 | #[doc = "DMA channel 1 memory address register"] | 7678 | #[doc = "stream x memory 0 address register"] |
| 8024 | pub fn mar(self) -> Reg<u32, RW> { | 7679 | pub fn m0ar(self) -> Reg<u32, RW> { |
| 8025 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 7680 | unsafe { Reg::from_ptr(self.0.add(12usize)) } |
| 8026 | } | 7681 | } |
| 7682 | #[doc = "stream x memory 1 address register"] | ||
| 7683 | pub fn m1ar(self) -> Reg<u32, RW> { | ||
| 7684 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | ||
| 7685 | } | ||
| 7686 | #[doc = "stream x FIFO control register"] | ||
| 7687 | pub fn fcr(self) -> Reg<regs::Fcr, RW> { | ||
| 7688 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | ||
| 7689 | } | ||
| 8027 | } | 7690 | } |
| 8028 | pub mod regs { | 7691 | pub mod regs { |
| 8029 | use crate::generic::*; | 7692 | use crate::generic::*; |
| 8030 | #[doc = "DMA interrupt flag clear register (DMA_IFCR)"] | 7693 | #[doc = "stream x number of data register"] |
| 8031 | #[repr(transparent)] | 7694 | #[repr(transparent)] |
| 8032 | #[derive(Copy, Clone, Eq, PartialEq)] | 7695 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8033 | pub struct Ifcr(pub u32); | 7696 | pub struct Ndtr(pub u32); |
| 8034 | impl Ifcr { | 7697 | impl Ndtr { |
| 8035 | #[doc = "Channel 1 Global interrupt clear"] | 7698 | #[doc = "Number of data items to transfer"] |
| 8036 | pub fn cgif(&self, n: usize) -> bool { | 7699 | pub const fn ndt(&self) -> u16 { |
| 8037 | assert!(n < 7usize); | 7700 | let val = (self.0 >> 0usize) & 0xffff; |
| 8038 | let offs = 0usize + n * 4usize; | 7701 | val as u16 |
| 8039 | let val = (self.0 >> offs) & 0x01; | ||
| 8040 | val != 0 | ||
| 8041 | } | 7702 | } |
| 8042 | #[doc = "Channel 1 Global interrupt clear"] | 7703 | #[doc = "Number of data items to transfer"] |
| 8043 | pub fn set_cgif(&mut self, n: usize, val: bool) { | 7704 | pub fn set_ndt(&mut self, val: u16) { |
| 8044 | assert!(n < 7usize); | 7705 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); |
| 8045 | let offs = 0usize + n * 4usize; | ||
| 8046 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8047 | } | 7706 | } |
| 8048 | #[doc = "Channel 1 Transfer Complete clear"] | 7707 | } |
| 8049 | pub fn ctcif(&self, n: usize) -> bool { | 7708 | impl Default for Ndtr { |
| 8050 | assert!(n < 7usize); | 7709 | fn default() -> Ndtr { |
| 8051 | let offs = 1usize + n * 4usize; | 7710 | Ndtr(0) |
| 8052 | let val = (self.0 >> offs) & 0x01; | ||
| 8053 | val != 0 | ||
| 8054 | } | 7711 | } |
| 8055 | #[doc = "Channel 1 Transfer Complete clear"] | 7712 | } |
| 8056 | pub fn set_ctcif(&mut self, n: usize, val: bool) { | 7713 | #[doc = "stream x FIFO control register"] |
| 8057 | assert!(n < 7usize); | 7714 | #[repr(transparent)] |
| 8058 | let offs = 1usize + n * 4usize; | 7715 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8059 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 7716 | pub struct Fcr(pub u32); |
| 7717 | impl Fcr { | ||
| 7718 | #[doc = "FIFO threshold selection"] | ||
| 7719 | pub const fn fth(&self) -> super::vals::Fth { | ||
| 7720 | let val = (self.0 >> 0usize) & 0x03; | ||
| 7721 | super::vals::Fth(val as u8) | ||
| 8060 | } | 7722 | } |
| 8061 | #[doc = "Channel 1 Half Transfer clear"] | 7723 | #[doc = "FIFO threshold selection"] |
| 8062 | pub fn chtif(&self, n: usize) -> bool { | 7724 | pub fn set_fth(&mut self, val: super::vals::Fth) { |
| 8063 | assert!(n < 7usize); | 7725 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val.0 as u32) & 0x03) << 0usize); |
| 8064 | let offs = 2usize + n * 4usize; | ||
| 8065 | let val = (self.0 >> offs) & 0x01; | ||
| 8066 | val != 0 | ||
| 8067 | } | 7726 | } |
| 8068 | #[doc = "Channel 1 Half Transfer clear"] | 7727 | #[doc = "Direct mode disable"] |
| 8069 | pub fn set_chtif(&mut self, n: usize, val: bool) { | 7728 | pub const fn dmdis(&self) -> super::vals::Dmdis { |
| 8070 | assert!(n < 7usize); | 7729 | let val = (self.0 >> 2usize) & 0x01; |
| 8071 | let offs = 2usize + n * 4usize; | 7730 | super::vals::Dmdis(val as u8) |
| 8072 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8073 | } | 7731 | } |
| 8074 | #[doc = "Channel 1 Transfer Error clear"] | 7732 | #[doc = "Direct mode disable"] |
| 8075 | pub fn cteif(&self, n: usize) -> bool { | 7733 | pub fn set_dmdis(&mut self, val: super::vals::Dmdis) { |
| 8076 | assert!(n < 7usize); | 7734 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val.0 as u32) & 0x01) << 2usize); |
| 8077 | let offs = 3usize + n * 4usize; | 7735 | } |
| 8078 | let val = (self.0 >> offs) & 0x01; | 7736 | #[doc = "FIFO status"] |
| 7737 | pub const fn fs(&self) -> super::vals::Fs { | ||
| 7738 | let val = (self.0 >> 3usize) & 0x07; | ||
| 7739 | super::vals::Fs(val as u8) | ||
| 7740 | } | ||
| 7741 | #[doc = "FIFO status"] | ||
| 7742 | pub fn set_fs(&mut self, val: super::vals::Fs) { | ||
| 7743 | self.0 = (self.0 & !(0x07 << 3usize)) | (((val.0 as u32) & 0x07) << 3usize); | ||
| 7744 | } | ||
| 7745 | #[doc = "FIFO error interrupt enable"] | ||
| 7746 | pub const fn feie(&self) -> bool { | ||
| 7747 | let val = (self.0 >> 7usize) & 0x01; | ||
| 8079 | val != 0 | 7748 | val != 0 |
| 8080 | } | 7749 | } |
| 8081 | #[doc = "Channel 1 Transfer Error clear"] | 7750 | #[doc = "FIFO error interrupt enable"] |
| 8082 | pub fn set_cteif(&mut self, n: usize, val: bool) { | 7751 | pub fn set_feie(&mut self, val: bool) { |
| 8083 | assert!(n < 7usize); | 7752 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); |
| 8084 | let offs = 3usize + n * 4usize; | ||
| 8085 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8086 | } | 7753 | } |
| 8087 | } | 7754 | } |
| 8088 | impl Default for Ifcr { | 7755 | impl Default for Fcr { |
| 8089 | fn default() -> Ifcr { | 7756 | fn default() -> Fcr { |
| 8090 | Ifcr(0) | 7757 | Fcr(0) |
| 8091 | } | 7758 | } |
| 8092 | } | 7759 | } |
| 8093 | #[doc = "DMA interrupt status register (DMA_ISR)"] | 7760 | #[doc = "low interrupt flag clear register"] |
| 8094 | #[repr(transparent)] | 7761 | #[repr(transparent)] |
| 8095 | #[derive(Copy, Clone, Eq, PartialEq)] | 7762 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8096 | pub struct Isr(pub u32); | 7763 | pub struct Ifcr(pub u32); |
| 8097 | impl Isr { | 7764 | impl Ifcr { |
| 8098 | #[doc = "Channel 1 Global interrupt flag"] | 7765 | #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"] |
| 8099 | pub fn gif(&self, n: usize) -> bool { | 7766 | pub fn cfeif(&self, n: usize) -> bool { |
| 8100 | assert!(n < 7usize); | 7767 | assert!(n < 4usize); |
| 8101 | let offs = 0usize + n * 4usize; | 7768 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 8102 | let val = (self.0 >> offs) & 0x01; | 7769 | let val = (self.0 >> offs) & 0x01; |
| 8103 | val != 0 | 7770 | val != 0 |
| 8104 | } | 7771 | } |
| 8105 | #[doc = "Channel 1 Global interrupt flag"] | 7772 | #[doc = "Stream x clear FIFO error interrupt flag (x = 3..0)"] |
| 8106 | pub fn set_gif(&mut self, n: usize, val: bool) { | 7773 | pub fn set_cfeif(&mut self, n: usize, val: bool) { |
| 8107 | assert!(n < 7usize); | 7774 | assert!(n < 4usize); |
| 8108 | let offs = 0usize + n * 4usize; | 7775 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 8109 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 7776 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 8110 | } | 7777 | } |
| 8111 | #[doc = "Channel 1 Transfer Complete flag"] | 7778 | #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"] |
| 8112 | pub fn tcif(&self, n: usize) -> bool { | 7779 | pub fn cdmeif(&self, n: usize) -> bool { |
| 8113 | assert!(n < 7usize); | 7780 | assert!(n < 4usize); |
| 8114 | let offs = 1usize + n * 4usize; | 7781 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 8115 | let val = (self.0 >> offs) & 0x01; | 7782 | let val = (self.0 >> offs) & 0x01; |
| 8116 | val != 0 | 7783 | val != 0 |
| 8117 | } | 7784 | } |
| 8118 | #[doc = "Channel 1 Transfer Complete flag"] | 7785 | #[doc = "Stream x clear direct mode error interrupt flag (x = 3..0)"] |
| 8119 | pub fn set_tcif(&mut self, n: usize, val: bool) { | 7786 | pub fn set_cdmeif(&mut self, n: usize, val: bool) { |
| 8120 | assert!(n < 7usize); | 7787 | assert!(n < 4usize); |
| 8121 | let offs = 1usize + n * 4usize; | 7788 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 8122 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 7789 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 8123 | } | 7790 | } |
| 8124 | #[doc = "Channel 1 Half Transfer Complete flag"] | 7791 | #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"] |
| 8125 | pub fn htif(&self, n: usize) -> bool { | 7792 | pub fn cteif(&self, n: usize) -> bool { |
| 8126 | assert!(n < 7usize); | 7793 | assert!(n < 4usize); |
| 8127 | let offs = 2usize + n * 4usize; | 7794 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 8128 | let val = (self.0 >> offs) & 0x01; | 7795 | let val = (self.0 >> offs) & 0x01; |
| 8129 | val != 0 | 7796 | val != 0 |
| 8130 | } | 7797 | } |
| 8131 | #[doc = "Channel 1 Half Transfer Complete flag"] | 7798 | #[doc = "Stream x clear transfer error interrupt flag (x = 3..0)"] |
| 8132 | pub fn set_htif(&mut self, n: usize, val: bool) { | 7799 | pub fn set_cteif(&mut self, n: usize, val: bool) { |
| 8133 | assert!(n < 7usize); | 7800 | assert!(n < 4usize); |
| 8134 | let offs = 2usize + n * 4usize; | 7801 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 8135 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 7802 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 8136 | } | 7803 | } |
| 8137 | #[doc = "Channel 1 Transfer Error flag"] | 7804 | #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"] |
| 8138 | pub fn teif(&self, n: usize) -> bool { | 7805 | pub fn chtif(&self, n: usize) -> bool { |
| 8139 | assert!(n < 7usize); | 7806 | assert!(n < 4usize); |
| 8140 | let offs = 3usize + n * 4usize; | 7807 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 8141 | let val = (self.0 >> offs) & 0x01; | 7808 | let val = (self.0 >> offs) & 0x01; |
| 8142 | val != 0 | 7809 | val != 0 |
| 8143 | } | 7810 | } |
| 8144 | #[doc = "Channel 1 Transfer Error flag"] | 7811 | #[doc = "Stream x clear half transfer interrupt flag (x = 3..0)"] |
| 8145 | pub fn set_teif(&mut self, n: usize, val: bool) { | 7812 | pub fn set_chtif(&mut self, n: usize, val: bool) { |
| 8146 | assert!(n < 7usize); | 7813 | assert!(n < 4usize); |
| 8147 | let offs = 3usize + n * 4usize; | 7814 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 7815 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 7816 | } | ||
| 7817 | #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"] | ||
| 7818 | pub fn ctcif(&self, n: usize) -> bool { | ||
| 7819 | assert!(n < 4usize); | ||
| 7820 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 7821 | let val = (self.0 >> offs) & 0x01; | ||
| 7822 | val != 0 | ||
| 7823 | } | ||
| 7824 | #[doc = "Stream x clear transfer complete interrupt flag (x = 3..0)"] | ||
| 7825 | pub fn set_ctcif(&mut self, n: usize, val: bool) { | ||
| 7826 | assert!(n < 4usize); | ||
| 7827 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 8148 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 7828 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); |
| 8149 | } | 7829 | } |
| 8150 | } | 7830 | } |
| 8151 | impl Default for Isr { | 7831 | impl Default for Ifcr { |
| 8152 | fn default() -> Isr { | 7832 | fn default() -> Ifcr { |
| 8153 | Isr(0) | 7833 | Ifcr(0) |
| 8154 | } | 7834 | } |
| 8155 | } | 7835 | } |
| 8156 | #[doc = "DMA channel configuration register (DMA_CCR)"] | 7836 | #[doc = "stream x configuration register"] |
| 8157 | #[repr(transparent)] | 7837 | #[repr(transparent)] |
| 8158 | #[derive(Copy, Clone, Eq, PartialEq)] | 7838 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8159 | pub struct Cr(pub u32); | 7839 | pub struct Cr(pub u32); |
| 8160 | impl Cr { | 7840 | impl Cr { |
| 8161 | #[doc = "Channel enable"] | 7841 | #[doc = "Stream enable / flag stream ready when read low"] |
| 8162 | pub const fn en(&self) -> bool { | 7842 | pub const fn en(&self) -> bool { |
| 8163 | let val = (self.0 >> 0usize) & 0x01; | 7843 | let val = (self.0 >> 0usize) & 0x01; |
| 8164 | val != 0 | 7844 | val != 0 |
| 8165 | } | 7845 | } |
| 8166 | #[doc = "Channel enable"] | 7846 | #[doc = "Stream enable / flag stream ready when read low"] |
| 8167 | pub fn set_en(&mut self, val: bool) { | 7847 | pub fn set_en(&mut self, val: bool) { |
| 8168 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 7848 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 8169 | } | 7849 | } |
| 8170 | #[doc = "Transfer complete interrupt enable"] | 7850 | #[doc = "Direct mode error interrupt enable"] |
| 8171 | pub const fn tcie(&self) -> bool { | 7851 | pub const fn dmeie(&self) -> bool { |
| 8172 | let val = (self.0 >> 1usize) & 0x01; | 7852 | let val = (self.0 >> 1usize) & 0x01; |
| 8173 | val != 0 | 7853 | val != 0 |
| 8174 | } | 7854 | } |
| 8175 | #[doc = "Transfer complete interrupt enable"] | 7855 | #[doc = "Direct mode error interrupt enable"] |
| 8176 | pub fn set_tcie(&mut self, val: bool) { | 7856 | pub fn set_dmeie(&mut self, val: bool) { |
| 8177 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 7857 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 8178 | } | 7858 | } |
| 8179 | #[doc = "Half Transfer interrupt enable"] | 7859 | #[doc = "Transfer error interrupt enable"] |
| 8180 | pub const fn htie(&self) -> bool { | 7860 | pub const fn teie(&self) -> bool { |
| 8181 | let val = (self.0 >> 2usize) & 0x01; | 7861 | let val = (self.0 >> 2usize) & 0x01; |
| 8182 | val != 0 | 7862 | val != 0 |
| 8183 | } | 7863 | } |
| 8184 | #[doc = "Half Transfer interrupt enable"] | 7864 | #[doc = "Transfer error interrupt enable"] |
| 8185 | pub fn set_htie(&mut self, val: bool) { | 7865 | pub fn set_teie(&mut self, val: bool) { |
| 8186 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 7866 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 8187 | } | 7867 | } |
| 8188 | #[doc = "Transfer error interrupt enable"] | 7868 | #[doc = "Half transfer interrupt enable"] |
| 8189 | pub const fn teie(&self) -> bool { | 7869 | pub const fn htie(&self) -> bool { |
| 8190 | let val = (self.0 >> 3usize) & 0x01; | 7870 | let val = (self.0 >> 3usize) & 0x01; |
| 8191 | val != 0 | 7871 | val != 0 |
| 8192 | } | 7872 | } |
| 8193 | #[doc = "Transfer error interrupt enable"] | 7873 | #[doc = "Half transfer interrupt enable"] |
| 8194 | pub fn set_teie(&mut self, val: bool) { | 7874 | pub fn set_htie(&mut self, val: bool) { |
| 8195 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 7875 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 8196 | } | 7876 | } |
| 7877 | #[doc = "Transfer complete interrupt enable"] | ||
| 7878 | pub const fn tcie(&self) -> bool { | ||
| 7879 | let val = (self.0 >> 4usize) & 0x01; | ||
| 7880 | val != 0 | ||
| 7881 | } | ||
| 7882 | #[doc = "Transfer complete interrupt enable"] | ||
| 7883 | pub fn set_tcie(&mut self, val: bool) { | ||
| 7884 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 7885 | } | ||
| 7886 | #[doc = "Peripheral flow controller"] | ||
| 7887 | pub const fn pfctrl(&self) -> super::vals::Pfctrl { | ||
| 7888 | let val = (self.0 >> 5usize) & 0x01; | ||
| 7889 | super::vals::Pfctrl(val as u8) | ||
| 7890 | } | ||
| 7891 | #[doc = "Peripheral flow controller"] | ||
| 7892 | pub fn set_pfctrl(&mut self, val: super::vals::Pfctrl) { | ||
| 7893 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | ||
| 7894 | } | ||
| 8197 | #[doc = "Data transfer direction"] | 7895 | #[doc = "Data transfer direction"] |
| 8198 | pub const fn dir(&self) -> super::vals::Dir { | 7896 | pub const fn dir(&self) -> super::vals::Dir { |
| 8199 | let val = (self.0 >> 4usize) & 0x01; | 7897 | let val = (self.0 >> 6usize) & 0x03; |
| 8200 | super::vals::Dir(val as u8) | 7898 | super::vals::Dir(val as u8) |
| 8201 | } | 7899 | } |
| 8202 | #[doc = "Data transfer direction"] | 7900 | #[doc = "Data transfer direction"] |
| 8203 | pub fn set_dir(&mut self, val: super::vals::Dir) { | 7901 | pub fn set_dir(&mut self, val: super::vals::Dir) { |
| 8204 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val.0 as u32) & 0x01) << 4usize); | 7902 | self.0 = (self.0 & !(0x03 << 6usize)) | (((val.0 as u32) & 0x03) << 6usize); |
| 8205 | } | 7903 | } |
| 8206 | #[doc = "Circular mode"] | 7904 | #[doc = "Circular mode"] |
| 8207 | pub const fn circ(&self) -> super::vals::Circ { | 7905 | pub const fn circ(&self) -> super::vals::Circ { |
| 8208 | let val = (self.0 >> 5usize) & 0x01; | 7906 | let val = (self.0 >> 8usize) & 0x01; |
| 8209 | super::vals::Circ(val as u8) | 7907 | super::vals::Circ(val as u8) |
| 8210 | } | 7908 | } |
| 8211 | #[doc = "Circular mode"] | 7909 | #[doc = "Circular mode"] |
| 8212 | pub fn set_circ(&mut self, val: super::vals::Circ) { | 7910 | pub fn set_circ(&mut self, val: super::vals::Circ) { |
| 8213 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val.0 as u32) & 0x01) << 5usize); | 7911 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val.0 as u32) & 0x01) << 8usize); |
| 8214 | } | 7912 | } |
| 8215 | #[doc = "Peripheral increment mode"] | 7913 | #[doc = "Peripheral increment mode"] |
| 8216 | pub const fn pinc(&self) -> super::vals::Inc { | 7914 | pub const fn pinc(&self) -> super::vals::Inc { |
| 8217 | let val = (self.0 >> 6usize) & 0x01; | 7915 | let val = (self.0 >> 9usize) & 0x01; |
| 8218 | super::vals::Inc(val as u8) | 7916 | super::vals::Inc(val as u8) |
| 8219 | } | 7917 | } |
| 8220 | #[doc = "Peripheral increment mode"] | 7918 | #[doc = "Peripheral increment mode"] |
| 8221 | pub fn set_pinc(&mut self, val: super::vals::Inc) { | 7919 | pub fn set_pinc(&mut self, val: super::vals::Inc) { |
| 8222 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val.0 as u32) & 0x01) << 6usize); | 7920 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val.0 as u32) & 0x01) << 9usize); |
| 8223 | } | 7921 | } |
| 8224 | #[doc = "Memory increment mode"] | 7922 | #[doc = "Memory increment mode"] |
| 8225 | pub const fn minc(&self) -> super::vals::Inc { | 7923 | pub const fn minc(&self) -> super::vals::Inc { |
| 8226 | let val = (self.0 >> 7usize) & 0x01; | 7924 | let val = (self.0 >> 10usize) & 0x01; |
| 8227 | super::vals::Inc(val as u8) | 7925 | super::vals::Inc(val as u8) |
| 8228 | } | 7926 | } |
| 8229 | #[doc = "Memory increment mode"] | 7927 | #[doc = "Memory increment mode"] |
| 8230 | pub fn set_minc(&mut self, val: super::vals::Inc) { | 7928 | pub fn set_minc(&mut self, val: super::vals::Inc) { |
| 8231 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val.0 as u32) & 0x01) << 7usize); | 7929 | self.0 = (self.0 & !(0x01 << 10usize)) | (((val.0 as u32) & 0x01) << 10usize); |
| 8232 | } | 7930 | } |
| 8233 | #[doc = "Peripheral size"] | 7931 | #[doc = "Peripheral data size"] |
| 8234 | pub const fn psize(&self) -> super::vals::Size { | 7932 | pub const fn psize(&self) -> super::vals::Size { |
| 8235 | let val = (self.0 >> 8usize) & 0x03; | 7933 | let val = (self.0 >> 11usize) & 0x03; |
| 8236 | super::vals::Size(val as u8) | 7934 | super::vals::Size(val as u8) |
| 8237 | } | 7935 | } |
| 8238 | #[doc = "Peripheral size"] | 7936 | #[doc = "Peripheral data size"] |
| 8239 | pub fn set_psize(&mut self, val: super::vals::Size) { | 7937 | pub fn set_psize(&mut self, val: super::vals::Size) { |
| 8240 | self.0 = (self.0 & !(0x03 << 8usize)) | (((val.0 as u32) & 0x03) << 8usize); | 7938 | self.0 = (self.0 & !(0x03 << 11usize)) | (((val.0 as u32) & 0x03) << 11usize); |
| 8241 | } | 7939 | } |
| 8242 | #[doc = "Memory size"] | 7940 | #[doc = "Memory data size"] |
| 8243 | pub const fn msize(&self) -> super::vals::Size { | 7941 | pub const fn msize(&self) -> super::vals::Size { |
| 8244 | let val = (self.0 >> 10usize) & 0x03; | 7942 | let val = (self.0 >> 13usize) & 0x03; |
| 8245 | super::vals::Size(val as u8) | 7943 | super::vals::Size(val as u8) |
| 8246 | } | 7944 | } |
| 8247 | #[doc = "Memory size"] | 7945 | #[doc = "Memory data size"] |
| 8248 | pub fn set_msize(&mut self, val: super::vals::Size) { | 7946 | pub fn set_msize(&mut self, val: super::vals::Size) { |
| 8249 | self.0 = (self.0 & !(0x03 << 10usize)) | (((val.0 as u32) & 0x03) << 10usize); | 7947 | self.0 = (self.0 & !(0x03 << 13usize)) | (((val.0 as u32) & 0x03) << 13usize); |
| 8250 | } | 7948 | } |
| 8251 | #[doc = "Channel Priority level"] | 7949 | #[doc = "Peripheral increment offset size"] |
| 7950 | pub const fn pincos(&self) -> super::vals::Pincos { | ||
| 7951 | let val = (self.0 >> 15usize) & 0x01; | ||
| 7952 | super::vals::Pincos(val as u8) | ||
| 7953 | } | ||
| 7954 | #[doc = "Peripheral increment offset size"] | ||
| 7955 | pub fn set_pincos(&mut self, val: super::vals::Pincos) { | ||
| 7956 | self.0 = (self.0 & !(0x01 << 15usize)) | (((val.0 as u32) & 0x01) << 15usize); | ||
| 7957 | } | ||
| 7958 | #[doc = "Priority level"] | ||
| 8252 | pub const fn pl(&self) -> super::vals::Pl { | 7959 | pub const fn pl(&self) -> super::vals::Pl { |
| 8253 | let val = (self.0 >> 12usize) & 0x03; | 7960 | let val = (self.0 >> 16usize) & 0x03; |
| 8254 | super::vals::Pl(val as u8) | 7961 | super::vals::Pl(val as u8) |
| 8255 | } | 7962 | } |
| 8256 | #[doc = "Channel Priority level"] | 7963 | #[doc = "Priority level"] |
| 8257 | pub fn set_pl(&mut self, val: super::vals::Pl) { | 7964 | pub fn set_pl(&mut self, val: super::vals::Pl) { |
| 8258 | self.0 = (self.0 & !(0x03 << 12usize)) | (((val.0 as u32) & 0x03) << 12usize); | 7965 | self.0 = (self.0 & !(0x03 << 16usize)) | (((val.0 as u32) & 0x03) << 16usize); |
| 8259 | } | 7966 | } |
| 8260 | #[doc = "Memory to memory mode"] | 7967 | #[doc = "Double buffer mode"] |
| 8261 | pub const fn mem2mem(&self) -> super::vals::Memmem { | 7968 | pub const fn dbm(&self) -> super::vals::Dbm { |
| 8262 | let val = (self.0 >> 14usize) & 0x01; | 7969 | let val = (self.0 >> 18usize) & 0x01; |
| 8263 | super::vals::Memmem(val as u8) | 7970 | super::vals::Dbm(val as u8) |
| 8264 | } | 7971 | } |
| 8265 | #[doc = "Memory to memory mode"] | 7972 | #[doc = "Double buffer mode"] |
| 8266 | pub fn set_mem2mem(&mut self, val: super::vals::Memmem) { | 7973 | pub fn set_dbm(&mut self, val: super::vals::Dbm) { |
| 8267 | self.0 = (self.0 & !(0x01 << 14usize)) | (((val.0 as u32) & 0x01) << 14usize); | 7974 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val.0 as u32) & 0x01) << 18usize); |
| 7975 | } | ||
| 7976 | #[doc = "Current target (only in double buffer mode)"] | ||
| 7977 | pub const fn ct(&self) -> super::vals::Ct { | ||
| 7978 | let val = (self.0 >> 19usize) & 0x01; | ||
| 7979 | super::vals::Ct(val as u8) | ||
| 7980 | } | ||
| 7981 | #[doc = "Current target (only in double buffer mode)"] | ||
| 7982 | pub fn set_ct(&mut self, val: super::vals::Ct) { | ||
| 7983 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val.0 as u32) & 0x01) << 19usize); | ||
| 7984 | } | ||
| 7985 | #[doc = "Peripheral burst transfer configuration"] | ||
| 7986 | pub const fn pburst(&self) -> super::vals::Burst { | ||
| 7987 | let val = (self.0 >> 21usize) & 0x03; | ||
| 7988 | super::vals::Burst(val as u8) | ||
| 7989 | } | ||
| 7990 | #[doc = "Peripheral burst transfer configuration"] | ||
| 7991 | pub fn set_pburst(&mut self, val: super::vals::Burst) { | ||
| 7992 | self.0 = (self.0 & !(0x03 << 21usize)) | (((val.0 as u32) & 0x03) << 21usize); | ||
| 7993 | } | ||
| 7994 | #[doc = "Memory burst transfer configuration"] | ||
| 7995 | pub const fn mburst(&self) -> super::vals::Burst { | ||
| 7996 | let val = (self.0 >> 23usize) & 0x03; | ||
| 7997 | super::vals::Burst(val as u8) | ||
| 7998 | } | ||
| 7999 | #[doc = "Memory burst transfer configuration"] | ||
| 8000 | pub fn set_mburst(&mut self, val: super::vals::Burst) { | ||
| 8001 | self.0 = (self.0 & !(0x03 << 23usize)) | (((val.0 as u32) & 0x03) << 23usize); | ||
| 8002 | } | ||
| 8003 | #[doc = "Channel selection"] | ||
| 8004 | pub const fn chsel(&self) -> u8 { | ||
| 8005 | let val = (self.0 >> 25usize) & 0x0f; | ||
| 8006 | val as u8 | ||
| 8007 | } | ||
| 8008 | #[doc = "Channel selection"] | ||
| 8009 | pub fn set_chsel(&mut self, val: u8) { | ||
| 8010 | self.0 = (self.0 & !(0x0f << 25usize)) | (((val as u32) & 0x0f) << 25usize); | ||
| 8268 | } | 8011 | } |
| 8269 | } | 8012 | } |
| 8270 | impl Default for Cr { | 8013 | impl Default for Cr { |
| @@ -8272,24 +8015,80 @@ pub mod dma_v1 { | |||
| 8272 | Cr(0) | 8015 | Cr(0) |
| 8273 | } | 8016 | } |
| 8274 | } | 8017 | } |
| 8275 | #[doc = "DMA channel 1 number of data register"] | 8018 | #[doc = "low interrupt status register"] |
| 8276 | #[repr(transparent)] | 8019 | #[repr(transparent)] |
| 8277 | #[derive(Copy, Clone, Eq, PartialEq)] | 8020 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8278 | pub struct Ndtr(pub u32); | 8021 | pub struct Isr(pub u32); |
| 8279 | impl Ndtr { | 8022 | impl Isr { |
| 8280 | #[doc = "Number of data to transfer"] | 8023 | #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] |
| 8281 | pub const fn ndt(&self) -> u16 { | 8024 | pub fn feif(&self, n: usize) -> bool { |
| 8282 | let val = (self.0 >> 0usize) & 0xffff; | 8025 | assert!(n < 4usize); |
| 8283 | val as u16 | 8026 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); |
| 8027 | let val = (self.0 >> offs) & 0x01; | ||
| 8028 | val != 0 | ||
| 8284 | } | 8029 | } |
| 8285 | #[doc = "Number of data to transfer"] | 8030 | #[doc = "Stream x FIFO error interrupt flag (x=3..0)"] |
| 8286 | pub fn set_ndt(&mut self, val: u16) { | 8031 | pub fn set_feif(&mut self, n: usize, val: bool) { |
| 8287 | self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); | 8032 | assert!(n < 4usize); |
| 8033 | let offs = 0usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 8034 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8035 | } | ||
| 8036 | #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] | ||
| 8037 | pub fn dmeif(&self, n: usize) -> bool { | ||
| 8038 | assert!(n < 4usize); | ||
| 8039 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 8040 | let val = (self.0 >> offs) & 0x01; | ||
| 8041 | val != 0 | ||
| 8042 | } | ||
| 8043 | #[doc = "Stream x direct mode error interrupt flag (x=3..0)"] | ||
| 8044 | pub fn set_dmeif(&mut self, n: usize, val: bool) { | ||
| 8045 | assert!(n < 4usize); | ||
| 8046 | let offs = 2usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 8047 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8048 | } | ||
| 8049 | #[doc = "Stream x transfer error interrupt flag (x=3..0)"] | ||
| 8050 | pub fn teif(&self, n: usize) -> bool { | ||
| 8051 | assert!(n < 4usize); | ||
| 8052 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 8053 | let val = (self.0 >> offs) & 0x01; | ||
| 8054 | val != 0 | ||
| 8055 | } | ||
| 8056 | #[doc = "Stream x transfer error interrupt flag (x=3..0)"] | ||
| 8057 | pub fn set_teif(&mut self, n: usize, val: bool) { | ||
| 8058 | assert!(n < 4usize); | ||
| 8059 | let offs = 3usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 8060 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8061 | } | ||
| 8062 | #[doc = "Stream x half transfer interrupt flag (x=3..0)"] | ||
| 8063 | pub fn htif(&self, n: usize) -> bool { | ||
| 8064 | assert!(n < 4usize); | ||
| 8065 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 8066 | let val = (self.0 >> offs) & 0x01; | ||
| 8067 | val != 0 | ||
| 8068 | } | ||
| 8069 | #[doc = "Stream x half transfer interrupt flag (x=3..0)"] | ||
| 8070 | pub fn set_htif(&mut self, n: usize, val: bool) { | ||
| 8071 | assert!(n < 4usize); | ||
| 8072 | let offs = 4usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 8073 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8074 | } | ||
| 8075 | #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] | ||
| 8076 | pub fn tcif(&self, n: usize) -> bool { | ||
| 8077 | assert!(n < 4usize); | ||
| 8078 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 8079 | let val = (self.0 >> offs) & 0x01; | ||
| 8080 | val != 0 | ||
| 8081 | } | ||
| 8082 | #[doc = "Stream x transfer complete interrupt flag (x = 3..0)"] | ||
| 8083 | pub fn set_tcif(&mut self, n: usize, val: bool) { | ||
| 8084 | assert!(n < 4usize); | ||
| 8085 | let offs = 5usize + ([0usize, 6usize, 16usize, 22usize][n] as usize); | ||
| 8086 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8288 | } | 8087 | } |
| 8289 | } | 8088 | } |
| 8290 | impl Default for Ndtr { | 8089 | impl Default for Isr { |
| 8291 | fn default() -> Ndtr { | 8090 | fn default() -> Isr { |
| 8292 | Ndtr(0) | 8091 | Isr(0) |
| 8293 | } | 8092 | } |
| 8294 | } | 8093 | } |
| 8295 | } | 8094 | } |
| @@ -8297,806 +8096,1007 @@ pub mod dma_v1 { | |||
| 8297 | use crate::generic::*; | 8096 | use crate::generic::*; |
| 8298 | #[repr(transparent)] | 8097 | #[repr(transparent)] |
| 8299 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 8098 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 8300 | pub struct Dir(pub u8); | 8099 | pub struct Dmdis(pub u8); |
| 8301 | impl Dir { | 8100 | impl Dmdis { |
| 8302 | #[doc = "Read from peripheral"] | 8101 | #[doc = "Direct mode is enabled"] |
| 8303 | pub const FROMPERIPHERAL: Self = Self(0); | 8102 | pub const ENABLED: Self = Self(0); |
| 8304 | #[doc = "Read from memory"] | 8103 | #[doc = "Direct mode is disabled"] |
| 8305 | pub const FROMMEMORY: Self = Self(0x01); | 8104 | pub const DISABLED: Self = Self(0x01); |
| 8105 | } | ||
| 8106 | #[repr(transparent)] | ||
| 8107 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8108 | pub struct Size(pub u8); | ||
| 8109 | impl Size { | ||
| 8110 | #[doc = "Byte (8-bit)"] | ||
| 8111 | pub const BITS8: Self = Self(0); | ||
| 8112 | #[doc = "Half-word (16-bit)"] | ||
| 8113 | pub const BITS16: Self = Self(0x01); | ||
| 8114 | #[doc = "Word (32-bit)"] | ||
| 8115 | pub const BITS32: Self = Self(0x02); | ||
| 8116 | } | ||
| 8117 | #[repr(transparent)] | ||
| 8118 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8119 | pub struct Inc(pub u8); | ||
| 8120 | impl Inc { | ||
| 8121 | #[doc = "Address pointer is fixed"] | ||
| 8122 | pub const FIXED: Self = Self(0); | ||
| 8123 | #[doc = "Address pointer is incremented after each data transfer"] | ||
| 8124 | pub const INCREMENTED: Self = Self(0x01); | ||
| 8125 | } | ||
| 8126 | #[repr(transparent)] | ||
| 8127 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8128 | pub struct Pfctrl(pub u8); | ||
| 8129 | impl Pfctrl { | ||
| 8130 | #[doc = "The DMA is the flow controller"] | ||
| 8131 | pub const DMA: Self = Self(0); | ||
| 8132 | #[doc = "The peripheral is the flow controller"] | ||
| 8133 | pub const PERIPHERAL: Self = Self(0x01); | ||
| 8306 | } | 8134 | } |
| 8307 | #[repr(transparent)] | 8135 | #[repr(transparent)] |
| 8308 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 8136 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 8309 | pub struct Circ(pub u8); | 8137 | pub struct Circ(pub u8); |
| 8310 | impl Circ { | 8138 | impl Circ { |
| 8311 | #[doc = "Circular buffer disabled"] | 8139 | #[doc = "Circular mode disabled"] |
| 8312 | pub const DISABLED: Self = Self(0); | 8140 | pub const DISABLED: Self = Self(0); |
| 8313 | #[doc = "Circular buffer enabled"] | 8141 | #[doc = "Circular mode enabled"] |
| 8314 | pub const ENABLED: Self = Self(0x01); | 8142 | pub const ENABLED: Self = Self(0x01); |
| 8315 | } | 8143 | } |
| 8316 | #[repr(transparent)] | 8144 | #[repr(transparent)] |
| 8317 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 8145 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 8146 | pub struct Burst(pub u8); | ||
| 8147 | impl Burst { | ||
| 8148 | #[doc = "Single transfer"] | ||
| 8149 | pub const SINGLE: Self = Self(0); | ||
| 8150 | #[doc = "Incremental burst of 4 beats"] | ||
| 8151 | pub const INCR4: Self = Self(0x01); | ||
| 8152 | #[doc = "Incremental burst of 8 beats"] | ||
| 8153 | pub const INCR8: Self = Self(0x02); | ||
| 8154 | #[doc = "Incremental burst of 16 beats"] | ||
| 8155 | pub const INCR16: Self = Self(0x03); | ||
| 8156 | } | ||
| 8157 | #[repr(transparent)] | ||
| 8158 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8159 | pub struct Dir(pub u8); | ||
| 8160 | impl Dir { | ||
| 8161 | #[doc = "Peripheral-to-memory"] | ||
| 8162 | pub const PERIPHERALTOMEMORY: Self = Self(0); | ||
| 8163 | #[doc = "Memory-to-peripheral"] | ||
| 8164 | pub const MEMORYTOPERIPHERAL: Self = Self(0x01); | ||
| 8165 | #[doc = "Memory-to-memory"] | ||
| 8166 | pub const MEMORYTOMEMORY: Self = Self(0x02); | ||
| 8167 | } | ||
| 8168 | #[repr(transparent)] | ||
| 8169 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8318 | pub struct Pl(pub u8); | 8170 | pub struct Pl(pub u8); |
| 8319 | impl Pl { | 8171 | impl Pl { |
| 8320 | #[doc = "Low priority"] | 8172 | #[doc = "Low"] |
| 8321 | pub const LOW: Self = Self(0); | 8173 | pub const LOW: Self = Self(0); |
| 8322 | #[doc = "Medium priority"] | 8174 | #[doc = "Medium"] |
| 8323 | pub const MEDIUM: Self = Self(0x01); | 8175 | pub const MEDIUM: Self = Self(0x01); |
| 8324 | #[doc = "High priority"] | 8176 | #[doc = "High"] |
| 8325 | pub const HIGH: Self = Self(0x02); | 8177 | pub const HIGH: Self = Self(0x02); |
| 8326 | #[doc = "Very high priority"] | 8178 | #[doc = "Very high"] |
| 8327 | pub const VERYHIGH: Self = Self(0x03); | 8179 | pub const VERYHIGH: Self = Self(0x03); |
| 8328 | } | 8180 | } |
| 8329 | #[repr(transparent)] | 8181 | #[repr(transparent)] |
| 8330 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 8182 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 8331 | pub struct Inc(pub u8); | 8183 | pub struct Fs(pub u8); |
| 8332 | impl Inc { | 8184 | impl Fs { |
| 8333 | #[doc = "Increment mode disabled"] | 8185 | #[doc = "0 < fifo_level < 1/4"] |
| 8334 | pub const DISABLED: Self = Self(0); | 8186 | pub const QUARTER1: Self = Self(0); |
| 8335 | #[doc = "Increment mode enabled"] | 8187 | #[doc = "1/4 <= fifo_level < 1/2"] |
| 8336 | pub const ENABLED: Self = Self(0x01); | 8188 | pub const QUARTER2: Self = Self(0x01); |
| 8189 | #[doc = "1/2 <= fifo_level < 3/4"] | ||
| 8190 | pub const QUARTER3: Self = Self(0x02); | ||
| 8191 | #[doc = "3/4 <= fifo_level < full"] | ||
| 8192 | pub const QUARTER4: Self = Self(0x03); | ||
| 8193 | #[doc = "FIFO is empty"] | ||
| 8194 | pub const EMPTY: Self = Self(0x04); | ||
| 8195 | #[doc = "FIFO is full"] | ||
| 8196 | pub const FULL: Self = Self(0x05); | ||
| 8337 | } | 8197 | } |
| 8338 | #[repr(transparent)] | 8198 | #[repr(transparent)] |
| 8339 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 8199 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 8340 | pub struct Size(pub u8); | 8200 | pub struct Fth(pub u8); |
| 8341 | impl Size { | 8201 | impl Fth { |
| 8342 | #[doc = "8-bit size"] | 8202 | #[doc = "1/4 full FIFO"] |
| 8343 | pub const BITS8: Self = Self(0); | 8203 | pub const QUARTER: Self = Self(0); |
| 8344 | #[doc = "16-bit size"] | 8204 | #[doc = "1/2 full FIFO"] |
| 8345 | pub const BITS16: Self = Self(0x01); | 8205 | pub const HALF: Self = Self(0x01); |
| 8346 | #[doc = "32-bit size"] | 8206 | #[doc = "3/4 full FIFO"] |
| 8347 | pub const BITS32: Self = Self(0x02); | 8207 | pub const THREEQUARTERS: Self = Self(0x02); |
| 8208 | #[doc = "Full FIFO"] | ||
| 8209 | pub const FULL: Self = Self(0x03); | ||
| 8348 | } | 8210 | } |
| 8349 | #[repr(transparent)] | 8211 | #[repr(transparent)] |
| 8350 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | 8212 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] |
| 8351 | pub struct Memmem(pub u8); | 8213 | pub struct Pincos(pub u8); |
| 8352 | impl Memmem { | 8214 | impl Pincos { |
| 8353 | #[doc = "Memory to memory mode disabled"] | 8215 | #[doc = "The offset size for the peripheral address calculation is linked to the PSIZE"] |
| 8216 | pub const PSIZE: Self = Self(0); | ||
| 8217 | #[doc = "The offset size for the peripheral address calculation is fixed to 4 (32-bit alignment)"] | ||
| 8218 | pub const FIXED4: Self = Self(0x01); | ||
| 8219 | } | ||
| 8220 | #[repr(transparent)] | ||
| 8221 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8222 | pub struct Ct(pub u8); | ||
| 8223 | impl Ct { | ||
| 8224 | #[doc = "The current target memory is Memory 0"] | ||
| 8225 | pub const MEMORY0: Self = Self(0); | ||
| 8226 | #[doc = "The current target memory is Memory 1"] | ||
| 8227 | pub const MEMORY1: Self = Self(0x01); | ||
| 8228 | } | ||
| 8229 | #[repr(transparent)] | ||
| 8230 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8231 | pub struct Dbm(pub u8); | ||
| 8232 | impl Dbm { | ||
| 8233 | #[doc = "No buffer switching at the end of transfer"] | ||
| 8354 | pub const DISABLED: Self = Self(0); | 8234 | pub const DISABLED: Self = Self(0); |
| 8355 | #[doc = "Memory to memory mode enabled"] | 8235 | #[doc = "Memory target switched at the end of the DMA transfer"] |
| 8356 | pub const ENABLED: Self = Self(0x01); | 8236 | pub const ENABLED: Self = Self(0x01); |
| 8357 | } | 8237 | } |
| 8358 | } | 8238 | } |
| 8359 | } | 8239 | } |
| 8360 | pub mod gpio_v1 { | 8240 | pub mod syscfg_h7 { |
| 8361 | use crate::generic::*; | 8241 | use crate::generic::*; |
| 8362 | #[doc = "General purpose I/O"] | 8242 | #[doc = "System configuration controller"] |
| 8363 | #[derive(Copy, Clone)] | 8243 | #[derive(Copy, Clone)] |
| 8364 | pub struct Gpio(pub *mut u8); | 8244 | pub struct Syscfg(pub *mut u8); |
| 8365 | unsafe impl Send for Gpio {} | 8245 | unsafe impl Send for Syscfg {} |
| 8366 | unsafe impl Sync for Gpio {} | 8246 | unsafe impl Sync for Syscfg {} |
| 8367 | impl Gpio { | 8247 | impl Syscfg { |
| 8368 | #[doc = "Port configuration register low (GPIOn_CRL)"] | 8248 | #[doc = "peripheral mode configuration register"] |
| 8369 | pub fn cr(self, n: usize) -> Reg<regs::Cr, RW> { | 8249 | pub fn pmcr(self) -> Reg<regs::Pmcr, RW> { |
| 8370 | assert!(n < 2usize); | 8250 | unsafe { Reg::from_ptr(self.0.add(4usize)) } |
| 8371 | unsafe { Reg::from_ptr(self.0.add(0usize + n * 4usize)) } | ||
| 8372 | } | 8251 | } |
| 8373 | #[doc = "Port input data register (GPIOn_IDR)"] | 8252 | #[doc = "external interrupt configuration register 1"] |
| 8374 | pub fn idr(self) -> Reg<regs::Idr, R> { | 8253 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { |
| 8375 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 8254 | assert!(n < 4usize); |
| 8255 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 8376 | } | 8256 | } |
| 8377 | #[doc = "Port output data register (GPIOn_ODR)"] | 8257 | #[doc = "compensation cell control/status register"] |
| 8378 | pub fn odr(self) -> Reg<regs::Odr, RW> { | 8258 | pub fn cccsr(self) -> Reg<regs::Cccsr, RW> { |
| 8379 | unsafe { Reg::from_ptr(self.0.add(12usize)) } | 8259 | unsafe { Reg::from_ptr(self.0.add(32usize)) } |
| 8380 | } | 8260 | } |
| 8381 | #[doc = "Port bit set/reset register (GPIOn_BSRR)"] | 8261 | #[doc = "SYSCFG compensation cell value register"] |
| 8382 | pub fn bsrr(self) -> Reg<regs::Bsrr, W> { | 8262 | pub fn ccvr(self) -> Reg<regs::Ccvr, R> { |
| 8383 | unsafe { Reg::from_ptr(self.0.add(16usize)) } | 8263 | unsafe { Reg::from_ptr(self.0.add(36usize)) } |
| 8384 | } | 8264 | } |
| 8385 | #[doc = "Port bit reset register (GPIOn_BRR)"] | 8265 | #[doc = "SYSCFG compensation cell code register"] |
| 8386 | pub fn brr(self) -> Reg<regs::Brr, W> { | 8266 | pub fn cccr(self) -> Reg<regs::Cccr, RW> { |
| 8387 | unsafe { Reg::from_ptr(self.0.add(20usize)) } | 8267 | unsafe { Reg::from_ptr(self.0.add(40usize)) } |
| 8388 | } | 8268 | } |
| 8389 | #[doc = "Port configuration lock register"] | 8269 | #[doc = "SYSCFG power control register"] |
| 8390 | pub fn lckr(self) -> Reg<regs::Lckr, RW> { | 8270 | pub fn pwrcr(self) -> Reg<regs::Pwrcr, RW> { |
| 8391 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | 8271 | unsafe { Reg::from_ptr(self.0.add(44usize)) } |
| 8272 | } | ||
| 8273 | #[doc = "SYSCFG package register"] | ||
| 8274 | pub fn pkgr(self) -> Reg<regs::Pkgr, R> { | ||
| 8275 | unsafe { Reg::from_ptr(self.0.add(292usize)) } | ||
| 8276 | } | ||
| 8277 | #[doc = "SYSCFG user register 0"] | ||
| 8278 | pub fn ur0(self) -> Reg<regs::Ur0, R> { | ||
| 8279 | unsafe { Reg::from_ptr(self.0.add(768usize)) } | ||
| 8280 | } | ||
| 8281 | #[doc = "SYSCFG user register 2"] | ||
| 8282 | pub fn ur2(self) -> Reg<regs::Ur2, RW> { | ||
| 8283 | unsafe { Reg::from_ptr(self.0.add(776usize)) } | ||
| 8284 | } | ||
| 8285 | #[doc = "SYSCFG user register 3"] | ||
| 8286 | pub fn ur3(self) -> Reg<regs::Ur3, RW> { | ||
| 8287 | unsafe { Reg::from_ptr(self.0.add(780usize)) } | ||
| 8288 | } | ||
| 8289 | #[doc = "SYSCFG user register 4"] | ||
| 8290 | pub fn ur4(self) -> Reg<regs::Ur4, R> { | ||
| 8291 | unsafe { Reg::from_ptr(self.0.add(784usize)) } | ||
| 8292 | } | ||
| 8293 | #[doc = "SYSCFG user register 5"] | ||
| 8294 | pub fn ur5(self) -> Reg<regs::Ur5, R> { | ||
| 8295 | unsafe { Reg::from_ptr(self.0.add(788usize)) } | ||
| 8296 | } | ||
| 8297 | #[doc = "SYSCFG user register 6"] | ||
| 8298 | pub fn ur6(self) -> Reg<regs::Ur6, R> { | ||
| 8299 | unsafe { Reg::from_ptr(self.0.add(792usize)) } | ||
| 8300 | } | ||
| 8301 | #[doc = "SYSCFG user register 7"] | ||
| 8302 | pub fn ur7(self) -> Reg<regs::Ur7, R> { | ||
| 8303 | unsafe { Reg::from_ptr(self.0.add(796usize)) } | ||
| 8304 | } | ||
| 8305 | #[doc = "SYSCFG user register 8"] | ||
| 8306 | pub fn ur8(self) -> Reg<regs::Ur8, R> { | ||
| 8307 | unsafe { Reg::from_ptr(self.0.add(800usize)) } | ||
| 8308 | } | ||
| 8309 | #[doc = "SYSCFG user register 9"] | ||
| 8310 | pub fn ur9(self) -> Reg<regs::Ur9, R> { | ||
| 8311 | unsafe { Reg::from_ptr(self.0.add(804usize)) } | ||
| 8312 | } | ||
| 8313 | #[doc = "SYSCFG user register 10"] | ||
| 8314 | pub fn ur10(self) -> Reg<regs::Ur10, R> { | ||
| 8315 | unsafe { Reg::from_ptr(self.0.add(808usize)) } | ||
| 8316 | } | ||
| 8317 | #[doc = "SYSCFG user register 11"] | ||
| 8318 | pub fn ur11(self) -> Reg<regs::Ur11, R> { | ||
| 8319 | unsafe { Reg::from_ptr(self.0.add(812usize)) } | ||
| 8320 | } | ||
| 8321 | #[doc = "SYSCFG user register 12"] | ||
| 8322 | pub fn ur12(self) -> Reg<regs::Ur12, R> { | ||
| 8323 | unsafe { Reg::from_ptr(self.0.add(816usize)) } | ||
| 8324 | } | ||
| 8325 | #[doc = "SYSCFG user register 13"] | ||
| 8326 | pub fn ur13(self) -> Reg<regs::Ur13, R> { | ||
| 8327 | unsafe { Reg::from_ptr(self.0.add(820usize)) } | ||
| 8328 | } | ||
| 8329 | #[doc = "SYSCFG user register 14"] | ||
| 8330 | pub fn ur14(self) -> Reg<regs::Ur14, RW> { | ||
| 8331 | unsafe { Reg::from_ptr(self.0.add(824usize)) } | ||
| 8332 | } | ||
| 8333 | #[doc = "SYSCFG user register 15"] | ||
| 8334 | pub fn ur15(self) -> Reg<regs::Ur15, R> { | ||
| 8335 | unsafe { Reg::from_ptr(self.0.add(828usize)) } | ||
| 8336 | } | ||
| 8337 | #[doc = "SYSCFG user register 16"] | ||
| 8338 | pub fn ur16(self) -> Reg<regs::Ur16, R> { | ||
| 8339 | unsafe { Reg::from_ptr(self.0.add(832usize)) } | ||
| 8340 | } | ||
| 8341 | #[doc = "SYSCFG user register 17"] | ||
| 8342 | pub fn ur17(self) -> Reg<regs::Ur17, R> { | ||
| 8343 | unsafe { Reg::from_ptr(self.0.add(836usize)) } | ||
| 8392 | } | 8344 | } |
| 8393 | } | 8345 | } |
| 8394 | pub mod regs { | 8346 | pub mod regs { |
| 8395 | use crate::generic::*; | 8347 | use crate::generic::*; |
| 8396 | #[doc = "Port input data register (GPIOn_IDR)"] | 8348 | #[doc = "SYSCFG user register 16"] |
| 8397 | #[repr(transparent)] | 8349 | #[repr(transparent)] |
| 8398 | #[derive(Copy, Clone, Eq, PartialEq)] | 8350 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8399 | pub struct Idr(pub u32); | 8351 | pub struct Ur16(pub u32); |
| 8400 | impl Idr { | 8352 | impl Ur16 { |
| 8401 | #[doc = "Port input data"] | 8353 | #[doc = "Freeze independent watchdog in Stop mode"] |
| 8402 | pub fn idr(&self, n: usize) -> super::vals::Idr { | 8354 | pub const fn fziwdgstp(&self) -> bool { |
| 8403 | assert!(n < 16usize); | 8355 | let val = (self.0 >> 0usize) & 0x01; |
| 8404 | let offs = 0usize + n * 1usize; | 8356 | val != 0 |
| 8405 | let val = (self.0 >> offs) & 0x01; | ||
| 8406 | super::vals::Idr(val as u8) | ||
| 8407 | } | 8357 | } |
| 8408 | #[doc = "Port input data"] | 8358 | #[doc = "Freeze independent watchdog in Stop mode"] |
| 8409 | pub fn set_idr(&mut self, n: usize, val: super::vals::Idr) { | 8359 | pub fn set_fziwdgstp(&mut self, val: bool) { |
| 8410 | assert!(n < 16usize); | 8360 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 8411 | let offs = 0usize + n * 1usize; | 8361 | } |
| 8412 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | 8362 | #[doc = "Private key programmed"] |
| 8363 | pub const fn pkp(&self) -> bool { | ||
| 8364 | let val = (self.0 >> 16usize) & 0x01; | ||
| 8365 | val != 0 | ||
| 8366 | } | ||
| 8367 | #[doc = "Private key programmed"] | ||
| 8368 | pub fn set_pkp(&mut self, val: bool) { | ||
| 8369 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 8413 | } | 8370 | } |
| 8414 | } | 8371 | } |
| 8415 | impl Default for Idr { | 8372 | impl Default for Ur16 { |
| 8416 | fn default() -> Idr { | 8373 | fn default() -> Ur16 { |
| 8417 | Idr(0) | 8374 | Ur16(0) |
| 8418 | } | 8375 | } |
| 8419 | } | 8376 | } |
| 8420 | #[doc = "Port bit reset register (GPIOn_BRR)"] | 8377 | #[doc = "SYSCFG user register 0"] |
| 8421 | #[repr(transparent)] | 8378 | #[repr(transparent)] |
| 8422 | #[derive(Copy, Clone, Eq, PartialEq)] | 8379 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8423 | pub struct Brr(pub u32); | 8380 | pub struct Ur0(pub u32); |
| 8424 | impl Brr { | 8381 | impl Ur0 { |
| 8425 | #[doc = "Reset bit"] | 8382 | #[doc = "Bank Swap"] |
| 8426 | pub fn br(&self, n: usize) -> bool { | 8383 | pub const fn bks(&self) -> bool { |
| 8427 | assert!(n < 16usize); | 8384 | let val = (self.0 >> 0usize) & 0x01; |
| 8428 | let offs = 0usize + n * 1usize; | ||
| 8429 | let val = (self.0 >> offs) & 0x01; | ||
| 8430 | val != 0 | 8385 | val != 0 |
| 8431 | } | 8386 | } |
| 8432 | #[doc = "Reset bit"] | 8387 | #[doc = "Bank Swap"] |
| 8433 | pub fn set_br(&mut self, n: usize, val: bool) { | 8388 | pub fn set_bks(&mut self, val: bool) { |
| 8434 | assert!(n < 16usize); | 8389 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 8435 | let offs = 0usize + n * 1usize; | 8390 | } |
| 8436 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 8391 | #[doc = "Readout protection"] |
| 8392 | pub const fn rdp(&self) -> u8 { | ||
| 8393 | let val = (self.0 >> 16usize) & 0xff; | ||
| 8394 | val as u8 | ||
| 8395 | } | ||
| 8396 | #[doc = "Readout protection"] | ||
| 8397 | pub fn set_rdp(&mut self, val: u8) { | ||
| 8398 | self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); | ||
| 8437 | } | 8399 | } |
| 8438 | } | 8400 | } |
| 8439 | impl Default for Brr { | 8401 | impl Default for Ur0 { |
| 8440 | fn default() -> Brr { | 8402 | fn default() -> Ur0 { |
| 8441 | Brr(0) | 8403 | Ur0(0) |
| 8442 | } | 8404 | } |
| 8443 | } | 8405 | } |
| 8444 | #[doc = "Port output data register (GPIOn_ODR)"] | 8406 | #[doc = "SYSCFG compensation cell value register"] |
| 8445 | #[repr(transparent)] | 8407 | #[repr(transparent)] |
| 8446 | #[derive(Copy, Clone, Eq, PartialEq)] | 8408 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8447 | pub struct Odr(pub u32); | 8409 | pub struct Ccvr(pub u32); |
| 8448 | impl Odr { | 8410 | impl Ccvr { |
| 8449 | #[doc = "Port output data"] | 8411 | #[doc = "NMOS compensation value"] |
| 8450 | pub fn odr(&self, n: usize) -> super::vals::Odr { | 8412 | pub const fn ncv(&self) -> u8 { |
| 8451 | assert!(n < 16usize); | 8413 | let val = (self.0 >> 0usize) & 0x0f; |
| 8452 | let offs = 0usize + n * 1usize; | 8414 | val as u8 |
| 8453 | let val = (self.0 >> offs) & 0x01; | ||
| 8454 | super::vals::Odr(val as u8) | ||
| 8455 | } | 8415 | } |
| 8456 | #[doc = "Port output data"] | 8416 | #[doc = "NMOS compensation value"] |
| 8457 | pub fn set_odr(&mut self, n: usize, val: super::vals::Odr) { | 8417 | pub fn set_ncv(&mut self, val: u8) { |
| 8458 | assert!(n < 16usize); | 8418 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 8459 | let offs = 0usize + n * 1usize; | 8419 | } |
| 8460 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | 8420 | #[doc = "PMOS compensation value"] |
| 8421 | pub const fn pcv(&self) -> u8 { | ||
| 8422 | let val = (self.0 >> 4usize) & 0x0f; | ||
| 8423 | val as u8 | ||
| 8424 | } | ||
| 8425 | #[doc = "PMOS compensation value"] | ||
| 8426 | pub fn set_pcv(&mut self, val: u8) { | ||
| 8427 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); | ||
| 8461 | } | 8428 | } |
| 8462 | } | 8429 | } |
| 8463 | impl Default for Odr { | 8430 | impl Default for Ccvr { |
| 8464 | fn default() -> Odr { | 8431 | fn default() -> Ccvr { |
| 8465 | Odr(0) | 8432 | Ccvr(0) |
| 8466 | } | 8433 | } |
| 8467 | } | 8434 | } |
| 8468 | #[doc = "Port configuration register (GPIOn_CRx)"] | 8435 | #[doc = "SYSCFG user register 7"] |
| 8469 | #[repr(transparent)] | 8436 | #[repr(transparent)] |
| 8470 | #[derive(Copy, Clone, Eq, PartialEq)] | 8437 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8471 | pub struct Cr(pub u32); | 8438 | pub struct Ur7(pub u32); |
| 8472 | impl Cr { | 8439 | impl Ur7 { |
| 8473 | #[doc = "Port n mode bits"] | 8440 | #[doc = "Secured area start address for bank 1"] |
| 8474 | pub fn mode(&self, n: usize) -> super::vals::Mode { | 8441 | pub const fn sa_beg_1(&self) -> u16 { |
| 8475 | assert!(n < 8usize); | 8442 | let val = (self.0 >> 0usize) & 0x0fff; |
| 8476 | let offs = 0usize + n * 4usize; | 8443 | val as u16 |
| 8477 | let val = (self.0 >> offs) & 0x03; | ||
| 8478 | super::vals::Mode(val as u8) | ||
| 8479 | } | 8444 | } |
| 8480 | #[doc = "Port n mode bits"] | 8445 | #[doc = "Secured area start address for bank 1"] |
| 8481 | pub fn set_mode(&mut self, n: usize, val: super::vals::Mode) { | 8446 | pub fn set_sa_beg_1(&mut self, val: u16) { |
| 8482 | assert!(n < 8usize); | 8447 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); |
| 8483 | let offs = 0usize + n * 4usize; | ||
| 8484 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 8485 | } | 8448 | } |
| 8486 | #[doc = "Port n configuration bits"] | 8449 | #[doc = "Secured area end address for bank 1"] |
| 8487 | pub fn cnf(&self, n: usize) -> super::vals::Cnf { | 8450 | pub const fn sa_end_1(&self) -> u16 { |
| 8488 | assert!(n < 8usize); | 8451 | let val = (self.0 >> 16usize) & 0x0fff; |
| 8489 | let offs = 2usize + n * 4usize; | 8452 | val as u16 |
| 8490 | let val = (self.0 >> offs) & 0x03; | ||
| 8491 | super::vals::Cnf(val as u8) | ||
| 8492 | } | 8453 | } |
| 8493 | #[doc = "Port n configuration bits"] | 8454 | #[doc = "Secured area end address for bank 1"] |
| 8494 | pub fn set_cnf(&mut self, n: usize, val: super::vals::Cnf) { | 8455 | pub fn set_sa_end_1(&mut self, val: u16) { |
| 8495 | assert!(n < 8usize); | 8456 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); |
| 8496 | let offs = 2usize + n * 4usize; | ||
| 8497 | self.0 = (self.0 & !(0x03 << offs)) | (((val.0 as u32) & 0x03) << offs); | ||
| 8498 | } | 8457 | } |
| 8499 | } | 8458 | } |
| 8500 | impl Default for Cr { | 8459 | impl Default for Ur7 { |
| 8501 | fn default() -> Cr { | 8460 | fn default() -> Ur7 { |
| 8502 | Cr(0) | 8461 | Ur7(0) |
| 8503 | } | 8462 | } |
| 8504 | } | 8463 | } |
| 8505 | #[doc = "Port bit set/reset register (GPIOn_BSRR)"] | 8464 | #[doc = "SYSCFG user register 13"] |
| 8506 | #[repr(transparent)] | 8465 | #[repr(transparent)] |
| 8507 | #[derive(Copy, Clone, Eq, PartialEq)] | 8466 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8508 | pub struct Bsrr(pub u32); | 8467 | pub struct Ur13(pub u32); |
| 8509 | impl Bsrr { | 8468 | impl Ur13 { |
| 8510 | #[doc = "Set bit"] | 8469 | #[doc = "Secured DTCM RAM Size"] |
| 8511 | pub fn bs(&self, n: usize) -> bool { | 8470 | pub const fn sdrs(&self) -> u8 { |
| 8512 | assert!(n < 16usize); | 8471 | let val = (self.0 >> 0usize) & 0x03; |
| 8513 | let offs = 0usize + n * 1usize; | 8472 | val as u8 |
| 8514 | let val = (self.0 >> offs) & 0x01; | ||
| 8515 | val != 0 | ||
| 8516 | } | 8473 | } |
| 8517 | #[doc = "Set bit"] | 8474 | #[doc = "Secured DTCM RAM Size"] |
| 8518 | pub fn set_bs(&mut self, n: usize, val: bool) { | 8475 | pub fn set_sdrs(&mut self, val: u8) { |
| 8519 | assert!(n < 16usize); | 8476 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); |
| 8520 | let offs = 0usize + n * 1usize; | ||
| 8521 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8522 | } | 8477 | } |
| 8523 | #[doc = "Reset bit"] | 8478 | #[doc = "D1 Standby reset"] |
| 8524 | pub fn br(&self, n: usize) -> bool { | 8479 | pub const fn d1sbrst(&self) -> bool { |
| 8525 | assert!(n < 16usize); | 8480 | let val = (self.0 >> 16usize) & 0x01; |
| 8526 | let offs = 16usize + n * 1usize; | ||
| 8527 | let val = (self.0 >> offs) & 0x01; | ||
| 8528 | val != 0 | 8481 | val != 0 |
| 8529 | } | 8482 | } |
| 8530 | #[doc = "Reset bit"] | 8483 | #[doc = "D1 Standby reset"] |
| 8531 | pub fn set_br(&mut self, n: usize, val: bool) { | 8484 | pub fn set_d1sbrst(&mut self, val: bool) { |
| 8532 | assert!(n < 16usize); | 8485 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 8533 | let offs = 16usize + n * 1usize; | ||
| 8534 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | ||
| 8535 | } | 8486 | } |
| 8536 | } | 8487 | } |
| 8537 | impl Default for Bsrr { | 8488 | impl Default for Ur13 { |
| 8538 | fn default() -> Bsrr { | 8489 | fn default() -> Ur13 { |
| 8539 | Bsrr(0) | 8490 | Ur13(0) |
| 8540 | } | 8491 | } |
| 8541 | } | 8492 | } |
| 8542 | #[doc = "Port configuration lock register"] | 8493 | #[doc = "SYSCFG user register 4"] |
| 8543 | #[repr(transparent)] | 8494 | #[repr(transparent)] |
| 8544 | #[derive(Copy, Clone, Eq, PartialEq)] | 8495 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8545 | pub struct Lckr(pub u32); | 8496 | pub struct Ur4(pub u32); |
| 8546 | impl Lckr { | 8497 | impl Ur4 { |
| 8547 | #[doc = "Port A Lock bit"] | 8498 | #[doc = "Mass Erase Protected Area Disabled for bank 1"] |
| 8548 | pub fn lck(&self, n: usize) -> super::vals::Lck { | 8499 | pub const fn mepad_1(&self) -> bool { |
| 8549 | assert!(n < 16usize); | ||
| 8550 | let offs = 0usize + n * 1usize; | ||
| 8551 | let val = (self.0 >> offs) & 0x01; | ||
| 8552 | super::vals::Lck(val as u8) | ||
| 8553 | } | ||
| 8554 | #[doc = "Port A Lock bit"] | ||
| 8555 | pub fn set_lck(&mut self, n: usize, val: super::vals::Lck) { | ||
| 8556 | assert!(n < 16usize); | ||
| 8557 | let offs = 0usize + n * 1usize; | ||
| 8558 | self.0 = (self.0 & !(0x01 << offs)) | (((val.0 as u32) & 0x01) << offs); | ||
| 8559 | } | ||
| 8560 | #[doc = "Lock key"] | ||
| 8561 | pub const fn lckk(&self) -> super::vals::Lckk { | ||
| 8562 | let val = (self.0 >> 16usize) & 0x01; | 8500 | let val = (self.0 >> 16usize) & 0x01; |
| 8563 | super::vals::Lckk(val as u8) | 8501 | val != 0 |
| 8564 | } | 8502 | } |
| 8565 | #[doc = "Lock key"] | 8503 | #[doc = "Mass Erase Protected Area Disabled for bank 1"] |
| 8566 | pub fn set_lckk(&mut self, val: super::vals::Lckk) { | 8504 | pub fn set_mepad_1(&mut self, val: bool) { |
| 8567 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val.0 as u32) & 0x01) << 16usize); | 8505 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 8568 | } | 8506 | } |
| 8569 | } | 8507 | } |
| 8570 | impl Default for Lckr { | 8508 | impl Default for Ur4 { |
| 8571 | fn default() -> Lckr { | 8509 | fn default() -> Ur4 { |
| 8572 | Lckr(0) | 8510 | Ur4(0) |
| 8573 | } | 8511 | } |
| 8574 | } | 8512 | } |
| 8575 | } | 8513 | #[doc = "SYSCFG user register 10"] |
| 8576 | pub mod vals { | ||
| 8577 | use crate::generic::*; | ||
| 8578 | #[repr(transparent)] | ||
| 8579 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8580 | pub struct Cnf(pub u8); | ||
| 8581 | impl Cnf { | ||
| 8582 | #[doc = "Analog mode / Push-Pull mode"] | ||
| 8583 | pub const PUSHPULL: Self = Self(0); | ||
| 8584 | #[doc = "Floating input (reset state) / Open Drain-Mode"] | ||
| 8585 | pub const OPENDRAIN: Self = Self(0x01); | ||
| 8586 | #[doc = "Input with pull-up/pull-down / Alternate Function Push-Pull Mode"] | ||
| 8587 | pub const ALTPUSHPULL: Self = Self(0x02); | ||
| 8588 | #[doc = "Alternate Function Open-Drain Mode"] | ||
| 8589 | pub const ALTOPENDRAIN: Self = Self(0x03); | ||
| 8590 | } | ||
| 8591 | #[repr(transparent)] | ||
| 8592 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8593 | pub struct Lck(pub u8); | ||
| 8594 | impl Lck { | ||
| 8595 | #[doc = "Port configuration not locked"] | ||
| 8596 | pub const UNLOCKED: Self = Self(0); | ||
| 8597 | #[doc = "Port configuration locked"] | ||
| 8598 | pub const LOCKED: Self = Self(0x01); | ||
| 8599 | } | ||
| 8600 | #[repr(transparent)] | ||
| 8601 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8602 | pub struct Odr(pub u8); | ||
| 8603 | impl Odr { | ||
| 8604 | #[doc = "Set output to logic low"] | ||
| 8605 | pub const LOW: Self = Self(0); | ||
| 8606 | #[doc = "Set output to logic high"] | ||
| 8607 | pub const HIGH: Self = Self(0x01); | ||
| 8608 | } | ||
| 8609 | #[repr(transparent)] | ||
| 8610 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8611 | pub struct Mode(pub u8); | ||
| 8612 | impl Mode { | ||
| 8613 | #[doc = "Input mode (reset state)"] | ||
| 8614 | pub const INPUT: Self = Self(0); | ||
| 8615 | #[doc = "Output mode 10 MHz"] | ||
| 8616 | pub const OUTPUT: Self = Self(0x01); | ||
| 8617 | #[doc = "Output mode 2 MHz"] | ||
| 8618 | pub const OUTPUT2: Self = Self(0x02); | ||
| 8619 | #[doc = "Output mode 50 MHz"] | ||
| 8620 | pub const OUTPUT50: Self = Self(0x03); | ||
| 8621 | } | ||
| 8622 | #[repr(transparent)] | ||
| 8623 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8624 | pub struct Idr(pub u8); | ||
| 8625 | impl Idr { | ||
| 8626 | #[doc = "Input is logic low"] | ||
| 8627 | pub const LOW: Self = Self(0); | ||
| 8628 | #[doc = "Input is logic high"] | ||
| 8629 | pub const HIGH: Self = Self(0x01); | ||
| 8630 | } | ||
| 8631 | #[repr(transparent)] | ||
| 8632 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8633 | pub struct Brw(pub u8); | ||
| 8634 | impl Brw { | ||
| 8635 | #[doc = "No action on the corresponding ODx bit"] | ||
| 8636 | pub const NOACTION: Self = Self(0); | ||
| 8637 | #[doc = "Reset the ODx bit"] | ||
| 8638 | pub const RESET: Self = Self(0x01); | ||
| 8639 | } | ||
| 8640 | #[repr(transparent)] | ||
| 8641 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8642 | pub struct Lckk(pub u8); | ||
| 8643 | impl Lckk { | ||
| 8644 | #[doc = "Port configuration lock key not active"] | ||
| 8645 | pub const NOTACTIVE: Self = Self(0); | ||
| 8646 | #[doc = "Port configuration lock key active"] | ||
| 8647 | pub const ACTIVE: Self = Self(0x01); | ||
| 8648 | } | ||
| 8649 | #[repr(transparent)] | ||
| 8650 | #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] | ||
| 8651 | pub struct Bsw(pub u8); | ||
| 8652 | impl Bsw { | ||
| 8653 | #[doc = "No action on the corresponding ODx bit"] | ||
| 8654 | pub const NOACTION: Self = Self(0); | ||
| 8655 | #[doc = "Sets the corresponding ODRx bit"] | ||
| 8656 | pub const SET: Self = Self(0x01); | ||
| 8657 | } | ||
| 8658 | } | ||
| 8659 | } | ||
| 8660 | pub mod syscfg_l4 { | ||
| 8661 | use crate::generic::*; | ||
| 8662 | #[doc = "System configuration controller"] | ||
| 8663 | #[derive(Copy, Clone)] | ||
| 8664 | pub struct Syscfg(pub *mut u8); | ||
| 8665 | unsafe impl Send for Syscfg {} | ||
| 8666 | unsafe impl Sync for Syscfg {} | ||
| 8667 | impl Syscfg { | ||
| 8668 | #[doc = "memory remap register"] | ||
| 8669 | pub fn memrmp(self) -> Reg<regs::Memrmp, RW> { | ||
| 8670 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | ||
| 8671 | } | ||
| 8672 | #[doc = "configuration register 1"] | ||
| 8673 | pub fn cfgr1(self) -> Reg<regs::Cfgr1, RW> { | ||
| 8674 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | ||
| 8675 | } | ||
| 8676 | #[doc = "external interrupt configuration register 1"] | ||
| 8677 | pub fn exticr(self, n: usize) -> Reg<regs::Exticr, RW> { | ||
| 8678 | assert!(n < 4usize); | ||
| 8679 | unsafe { Reg::from_ptr(self.0.add(8usize + n * 4usize)) } | ||
| 8680 | } | ||
| 8681 | #[doc = "SCSR"] | ||
| 8682 | pub fn scsr(self) -> Reg<regs::Scsr, RW> { | ||
| 8683 | unsafe { Reg::from_ptr(self.0.add(24usize)) } | ||
| 8684 | } | ||
| 8685 | #[doc = "CFGR2"] | ||
| 8686 | pub fn cfgr2(self) -> Reg<regs::Cfgr2, RW> { | ||
| 8687 | unsafe { Reg::from_ptr(self.0.add(28usize)) } | ||
| 8688 | } | ||
| 8689 | #[doc = "SWPR"] | ||
| 8690 | pub fn swpr(self) -> Reg<regs::Swpr, W> { | ||
| 8691 | unsafe { Reg::from_ptr(self.0.add(32usize)) } | ||
| 8692 | } | ||
| 8693 | #[doc = "SKR"] | ||
| 8694 | pub fn skr(self) -> Reg<regs::Skr, W> { | ||
| 8695 | unsafe { Reg::from_ptr(self.0.add(36usize)) } | ||
| 8696 | } | ||
| 8697 | } | ||
| 8698 | pub mod regs { | ||
| 8699 | use crate::generic::*; | ||
| 8700 | #[doc = "SKR"] | ||
| 8701 | #[repr(transparent)] | 8514 | #[repr(transparent)] |
| 8702 | #[derive(Copy, Clone, Eq, PartialEq)] | 8515 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8703 | pub struct Skr(pub u32); | 8516 | pub struct Ur10(pub u32); |
| 8704 | impl Skr { | 8517 | impl Ur10 { |
| 8705 | #[doc = "SRAM2 write protection key for software erase"] | 8518 | #[doc = "Protected area end address for bank 2"] |
| 8706 | pub const fn key(&self) -> u8 { | 8519 | pub const fn pa_end_2(&self) -> u16 { |
| 8707 | let val = (self.0 >> 0usize) & 0xff; | 8520 | let val = (self.0 >> 0usize) & 0x0fff; |
| 8708 | val as u8 | 8521 | val as u16 |
| 8709 | } | 8522 | } |
| 8710 | #[doc = "SRAM2 write protection key for software erase"] | 8523 | #[doc = "Protected area end address for bank 2"] |
| 8711 | pub fn set_key(&mut self, val: u8) { | 8524 | pub fn set_pa_end_2(&mut self, val: u16) { |
| 8712 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); | 8525 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); |
| 8526 | } | ||
| 8527 | #[doc = "Secured area start address for bank 2"] | ||
| 8528 | pub const fn sa_beg_2(&self) -> u16 { | ||
| 8529 | let val = (self.0 >> 16usize) & 0x0fff; | ||
| 8530 | val as u16 | ||
| 8531 | } | ||
| 8532 | #[doc = "Secured area start address for bank 2"] | ||
| 8533 | pub fn set_sa_beg_2(&mut self, val: u16) { | ||
| 8534 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | ||
| 8713 | } | 8535 | } |
| 8714 | } | 8536 | } |
| 8715 | impl Default for Skr { | 8537 | impl Default for Ur10 { |
| 8716 | fn default() -> Skr { | 8538 | fn default() -> Ur10 { |
| 8717 | Skr(0) | 8539 | Ur10(0) |
| 8718 | } | 8540 | } |
| 8719 | } | 8541 | } |
| 8720 | #[doc = "external interrupt configuration register 4"] | 8542 | #[doc = "SYSCFG user register 9"] |
| 8721 | #[repr(transparent)] | 8543 | #[repr(transparent)] |
| 8722 | #[derive(Copy, Clone, Eq, PartialEq)] | 8544 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8723 | pub struct Exticr(pub u32); | 8545 | pub struct Ur9(pub u32); |
| 8724 | impl Exticr { | 8546 | impl Ur9 { |
| 8725 | #[doc = "EXTI12 configuration bits"] | 8547 | #[doc = "Write protection for flash bank 2"] |
| 8726 | pub fn exti(&self, n: usize) -> u8 { | 8548 | pub const fn wrpn_2(&self) -> u8 { |
| 8727 | assert!(n < 4usize); | 8549 | let val = (self.0 >> 0usize) & 0xff; |
| 8728 | let offs = 0usize + n * 4usize; | ||
| 8729 | let val = (self.0 >> offs) & 0x0f; | ||
| 8730 | val as u8 | 8550 | val as u8 |
| 8731 | } | 8551 | } |
| 8732 | #[doc = "EXTI12 configuration bits"] | 8552 | #[doc = "Write protection for flash bank 2"] |
| 8733 | pub fn set_exti(&mut self, n: usize, val: u8) { | 8553 | pub fn set_wrpn_2(&mut self, val: u8) { |
| 8734 | assert!(n < 4usize); | 8554 | self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); |
| 8735 | let offs = 0usize + n * 4usize; | 8555 | } |
| 8736 | self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); | 8556 | #[doc = "Protected area start address for bank 2"] |
| 8557 | pub const fn pa_beg_2(&self) -> u16 { | ||
| 8558 | let val = (self.0 >> 16usize) & 0x0fff; | ||
| 8559 | val as u16 | ||
| 8560 | } | ||
| 8561 | #[doc = "Protected area start address for bank 2"] | ||
| 8562 | pub fn set_pa_beg_2(&mut self, val: u16) { | ||
| 8563 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | ||
| 8737 | } | 8564 | } |
| 8738 | } | 8565 | } |
| 8739 | impl Default for Exticr { | 8566 | impl Default for Ur9 { |
| 8740 | fn default() -> Exticr { | 8567 | fn default() -> Ur9 { |
| 8741 | Exticr(0) | 8568 | Ur9(0) |
| 8742 | } | 8569 | } |
| 8743 | } | 8570 | } |
| 8744 | #[doc = "SCSR"] | 8571 | #[doc = "SYSCFG user register 12"] |
| 8745 | #[repr(transparent)] | 8572 | #[repr(transparent)] |
| 8746 | #[derive(Copy, Clone, Eq, PartialEq)] | 8573 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8747 | pub struct Scsr(pub u32); | 8574 | pub struct Ur12(pub u32); |
| 8748 | impl Scsr { | 8575 | impl Ur12 { |
| 8749 | #[doc = "SRAM2 Erase"] | 8576 | #[doc = "Secure mode"] |
| 8750 | pub const fn sram2er(&self) -> bool { | 8577 | pub const fn secure(&self) -> bool { |
| 8751 | let val = (self.0 >> 0usize) & 0x01; | 8578 | let val = (self.0 >> 16usize) & 0x01; |
| 8752 | val != 0 | ||
| 8753 | } | ||
| 8754 | #[doc = "SRAM2 Erase"] | ||
| 8755 | pub fn set_sram2er(&mut self, val: bool) { | ||
| 8756 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | ||
| 8757 | } | ||
| 8758 | #[doc = "SRAM2 busy by erase operation"] | ||
| 8759 | pub const fn sram2bsy(&self) -> bool { | ||
| 8760 | let val = (self.0 >> 1usize) & 0x01; | ||
| 8761 | val != 0 | 8579 | val != 0 |
| 8762 | } | 8580 | } |
| 8763 | #[doc = "SRAM2 busy by erase operation"] | 8581 | #[doc = "Secure mode"] |
| 8764 | pub fn set_sram2bsy(&mut self, val: bool) { | 8582 | pub fn set_secure(&mut self, val: bool) { |
| 8765 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 8583 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 8766 | } | 8584 | } |
| 8767 | } | 8585 | } |
| 8768 | impl Default for Scsr { | 8586 | impl Default for Ur12 { |
| 8769 | fn default() -> Scsr { | 8587 | fn default() -> Ur12 { |
| 8770 | Scsr(0) | 8588 | Ur12(0) |
| 8771 | } | 8589 | } |
| 8772 | } | 8590 | } |
| 8773 | #[doc = "CFGR2"] | 8591 | #[doc = "peripheral mode configuration register"] |
| 8774 | #[repr(transparent)] | 8592 | #[repr(transparent)] |
| 8775 | #[derive(Copy, Clone, Eq, PartialEq)] | 8593 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8776 | pub struct Cfgr2(pub u32); | 8594 | pub struct Pmcr(pub u32); |
| 8777 | impl Cfgr2 { | 8595 | impl Pmcr { |
| 8778 | #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] | 8596 | #[doc = "I2C1 Fm+"] |
| 8779 | pub const fn cll(&self) -> bool { | 8597 | pub const fn i2c1fmp(&self) -> bool { |
| 8780 | let val = (self.0 >> 0usize) & 0x01; | 8598 | let val = (self.0 >> 0usize) & 0x01; |
| 8781 | val != 0 | 8599 | val != 0 |
| 8782 | } | 8600 | } |
| 8783 | #[doc = "Cortex LOCKUP (Hardfault) output enable bit"] | 8601 | #[doc = "I2C1 Fm+"] |
| 8784 | pub fn set_cll(&mut self, val: bool) { | 8602 | pub fn set_i2c1fmp(&mut self, val: bool) { |
| 8785 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 8603 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 8786 | } | 8604 | } |
| 8787 | #[doc = "SRAM2 parity lock bit"] | 8605 | #[doc = "I2C2 Fm+"] |
| 8788 | pub const fn spl(&self) -> bool { | 8606 | pub const fn i2c2fmp(&self) -> bool { |
| 8789 | let val = (self.0 >> 1usize) & 0x01; | 8607 | let val = (self.0 >> 1usize) & 0x01; |
| 8790 | val != 0 | 8608 | val != 0 |
| 8791 | } | 8609 | } |
| 8792 | #[doc = "SRAM2 parity lock bit"] | 8610 | #[doc = "I2C2 Fm+"] |
| 8793 | pub fn set_spl(&mut self, val: bool) { | 8611 | pub fn set_i2c2fmp(&mut self, val: bool) { |
| 8794 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 8612 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); |
| 8795 | } | 8613 | } |
| 8796 | #[doc = "PVD lock enable bit"] | 8614 | #[doc = "I2C3 Fm+"] |
| 8797 | pub const fn pvdl(&self) -> bool { | 8615 | pub const fn i2c3fmp(&self) -> bool { |
| 8798 | let val = (self.0 >> 2usize) & 0x01; | 8616 | let val = (self.0 >> 2usize) & 0x01; |
| 8799 | val != 0 | 8617 | val != 0 |
| 8800 | } | 8618 | } |
| 8801 | #[doc = "PVD lock enable bit"] | 8619 | #[doc = "I2C3 Fm+"] |
| 8802 | pub fn set_pvdl(&mut self, val: bool) { | 8620 | pub fn set_i2c3fmp(&mut self, val: bool) { |
| 8803 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 8621 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); |
| 8804 | } | 8622 | } |
| 8805 | #[doc = "ECC Lock"] | 8623 | #[doc = "I2C4 Fm+"] |
| 8806 | pub const fn eccl(&self) -> bool { | 8624 | pub const fn i2c4fmp(&self) -> bool { |
| 8807 | let val = (self.0 >> 3usize) & 0x01; | 8625 | let val = (self.0 >> 3usize) & 0x01; |
| 8808 | val != 0 | 8626 | val != 0 |
| 8809 | } | 8627 | } |
| 8810 | #[doc = "ECC Lock"] | 8628 | #[doc = "I2C4 Fm+"] |
| 8811 | pub fn set_eccl(&mut self, val: bool) { | 8629 | pub fn set_i2c4fmp(&mut self, val: bool) { |
| 8812 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 8630 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); |
| 8813 | } | 8631 | } |
| 8814 | #[doc = "SRAM2 parity error flag"] | 8632 | #[doc = "PB(6) Fm+"] |
| 8815 | pub const fn spf(&self) -> bool { | 8633 | pub const fn pb6fmp(&self) -> bool { |
| 8634 | let val = (self.0 >> 4usize) & 0x01; | ||
| 8635 | val != 0 | ||
| 8636 | } | ||
| 8637 | #[doc = "PB(6) Fm+"] | ||
| 8638 | pub fn set_pb6fmp(&mut self, val: bool) { | ||
| 8639 | self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); | ||
| 8640 | } | ||
| 8641 | #[doc = "PB(7) Fast Mode Plus"] | ||
| 8642 | pub const fn pb7fmp(&self) -> bool { | ||
| 8643 | let val = (self.0 >> 5usize) & 0x01; | ||
| 8644 | val != 0 | ||
| 8645 | } | ||
| 8646 | #[doc = "PB(7) Fast Mode Plus"] | ||
| 8647 | pub fn set_pb7fmp(&mut self, val: bool) { | ||
| 8648 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | ||
| 8649 | } | ||
| 8650 | #[doc = "PB(8) Fast Mode Plus"] | ||
| 8651 | pub const fn pb8fmp(&self) -> bool { | ||
| 8652 | let val = (self.0 >> 6usize) & 0x01; | ||
| 8653 | val != 0 | ||
| 8654 | } | ||
| 8655 | #[doc = "PB(8) Fast Mode Plus"] | ||
| 8656 | pub fn set_pb8fmp(&mut self, val: bool) { | ||
| 8657 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | ||
| 8658 | } | ||
| 8659 | #[doc = "PB(9) Fm+"] | ||
| 8660 | pub const fn pb9fmp(&self) -> bool { | ||
| 8661 | let val = (self.0 >> 7usize) & 0x01; | ||
| 8662 | val != 0 | ||
| 8663 | } | ||
| 8664 | #[doc = "PB(9) Fm+"] | ||
| 8665 | pub fn set_pb9fmp(&mut self, val: bool) { | ||
| 8666 | self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); | ||
| 8667 | } | ||
| 8668 | #[doc = "Booster Enable"] | ||
| 8669 | pub const fn booste(&self) -> bool { | ||
| 8816 | let val = (self.0 >> 8usize) & 0x01; | 8670 | let val = (self.0 >> 8usize) & 0x01; |
| 8817 | val != 0 | 8671 | val != 0 |
| 8818 | } | 8672 | } |
| 8819 | #[doc = "SRAM2 parity error flag"] | 8673 | #[doc = "Booster Enable"] |
| 8820 | pub fn set_spf(&mut self, val: bool) { | 8674 | pub fn set_booste(&mut self, val: bool) { |
| 8821 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 8675 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 8822 | } | 8676 | } |
| 8677 | #[doc = "Analog switch supply voltage selection"] | ||
| 8678 | pub const fn boostvddsel(&self) -> bool { | ||
| 8679 | let val = (self.0 >> 9usize) & 0x01; | ||
| 8680 | val != 0 | ||
| 8681 | } | ||
| 8682 | #[doc = "Analog switch supply voltage selection"] | ||
| 8683 | pub fn set_boostvddsel(&mut self, val: bool) { | ||
| 8684 | self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); | ||
| 8685 | } | ||
| 8686 | #[doc = "Ethernet PHY Interface Selection"] | ||
| 8687 | pub const fn epis(&self) -> u8 { | ||
| 8688 | let val = (self.0 >> 21usize) & 0x07; | ||
| 8689 | val as u8 | ||
| 8690 | } | ||
| 8691 | #[doc = "Ethernet PHY Interface Selection"] | ||
| 8692 | pub fn set_epis(&mut self, val: u8) { | ||
| 8693 | self.0 = (self.0 & !(0x07 << 21usize)) | (((val as u32) & 0x07) << 21usize); | ||
| 8694 | } | ||
| 8695 | #[doc = "PA0 Switch Open"] | ||
| 8696 | pub const fn pa0so(&self) -> bool { | ||
| 8697 | let val = (self.0 >> 24usize) & 0x01; | ||
| 8698 | val != 0 | ||
| 8699 | } | ||
| 8700 | #[doc = "PA0 Switch Open"] | ||
| 8701 | pub fn set_pa0so(&mut self, val: bool) { | ||
| 8702 | self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); | ||
| 8703 | } | ||
| 8704 | #[doc = "PA1 Switch Open"] | ||
| 8705 | pub const fn pa1so(&self) -> bool { | ||
| 8706 | let val = (self.0 >> 25usize) & 0x01; | ||
| 8707 | val != 0 | ||
| 8708 | } | ||
| 8709 | #[doc = "PA1 Switch Open"] | ||
| 8710 | pub fn set_pa1so(&mut self, val: bool) { | ||
| 8711 | self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); | ||
| 8712 | } | ||
| 8713 | #[doc = "PC2 Switch Open"] | ||
| 8714 | pub const fn pc2so(&self) -> bool { | ||
| 8715 | let val = (self.0 >> 26usize) & 0x01; | ||
| 8716 | val != 0 | ||
| 8717 | } | ||
| 8718 | #[doc = "PC2 Switch Open"] | ||
| 8719 | pub fn set_pc2so(&mut self, val: bool) { | ||
| 8720 | self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); | ||
| 8721 | } | ||
| 8722 | #[doc = "PC3 Switch Open"] | ||
| 8723 | pub const fn pc3so(&self) -> bool { | ||
| 8724 | let val = (self.0 >> 27usize) & 0x01; | ||
| 8725 | val != 0 | ||
| 8726 | } | ||
| 8727 | #[doc = "PC3 Switch Open"] | ||
| 8728 | pub fn set_pc3so(&mut self, val: bool) { | ||
| 8729 | self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); | ||
| 8730 | } | ||
| 8823 | } | 8731 | } |
| 8824 | impl Default for Cfgr2 { | 8732 | impl Default for Pmcr { |
| 8825 | fn default() -> Cfgr2 { | 8733 | fn default() -> Pmcr { |
| 8826 | Cfgr2(0) | 8734 | Pmcr(0) |
| 8827 | } | 8735 | } |
| 8828 | } | 8736 | } |
| 8829 | #[doc = "SWPR"] | 8737 | #[doc = "SYSCFG user register 6"] |
| 8830 | #[repr(transparent)] | 8738 | #[repr(transparent)] |
| 8831 | #[derive(Copy, Clone, Eq, PartialEq)] | 8739 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8832 | pub struct Swpr(pub u32); | 8740 | pub struct Ur6(pub u32); |
| 8833 | impl Swpr { | 8741 | impl Ur6 { |
| 8834 | #[doc = "SRAWM2 write protection."] | 8742 | #[doc = "Protected area start address for bank 1"] |
| 8835 | pub fn pwp(&self, n: usize) -> bool { | 8743 | pub const fn pa_beg_1(&self) -> u16 { |
| 8836 | assert!(n < 32usize); | 8744 | let val = (self.0 >> 0usize) & 0x0fff; |
| 8837 | let offs = 0usize + n * 1usize; | 8745 | val as u16 |
| 8838 | let val = (self.0 >> offs) & 0x01; | ||
| 8839 | val != 0 | ||
| 8840 | } | 8746 | } |
| 8841 | #[doc = "SRAWM2 write protection."] | 8747 | #[doc = "Protected area start address for bank 1"] |
| 8842 | pub fn set_pwp(&mut self, n: usize, val: bool) { | 8748 | pub fn set_pa_beg_1(&mut self, val: u16) { |
| 8843 | assert!(n < 32usize); | 8749 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); |
| 8844 | let offs = 0usize + n * 1usize; | 8750 | } |
| 8845 | self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); | 8751 | #[doc = "Protected area end address for bank 1"] |
| 8752 | pub const fn pa_end_1(&self) -> u16 { | ||
| 8753 | let val = (self.0 >> 16usize) & 0x0fff; | ||
| 8754 | val as u16 | ||
| 8755 | } | ||
| 8756 | #[doc = "Protected area end address for bank 1"] | ||
| 8757 | pub fn set_pa_end_1(&mut self, val: u16) { | ||
| 8758 | self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); | ||
| 8846 | } | 8759 | } |
| 8847 | } | 8760 | } |
| 8848 | impl Default for Swpr { | 8761 | impl Default for Ur6 { |
| 8849 | fn default() -> Swpr { | 8762 | fn default() -> Ur6 { |
| 8850 | Swpr(0) | 8763 | Ur6(0) |
| 8851 | } | 8764 | } |
| 8852 | } | 8765 | } |
| 8853 | #[doc = "configuration register 1"] | 8766 | #[doc = "compensation cell control/status register"] |
| 8854 | #[repr(transparent)] | 8767 | #[repr(transparent)] |
| 8855 | #[derive(Copy, Clone, Eq, PartialEq)] | 8768 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8856 | pub struct Cfgr1(pub u32); | 8769 | pub struct Cccsr(pub u32); |
| 8857 | impl Cfgr1 { | 8770 | impl Cccsr { |
| 8858 | #[doc = "Firewall disable"] | 8771 | #[doc = "enable"] |
| 8859 | pub const fn fwdis(&self) -> bool { | 8772 | pub const fn en(&self) -> bool { |
| 8860 | let val = (self.0 >> 0usize) & 0x01; | 8773 | let val = (self.0 >> 0usize) & 0x01; |
| 8861 | val != 0 | 8774 | val != 0 |
| 8862 | } | 8775 | } |
| 8863 | #[doc = "Firewall disable"] | 8776 | #[doc = "enable"] |
| 8864 | pub fn set_fwdis(&mut self, val: bool) { | 8777 | pub fn set_en(&mut self, val: bool) { |
| 8865 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 8778 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 8866 | } | 8779 | } |
| 8867 | #[doc = "I/O analog switch voltage booster enable"] | 8780 | #[doc = "Code selection"] |
| 8868 | pub const fn boosten(&self) -> bool { | 8781 | pub const fn cs(&self) -> bool { |
| 8782 | let val = (self.0 >> 1usize) & 0x01; | ||
| 8783 | val != 0 | ||
| 8784 | } | ||
| 8785 | #[doc = "Code selection"] | ||
| 8786 | pub fn set_cs(&mut self, val: bool) { | ||
| 8787 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | ||
| 8788 | } | ||
| 8789 | #[doc = "Compensation cell ready flag"] | ||
| 8790 | pub const fn ready(&self) -> bool { | ||
| 8869 | let val = (self.0 >> 8usize) & 0x01; | 8791 | let val = (self.0 >> 8usize) & 0x01; |
| 8870 | val != 0 | 8792 | val != 0 |
| 8871 | } | 8793 | } |
| 8872 | #[doc = "I/O analog switch voltage booster enable"] | 8794 | #[doc = "Compensation cell ready flag"] |
| 8873 | pub fn set_boosten(&mut self, val: bool) { | 8795 | pub fn set_ready(&mut self, val: bool) { |
| 8874 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 8796 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); |
| 8875 | } | 8797 | } |
| 8876 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] | 8798 | #[doc = "High-speed at low-voltage"] |
| 8877 | pub const fn i2c_pb6_fmp(&self) -> bool { | 8799 | pub const fn hslv(&self) -> bool { |
| 8878 | let val = (self.0 >> 16usize) & 0x01; | 8800 | let val = (self.0 >> 16usize) & 0x01; |
| 8879 | val != 0 | 8801 | val != 0 |
| 8880 | } | 8802 | } |
| 8881 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB6"] | 8803 | #[doc = "High-speed at low-voltage"] |
| 8882 | pub fn set_i2c_pb6_fmp(&mut self, val: bool) { | 8804 | pub fn set_hslv(&mut self, val: bool) { |
| 8883 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | 8805 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 8884 | } | 8806 | } |
| 8885 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] | 8807 | } |
| 8886 | pub const fn i2c_pb7_fmp(&self) -> bool { | 8808 | impl Default for Cccsr { |
| 8887 | let val = (self.0 >> 17usize) & 0x01; | 8809 | fn default() -> Cccsr { |
| 8888 | val != 0 | 8810 | Cccsr(0) |
| 8889 | } | ||
| 8890 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB7"] | ||
| 8891 | pub fn set_i2c_pb7_fmp(&mut self, val: bool) { | ||
| 8892 | self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); | ||
| 8893 | } | 8811 | } |
| 8894 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] | 8812 | } |
| 8895 | pub const fn i2c_pb8_fmp(&self) -> bool { | 8813 | #[doc = "SYSCFG user register 5"] |
| 8896 | let val = (self.0 >> 18usize) & 0x01; | 8814 | #[repr(transparent)] |
| 8815 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8816 | pub struct Ur5(pub u32); | ||
| 8817 | impl Ur5 { | ||
| 8818 | #[doc = "Mass erase secured area disabled for bank 1"] | ||
| 8819 | pub const fn mesad_1(&self) -> bool { | ||
| 8820 | let val = (self.0 >> 0usize) & 0x01; | ||
| 8897 | val != 0 | 8821 | val != 0 |
| 8898 | } | 8822 | } |
| 8899 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB8"] | 8823 | #[doc = "Mass erase secured area disabled for bank 1"] |
| 8900 | pub fn set_i2c_pb8_fmp(&mut self, val: bool) { | 8824 | pub fn set_mesad_1(&mut self, val: bool) { |
| 8901 | self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); | 8825 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 8902 | } | 8826 | } |
| 8903 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] | 8827 | #[doc = "Write protection for flash bank 1"] |
| 8904 | pub const fn i2c_pb9_fmp(&self) -> bool { | 8828 | pub const fn wrpn_1(&self) -> u8 { |
| 8905 | let val = (self.0 >> 19usize) & 0x01; | 8829 | let val = (self.0 >> 16usize) & 0xff; |
| 8906 | val != 0 | 8830 | val as u8 |
| 8907 | } | 8831 | } |
| 8908 | #[doc = "Fast-mode Plus (Fm+) driving capability activation on PB9"] | 8832 | #[doc = "Write protection for flash bank 1"] |
| 8909 | pub fn set_i2c_pb9_fmp(&mut self, val: bool) { | 8833 | pub fn set_wrpn_1(&mut self, val: u8) { |
| 8910 | self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); | 8834 | self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); |
| 8911 | } | 8835 | } |
| 8912 | #[doc = "I2C1 Fast-mode Plus driving capability activation"] | 8836 | } |
| 8913 | pub const fn i2c1_fmp(&self) -> bool { | 8837 | impl Default for Ur5 { |
| 8914 | let val = (self.0 >> 20usize) & 0x01; | 8838 | fn default() -> Ur5 { |
| 8839 | Ur5(0) | ||
| 8840 | } | ||
| 8841 | } | ||
| 8842 | #[doc = "SYSCFG user register 14"] | ||
| 8843 | #[repr(transparent)] | ||
| 8844 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8845 | pub struct Ur14(pub u32); | ||
| 8846 | impl Ur14 { | ||
| 8847 | #[doc = "D1 Stop Reset"] | ||
| 8848 | pub const fn d1stprst(&self) -> bool { | ||
| 8849 | let val = (self.0 >> 0usize) & 0x01; | ||
| 8915 | val != 0 | 8850 | val != 0 |
| 8916 | } | 8851 | } |
| 8917 | #[doc = "I2C1 Fast-mode Plus driving capability activation"] | 8852 | #[doc = "D1 Stop Reset"] |
| 8918 | pub fn set_i2c1_fmp(&mut self, val: bool) { | 8853 | pub fn set_d1stprst(&mut self, val: bool) { |
| 8919 | self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); | 8854 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 8920 | } | 8855 | } |
| 8921 | #[doc = "I2C2 Fast-mode Plus driving capability activation"] | 8856 | } |
| 8922 | pub const fn i2c2_fmp(&self) -> bool { | 8857 | impl Default for Ur14 { |
| 8923 | let val = (self.0 >> 21usize) & 0x01; | 8858 | fn default() -> Ur14 { |
| 8924 | val != 0 | 8859 | Ur14(0) |
| 8925 | } | 8860 | } |
| 8926 | #[doc = "I2C2 Fast-mode Plus driving capability activation"] | 8861 | } |
| 8927 | pub fn set_i2c2_fmp(&mut self, val: bool) { | 8862 | #[doc = "SYSCFG power control register"] |
| 8928 | self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); | 8863 | #[repr(transparent)] |
| 8864 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8865 | pub struct Pwrcr(pub u32); | ||
| 8866 | impl Pwrcr { | ||
| 8867 | #[doc = "Overdrive enable"] | ||
| 8868 | pub const fn oden(&self) -> u8 { | ||
| 8869 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 8870 | val as u8 | ||
| 8929 | } | 8871 | } |
| 8930 | #[doc = "I2C3 Fast-mode Plus driving capability activation"] | 8872 | #[doc = "Overdrive enable"] |
| 8931 | pub const fn i2c3_fmp(&self) -> bool { | 8873 | pub fn set_oden(&mut self, val: u8) { |
| 8932 | let val = (self.0 >> 22usize) & 0x01; | 8874 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 8933 | val != 0 | ||
| 8934 | } | 8875 | } |
| 8935 | #[doc = "I2C3 Fast-mode Plus driving capability activation"] | 8876 | } |
| 8936 | pub fn set_i2c3_fmp(&mut self, val: bool) { | 8877 | impl Default for Pwrcr { |
| 8937 | self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); | 8878 | fn default() -> Pwrcr { |
| 8879 | Pwrcr(0) | ||
| 8938 | } | 8880 | } |
| 8939 | #[doc = "Floating Point Unit interrupts enable bits"] | 8881 | } |
| 8940 | pub const fn fpu_ie(&self) -> u8 { | 8882 | #[doc = "SYSCFG package register"] |
| 8941 | let val = (self.0 >> 26usize) & 0x3f; | 8883 | #[repr(transparent)] |
| 8884 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8885 | pub struct Pkgr(pub u32); | ||
| 8886 | impl Pkgr { | ||
| 8887 | #[doc = "Package"] | ||
| 8888 | pub const fn pkg(&self) -> u8 { | ||
| 8889 | let val = (self.0 >> 0usize) & 0x0f; | ||
| 8942 | val as u8 | 8890 | val as u8 |
| 8943 | } | 8891 | } |
| 8944 | #[doc = "Floating Point Unit interrupts enable bits"] | 8892 | #[doc = "Package"] |
| 8945 | pub fn set_fpu_ie(&mut self, val: u8) { | 8893 | pub fn set_pkg(&mut self, val: u8) { |
| 8946 | self.0 = (self.0 & !(0x3f << 26usize)) | (((val as u32) & 0x3f) << 26usize); | 8894 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 8947 | } | 8895 | } |
| 8948 | } | 8896 | } |
| 8949 | impl Default for Cfgr1 { | 8897 | impl Default for Pkgr { |
| 8950 | fn default() -> Cfgr1 { | 8898 | fn default() -> Pkgr { |
| 8951 | Cfgr1(0) | 8899 | Pkgr(0) |
| 8952 | } | 8900 | } |
| 8953 | } | 8901 | } |
| 8954 | #[doc = "memory remap register"] | 8902 | #[doc = "SYSCFG user register 3"] |
| 8955 | #[repr(transparent)] | 8903 | #[repr(transparent)] |
| 8956 | #[derive(Copy, Clone, Eq, PartialEq)] | 8904 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8957 | pub struct Memrmp(pub u32); | 8905 | pub struct Ur3(pub u32); |
| 8958 | impl Memrmp { | 8906 | impl Ur3 { |
| 8959 | #[doc = "Memory mapping selection"] | 8907 | #[doc = "Boot Address 1"] |
| 8960 | pub const fn mem_mode(&self) -> u8 { | 8908 | pub const fn boot_add1(&self) -> u16 { |
| 8961 | let val = (self.0 >> 0usize) & 0x07; | 8909 | let val = (self.0 >> 16usize) & 0xffff; |
| 8962 | val as u8 | 8910 | val as u16 |
| 8963 | } | 8911 | } |
| 8964 | #[doc = "Memory mapping selection"] | 8912 | #[doc = "Boot Address 1"] |
| 8965 | pub fn set_mem_mode(&mut self, val: u8) { | 8913 | pub fn set_boot_add1(&mut self, val: u16) { |
| 8966 | self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); | 8914 | self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); |
| 8967 | } | 8915 | } |
| 8968 | #[doc = "QUADSPI memory mapping swap"] | 8916 | } |
| 8969 | pub const fn qfs(&self) -> bool { | 8917 | impl Default for Ur3 { |
| 8970 | let val = (self.0 >> 3usize) & 0x01; | 8918 | fn default() -> Ur3 { |
| 8971 | val != 0 | 8919 | Ur3(0) |
| 8972 | } | 8920 | } |
| 8973 | #[doc = "QUADSPI memory mapping swap"] | 8921 | } |
| 8974 | pub fn set_qfs(&mut self, val: bool) { | 8922 | #[doc = "SYSCFG user register 11"] |
| 8975 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 8923 | #[repr(transparent)] |
| 8924 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 8925 | pub struct Ur11(pub u32); | ||
| 8926 | impl Ur11 { | ||
| 8927 | #[doc = "Secured area end address for bank 2"] | ||
| 8928 | pub const fn sa_end_2(&self) -> u16 { | ||
| 8929 | let val = (self.0 >> 0usize) & 0x0fff; | ||
| 8930 | val as u16 | ||
| 8976 | } | 8931 | } |
| 8977 | #[doc = "Flash Bank mode selection"] | 8932 | #[doc = "Secured area end address for bank 2"] |
| 8978 | pub const fn fb_mode(&self) -> bool { | 8933 | pub fn set_sa_end_2(&mut self, val: u16) { |
| 8979 | let val = (self.0 >> 8usize) & 0x01; | 8934 | self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); |
| 8935 | } | ||
| 8936 | #[doc = "Independent Watchdog 1 mode"] | ||
| 8937 | pub const fn iwdg1m(&self) -> bool { | ||
| 8938 | let val = (self.0 >> 16usize) & 0x01; | ||
| 8980 | val != 0 | 8939 | val != 0 |
| 8981 | } | 8940 | } |
| 8982 | #[doc = "Flash Bank mode selection"] | 8941 | #[doc = "Independent Watchdog 1 mode"] |
| 8983 | pub fn set_fb_mode(&mut self, val: bool) { | 8942 | pub fn set_iwdg1m(&mut self, val: bool) { |
| 8984 | self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); | 8943 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 8985 | } | 8944 | } |
| 8986 | } | 8945 | } |
| 8987 | impl Default for Memrmp { | 8946 | impl Default for Ur11 { |
| 8988 | fn default() -> Memrmp { | 8947 | fn default() -> Ur11 { |
| 8989 | Memrmp(0) | 8948 | Ur11(0) |
| 8990 | } | 8949 | } |
| 8991 | } | 8950 | } |
| 8992 | } | 8951 | #[doc = "SYSCFG compensation cell code register"] |
| 8993 | } | 8952 | #[repr(transparent)] |
| 8994 | pub mod rng_v1 { | 8953 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8995 | use crate::generic::*; | 8954 | pub struct Cccr(pub u32); |
| 8996 | #[doc = "Random number generator"] | 8955 | impl Cccr { |
| 8997 | #[derive(Copy, Clone)] | 8956 | #[doc = "NMOS compensation code"] |
| 8998 | pub struct Rng(pub *mut u8); | 8957 | pub const fn ncc(&self) -> u8 { |
| 8999 | unsafe impl Send for Rng {} | 8958 | let val = (self.0 >> 0usize) & 0x0f; |
| 9000 | unsafe impl Sync for Rng {} | 8959 | val as u8 |
| 9001 | impl Rng { | 8960 | } |
| 9002 | #[doc = "control register"] | 8961 | #[doc = "NMOS compensation code"] |
| 9003 | pub fn cr(self) -> Reg<regs::Cr, RW> { | 8962 | pub fn set_ncc(&mut self, val: u8) { |
| 9004 | unsafe { Reg::from_ptr(self.0.add(0usize)) } | 8963 | self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); |
| 8964 | } | ||
| 8965 | #[doc = "PMOS compensation code"] | ||
| 8966 | pub const fn pcc(&self) -> u8 { | ||
| 8967 | let val = (self.0 >> 4usize) & 0x0f; | ||
| 8968 | val as u8 | ||
| 8969 | } | ||
| 8970 | #[doc = "PMOS compensation code"] | ||
| 8971 | pub fn set_pcc(&mut self, val: u8) { | ||
| 8972 | self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); | ||
| 8973 | } | ||
| 9005 | } | 8974 | } |
| 9006 | #[doc = "status register"] | 8975 | impl Default for Cccr { |
| 9007 | pub fn sr(self) -> Reg<regs::Sr, RW> { | 8976 | fn default() -> Cccr { |
| 9008 | unsafe { Reg::from_ptr(self.0.add(4usize)) } | 8977 | Cccr(0) |
| 8978 | } | ||
| 9009 | } | 8979 | } |
| 9010 | #[doc = "data register"] | 8980 | #[doc = "SYSCFG user register 15"] |
| 9011 | pub fn dr(self) -> Reg<u32, R> { | 8981 | #[repr(transparent)] |
| 9012 | unsafe { Reg::from_ptr(self.0.add(8usize)) } | 8982 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 8983 | pub struct Ur15(pub u32); | ||
| 8984 | impl Ur15 { | ||
| 8985 | #[doc = "Freeze independent watchdog in Standby mode"] | ||
| 8986 | pub const fn fziwdgstb(&self) -> bool { | ||
| 8987 | let val = (self.0 >> 16usize) & 0x01; | ||
| 8988 | val != 0 | ||
| 8989 | } | ||
| 8990 | #[doc = "Freeze independent watchdog in Standby mode"] | ||
| 8991 | pub fn set_fziwdgstb(&mut self, val: bool) { | ||
| 8992 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); | ||
| 8993 | } | ||
| 9013 | } | 8994 | } |
| 9014 | } | 8995 | impl Default for Ur15 { |
| 9015 | pub mod regs { | 8996 | fn default() -> Ur15 { |
| 9016 | use crate::generic::*; | 8997 | Ur15(0) |
| 9017 | #[doc = "status register"] | 8998 | } |
| 8999 | } | ||
| 9000 | #[doc = "SYSCFG user register 8"] | ||
| 9018 | #[repr(transparent)] | 9001 | #[repr(transparent)] |
| 9019 | #[derive(Copy, Clone, Eq, PartialEq)] | 9002 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 9020 | pub struct Sr(pub u32); | 9003 | pub struct Ur8(pub u32); |
| 9021 | impl Sr { | 9004 | impl Ur8 { |
| 9022 | #[doc = "Data ready"] | 9005 | #[doc = "Mass erase protected area disabled for bank 2"] |
| 9023 | pub const fn drdy(&self) -> bool { | 9006 | pub const fn mepad_2(&self) -> bool { |
| 9024 | let val = (self.0 >> 0usize) & 0x01; | 9007 | let val = (self.0 >> 0usize) & 0x01; |
| 9025 | val != 0 | 9008 | val != 0 |
| 9026 | } | 9009 | } |
| 9027 | #[doc = "Data ready"] | 9010 | #[doc = "Mass erase protected area disabled for bank 2"] |
| 9028 | pub fn set_drdy(&mut self, val: bool) { | 9011 | pub fn set_mepad_2(&mut self, val: bool) { |
| 9029 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); | 9012 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 9030 | } | 9013 | } |
| 9031 | #[doc = "Clock error current status"] | 9014 | #[doc = "Mass erase secured area disabled for bank 2"] |
| 9032 | pub const fn cecs(&self) -> bool { | 9015 | pub const fn mesad_2(&self) -> bool { |
| 9033 | let val = (self.0 >> 1usize) & 0x01; | 9016 | let val = (self.0 >> 16usize) & 0x01; |
| 9034 | val != 0 | 9017 | val != 0 |
| 9035 | } | 9018 | } |
| 9036 | #[doc = "Clock error current status"] | 9019 | #[doc = "Mass erase secured area disabled for bank 2"] |
| 9037 | pub fn set_cecs(&mut self, val: bool) { | 9020 | pub fn set_mesad_2(&mut self, val: bool) { |
| 9038 | self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); | 9021 | self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); |
| 9039 | } | 9022 | } |
| 9040 | #[doc = "Seed error current status"] | 9023 | } |
| 9041 | pub const fn secs(&self) -> bool { | 9024 | impl Default for Ur8 { |
| 9042 | let val = (self.0 >> 2usize) & 0x01; | 9025 | fn default() -> Ur8 { |
| 9043 | val != 0 | 9026 | Ur8(0) |
| 9044 | } | 9027 | } |
| 9045 | #[doc = "Seed error current status"] | 9028 | } |
| 9046 | pub fn set_secs(&mut self, val: bool) { | 9029 | #[doc = "external interrupt configuration register 2"] |
| 9047 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | 9030 | #[repr(transparent)] |
| 9031 | #[derive(Copy, Clone, Eq, PartialEq)] | ||
| 9032 | pub struct Exticr(pub u32); | ||
| 9033 | impl Exticr { | ||
| 9034 | #[doc = "EXTI x configuration (x = 4 to 7)"] | ||
| 9035 | pub fn exti(&self, n: usize) -> u8 { | ||
| 9036 | assert!(n < 4usize); | ||
| 9037 | let offs = 0usize + n * 4usize; | ||
| 9038 | let val = (self.0 >> offs) & 0x0f; | ||
| 9039 | val as u8 | ||
| 9048 | } | 9040 | } |
| 9049 | #[doc = "Clock error interrupt status"] | 9041 | #[doc = "EXTI x configuration (x = 4 to 7)"] |
| 9050 | pub const fn ceis(&self) -> bool { | 9042 | pub fn set_exti(&mut self, n: usize, val: u8) { |
| 9051 | let val = (self.0 >> 5usize) & 0x01; | 9043 | assert!(n < 4usize); |
| 9052 | val != 0 | 9044 | let offs = 0usize + n * 4usize; |
| 9045 | self.0 = (self.0 & !(0x0f << offs)) | (((val as u32) & 0x0f) << offs); | ||
| 9053 | } | 9046 | } |
| 9054 | #[doc = "Clock error interrupt status"] | 9047 | } |
| 9055 | pub fn set_ceis(&mut self, val: bool) { | 9048 | impl Default for Exticr { |
| 9056 | self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); | 9049 | fn default() -> Exticr { |
| 9050 | Exticr(0) | ||
| 9057 | } | 9051 | } |
| 9058 | #[doc = "Seed error interrupt status"] | 9052 | } |
| 9059 | pub const fn seis(&self) -> bool { | 9053 | #[doc = "SYSCFG user register 2"] |
| 9060 | let val = (self.0 >> 6usize) & 0x01; | 9054 | #[repr(transparent)] |
| 9061 | val != 0 | 9055 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 9056 | pub struct Ur2(pub u32); | ||
| 9057 | impl Ur2 { | ||
| 9058 | #[doc = "BOR_LVL Brownout Reset Threshold Level"] | ||
| 9059 | pub const fn borh(&self) -> u8 { | ||
| 9060 | let val = (self.0 >> 0usize) & 0x03; | ||
| 9061 | val as u8 | ||
| 9062 | } | 9062 | } |
| 9063 | #[doc = "Seed error interrupt status"] | 9063 | #[doc = "BOR_LVL Brownout Reset Threshold Level"] |
| 9064 | pub fn set_seis(&mut self, val: bool) { | 9064 | pub fn set_borh(&mut self, val: u8) { |
| 9065 | self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); | 9065 | self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); |
| 9066 | } | ||
| 9067 | #[doc = "Boot Address 0"] | ||
| 9068 | pub const fn boot_add0(&self) -> u16 { | ||
| 9069 | let val = (self.0 >> 16usize) & 0xffff; | ||
| 9070 | val as u16 | ||
| 9071 | } | ||
| 9072 | #[doc = "Boot Address 0"] | ||
| 9073 | pub fn set_boot_add0(&mut self, val: u16) { | ||
| 9074 | self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); | ||
| 9066 | } | 9075 | } |
| 9067 | } | 9076 | } |
| 9068 | impl Default for Sr { | 9077 | impl Default for Ur2 { |
| 9069 | fn default() -> Sr { | 9078 | fn default() -> Ur2 { |
| 9070 | Sr(0) | 9079 | Ur2(0) |
| 9071 | } | 9080 | } |
| 9072 | } | 9081 | } |
| 9073 | #[doc = "control register"] | 9082 | #[doc = "SYSCFG user register 17"] |
| 9074 | #[repr(transparent)] | 9083 | #[repr(transparent)] |
| 9075 | #[derive(Copy, Clone, Eq, PartialEq)] | 9084 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 9076 | pub struct Cr(pub u32); | 9085 | pub struct Ur17(pub u32); |
| 9077 | impl Cr { | 9086 | impl Ur17 { |
| 9078 | #[doc = "Random number generator enable"] | 9087 | #[doc = "I/O high speed / low voltage"] |
| 9079 | pub const fn rngen(&self) -> bool { | 9088 | pub const fn io_hslv(&self) -> bool { |
| 9080 | let val = (self.0 >> 2usize) & 0x01; | 9089 | let val = (self.0 >> 0usize) & 0x01; |
| 9081 | val != 0 | ||
| 9082 | } | ||
| 9083 | #[doc = "Random number generator enable"] | ||
| 9084 | pub fn set_rngen(&mut self, val: bool) { | ||
| 9085 | self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); | ||
| 9086 | } | ||
| 9087 | #[doc = "Interrupt enable"] | ||
| 9088 | pub const fn ie(&self) -> bool { | ||
| 9089 | let val = (self.0 >> 3usize) & 0x01; | ||
| 9090 | val != 0 | 9090 | val != 0 |
| 9091 | } | 9091 | } |
| 9092 | #[doc = "Interrupt enable"] | 9092 | #[doc = "I/O high speed / low voltage"] |
| 9093 | pub fn set_ie(&mut self, val: bool) { | 9093 | pub fn set_io_hslv(&mut self, val: bool) { |
| 9094 | self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); | 9094 | self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); |
| 9095 | } | 9095 | } |
| 9096 | } | 9096 | } |
| 9097 | impl Default for Cr { | 9097 | impl Default for Ur17 { |
| 9098 | fn default() -> Cr { | 9098 | fn default() -> Ur17 { |
| 9099 | Cr(0) | 9099 | Ur17(0) |
| 9100 | } | 9100 | } |
| 9101 | } | 9101 | } |
| 9102 | } | 9102 | } |
diff --git a/embassy-stm32/src/pac/stm32f401cb.rs b/embassy-stm32/src/pac/stm32f401cb.rs index fe69202d8..13e60e2e3 100644 --- a/embassy-stm32/src/pac/stm32f401cb.rs +++ b/embassy-stm32/src/pac/stm32f401cb.rs | |||
| @@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 155 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 156 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 157 | impl_usart!(USART1); |
| @@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 184 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 185 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 186 | pub use regs::gpio_v2 as gpio; |
| 187 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 188 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 189 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 190 | mod regs; |
| @@ -172,7 +199,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 199 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 200 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 201 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 202 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 203 | ); |
| 177 | 204 | ||
| 178 | pub mod interrupt { | 205 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f401cc.rs b/embassy-stm32/src/pac/stm32f401cc.rs index fe69202d8..13e60e2e3 100644 --- a/embassy-stm32/src/pac/stm32f401cc.rs +++ b/embassy-stm32/src/pac/stm32f401cc.rs | |||
| @@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 155 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 156 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 157 | impl_usart!(USART1); |
| @@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 184 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 185 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 186 | pub use regs::gpio_v2 as gpio; |
| 187 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 188 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 189 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 190 | mod regs; |
| @@ -172,7 +199,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 199 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 200 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 201 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 202 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 203 | ); |
| 177 | 204 | ||
| 178 | pub mod interrupt { | 205 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f401cd.rs b/embassy-stm32/src/pac/stm32f401cd.rs index fe69202d8..13e60e2e3 100644 --- a/embassy-stm32/src/pac/stm32f401cd.rs +++ b/embassy-stm32/src/pac/stm32f401cd.rs | |||
| @@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 155 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 156 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 157 | impl_usart!(USART1); |
| @@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 184 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 185 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 186 | pub use regs::gpio_v2 as gpio; |
| 187 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 188 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 189 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 190 | mod regs; |
| @@ -172,7 +199,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 199 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 200 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 201 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 202 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 203 | ); |
| 177 | 204 | ||
| 178 | pub mod interrupt { | 205 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f401ce.rs b/embassy-stm32/src/pac/stm32f401ce.rs index fe69202d8..13e60e2e3 100644 --- a/embassy-stm32/src/pac/stm32f401ce.rs +++ b/embassy-stm32/src/pac/stm32f401ce.rs | |||
| @@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 155 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 156 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 157 | impl_usart!(USART1); |
| @@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 184 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 185 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 186 | pub use regs::gpio_v2 as gpio; |
| 187 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 188 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 189 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 190 | mod regs; |
| @@ -172,7 +199,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 199 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 200 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 201 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 202 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 203 | ); |
| 177 | 204 | ||
| 178 | pub mod interrupt { | 205 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f401rb.rs b/embassy-stm32/src/pac/stm32f401rb.rs index fe69202d8..13e60e2e3 100644 --- a/embassy-stm32/src/pac/stm32f401rb.rs +++ b/embassy-stm32/src/pac/stm32f401rb.rs | |||
| @@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 155 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 156 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 157 | impl_usart!(USART1); |
| @@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 184 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 185 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 186 | pub use regs::gpio_v2 as gpio; |
| 187 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 188 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 189 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 190 | mod regs; |
| @@ -172,7 +199,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 199 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 200 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 201 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 202 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 203 | ); |
| 177 | 204 | ||
| 178 | pub mod interrupt { | 205 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f401rc.rs b/embassy-stm32/src/pac/stm32f401rc.rs index fe69202d8..13e60e2e3 100644 --- a/embassy-stm32/src/pac/stm32f401rc.rs +++ b/embassy-stm32/src/pac/stm32f401rc.rs | |||
| @@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 155 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 156 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 157 | impl_usart!(USART1); |
| @@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 184 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 185 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 186 | pub use regs::gpio_v2 as gpio; |
| 187 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 188 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 189 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 190 | mod regs; |
| @@ -172,7 +199,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 199 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 200 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 201 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 202 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 203 | ); |
| 177 | 204 | ||
| 178 | pub mod interrupt { | 205 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f401rd.rs b/embassy-stm32/src/pac/stm32f401rd.rs index fe69202d8..13e60e2e3 100644 --- a/embassy-stm32/src/pac/stm32f401rd.rs +++ b/embassy-stm32/src/pac/stm32f401rd.rs | |||
| @@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 155 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 156 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 157 | impl_usart!(USART1); |
| @@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 184 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 185 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 186 | pub use regs::gpio_v2 as gpio; |
| 187 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 188 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 189 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 190 | mod regs; |
| @@ -172,7 +199,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 199 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 200 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 201 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 202 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 203 | ); |
| 177 | 204 | ||
| 178 | pub mod interrupt { | 205 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f401re.rs b/embassy-stm32/src/pac/stm32f401re.rs index fe69202d8..13e60e2e3 100644 --- a/embassy-stm32/src/pac/stm32f401re.rs +++ b/embassy-stm32/src/pac/stm32f401re.rs | |||
| @@ -126,6 +126,32 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 155 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 156 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 157 | impl_usart!(USART1); |
| @@ -158,6 +184,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 184 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 185 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 186 | pub use regs::gpio_v2 as gpio; |
| 187 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 188 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 189 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 190 | mod regs; |
| @@ -172,7 +199,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 199 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 200 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 201 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 202 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 203 | ); |
| 177 | 204 | ||
| 178 | pub mod interrupt { | 205 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f401vb.rs b/embassy-stm32/src/pac/stm32f401vb.rs index fe69202d8..91263ba49 100644 --- a/embassy-stm32/src/pac/stm32f401vb.rs +++ b/embassy-stm32/src/pac/stm32f401vb.rs | |||
| @@ -126,6 +126,40 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 155 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 156 | impl_spi!(SPI4, APB2); | ||
| 157 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 158 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 159 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 160 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 161 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 162 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 165 | impl_usart!(USART1); |
| @@ -158,6 +192,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 192 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 193 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 194 | pub use regs::gpio_v2 as gpio; |
| 195 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 196 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 197 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 198 | mod regs; |
| @@ -172,7 +207,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 207 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 208 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 209 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 210 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 211 | ); |
| 177 | 212 | ||
| 178 | pub mod interrupt { | 213 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f401vc.rs b/embassy-stm32/src/pac/stm32f401vc.rs index fe69202d8..91263ba49 100644 --- a/embassy-stm32/src/pac/stm32f401vc.rs +++ b/embassy-stm32/src/pac/stm32f401vc.rs | |||
| @@ -126,6 +126,40 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 155 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 156 | impl_spi!(SPI4, APB2); | ||
| 157 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 158 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 159 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 160 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 161 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 162 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 165 | impl_usart!(USART1); |
| @@ -158,6 +192,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 192 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 193 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 194 | pub use regs::gpio_v2 as gpio; |
| 195 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 196 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 197 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 198 | mod regs; |
| @@ -172,7 +207,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 207 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 208 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 209 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 210 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 211 | ); |
| 177 | 212 | ||
| 178 | pub mod interrupt { | 213 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f401vd.rs b/embassy-stm32/src/pac/stm32f401vd.rs index fe69202d8..91263ba49 100644 --- a/embassy-stm32/src/pac/stm32f401vd.rs +++ b/embassy-stm32/src/pac/stm32f401vd.rs | |||
| @@ -126,6 +126,40 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 155 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 156 | impl_spi!(SPI4, APB2); | ||
| 157 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 158 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 159 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 160 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 161 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 162 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 165 | impl_usart!(USART1); |
| @@ -158,6 +192,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 192 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 193 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 194 | pub use regs::gpio_v2 as gpio; |
| 195 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 196 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 197 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 198 | mod regs; |
| @@ -172,7 +207,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 207 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 208 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 209 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 210 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 211 | ); |
| 177 | 212 | ||
| 178 | pub mod interrupt { | 213 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f401ve.rs b/embassy-stm32/src/pac/stm32f401ve.rs index fe69202d8..91263ba49 100644 --- a/embassy-stm32/src/pac/stm32f401ve.rs +++ b/embassy-stm32/src/pac/stm32f401ve.rs | |||
| @@ -126,6 +126,40 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 146 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 147 | impl_spi!(SPI3, APB1); | ||
| 148 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 149 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 150 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 151 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 152 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 153 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 154 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 155 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 156 | impl_spi!(SPI4, APB2); | ||
| 157 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 158 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 159 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 160 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 161 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 162 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 165 | impl_usart!(USART1); |
| @@ -158,6 +192,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 158 | pub use regs::dma_v2 as dma; | 192 | pub use regs::dma_v2 as dma; |
| 159 | pub use regs::exti_v1 as exti; | 193 | pub use regs::exti_v1 as exti; |
| 160 | pub use regs::gpio_v2 as gpio; | 194 | pub use regs::gpio_v2 as gpio; |
| 195 | pub use regs::spi_v1 as spi; | ||
| 161 | pub use regs::syscfg_f4 as syscfg; | 196 | pub use regs::syscfg_f4 as syscfg; |
| 162 | pub use regs::usart_v1 as usart; | 197 | pub use regs::usart_v1 as usart; |
| 163 | mod regs; | 198 | mod regs; |
| @@ -172,7 +207,7 @@ peripherals!( | |||
| 172 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 207 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 173 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 208 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 174 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 209 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 175 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 210 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART6 |
| 176 | ); | 211 | ); |
| 177 | 212 | ||
| 178 | pub mod interrupt { | 213 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f405oe.rs b/embassy-stm32/src/pac/stm32f405oe.rs index ef281f87c..f8ee073f3 100644 --- a/embassy-stm32/src/pac/stm32f405oe.rs +++ b/embassy-stm32/src/pac/stm32f405oe.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f405og.rs b/embassy-stm32/src/pac/stm32f405og.rs index ef281f87c..f8ee073f3 100644 --- a/embassy-stm32/src/pac/stm32f405og.rs +++ b/embassy-stm32/src/pac/stm32f405og.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f405rg.rs b/embassy-stm32/src/pac/stm32f405rg.rs index ef281f87c..f8ee073f3 100644 --- a/embassy-stm32/src/pac/stm32f405rg.rs +++ b/embassy-stm32/src/pac/stm32f405rg.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f405vg.rs b/embassy-stm32/src/pac/stm32f405vg.rs index ef281f87c..f8ee073f3 100644 --- a/embassy-stm32/src/pac/stm32f405vg.rs +++ b/embassy-stm32/src/pac/stm32f405vg.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f405zg.rs b/embassy-stm32/src/pac/stm32f405zg.rs index ef281f87c..f8ee073f3 100644 --- a/embassy-stm32/src/pac/stm32f405zg.rs +++ b/embassy-stm32/src/pac/stm32f405zg.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f407ie.rs b/embassy-stm32/src/pac/stm32f407ie.rs index e331efc83..7c839139a 100644 --- a/embassy-stm32/src/pac/stm32f407ie.rs +++ b/embassy-stm32/src/pac/stm32f407ie.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f407ig.rs b/embassy-stm32/src/pac/stm32f407ig.rs index e331efc83..7c839139a 100644 --- a/embassy-stm32/src/pac/stm32f407ig.rs +++ b/embassy-stm32/src/pac/stm32f407ig.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f407ve.rs b/embassy-stm32/src/pac/stm32f407ve.rs index e331efc83..7c839139a 100644 --- a/embassy-stm32/src/pac/stm32f407ve.rs +++ b/embassy-stm32/src/pac/stm32f407ve.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f407vg.rs b/embassy-stm32/src/pac/stm32f407vg.rs index e331efc83..7c839139a 100644 --- a/embassy-stm32/src/pac/stm32f407vg.rs +++ b/embassy-stm32/src/pac/stm32f407vg.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f407ze.rs b/embassy-stm32/src/pac/stm32f407ze.rs index e331efc83..7c839139a 100644 --- a/embassy-stm32/src/pac/stm32f407ze.rs +++ b/embassy-stm32/src/pac/stm32f407ze.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f407zg.rs b/embassy-stm32/src/pac/stm32f407zg.rs index e331efc83..7c839139a 100644 --- a/embassy-stm32/src/pac/stm32f407zg.rs +++ b/embassy-stm32/src/pac/stm32f407zg.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f410c8.rs b/embassy-stm32/src/pac/stm32f410c8.rs index 0ade08eff..938c0c052 100644 --- a/embassy-stm32/src/pac/stm32f410c8.rs +++ b/embassy-stm32/src/pac/stm32f410c8.rs | |||
| @@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); | 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); |
| 96 | impl_rng!(RNG); | 96 | impl_rng!(RNG, RNG); |
| 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 99 | impl_usart!(USART1); | 99 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f410cb.rs b/embassy-stm32/src/pac/stm32f410cb.rs index 0ade08eff..938c0c052 100644 --- a/embassy-stm32/src/pac/stm32f410cb.rs +++ b/embassy-stm32/src/pac/stm32f410cb.rs | |||
| @@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); | 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); |
| 96 | impl_rng!(RNG); | 96 | impl_rng!(RNG, RNG); |
| 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 99 | impl_usart!(USART1); | 99 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f410r8.rs b/embassy-stm32/src/pac/stm32f410r8.rs index 0ade08eff..938c0c052 100644 --- a/embassy-stm32/src/pac/stm32f410r8.rs +++ b/embassy-stm32/src/pac/stm32f410r8.rs | |||
| @@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); | 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); |
| 96 | impl_rng!(RNG); | 96 | impl_rng!(RNG, RNG); |
| 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 99 | impl_usart!(USART1); | 99 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f410rb.rs b/embassy-stm32/src/pac/stm32f410rb.rs index 0ade08eff..938c0c052 100644 --- a/embassy-stm32/src/pac/stm32f410rb.rs +++ b/embassy-stm32/src/pac/stm32f410rb.rs | |||
| @@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); | 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); |
| 96 | impl_rng!(RNG); | 96 | impl_rng!(RNG, RNG); |
| 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 99 | impl_usart!(USART1); | 99 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f410t8.rs b/embassy-stm32/src/pac/stm32f410t8.rs index 01c938453..74d238a1c 100644 --- a/embassy-stm32/src/pac/stm32f410t8.rs +++ b/embassy-stm32/src/pac/stm32f410t8.rs | |||
| @@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); | 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); |
| 96 | impl_rng!(RNG); | 96 | impl_rng!(RNG, RNG); |
| 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 99 | impl_usart!(USART1); | 99 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f410tb.rs b/embassy-stm32/src/pac/stm32f410tb.rs index 01c938453..74d238a1c 100644 --- a/embassy-stm32/src/pac/stm32f410tb.rs +++ b/embassy-stm32/src/pac/stm32f410tb.rs | |||
| @@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); | 95 | pub const RNG: rng::Rng = rng::Rng(0x40080000 as _); |
| 96 | impl_rng!(RNG); | 96 | impl_rng!(RNG, RNG); |
| 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 99 | impl_usart!(USART1); | 99 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f411cc.rs b/embassy-stm32/src/pac/stm32f411cc.rs index 1e54e97c9..325aee85a 100644 --- a/embassy-stm32/src/pac/stm32f411cc.rs +++ b/embassy-stm32/src/pac/stm32f411cc.rs | |||
| @@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 146 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 147 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 148 | impl_spi!(SPI3, APB1); | ||
| 149 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 150 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 151 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 152 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 153 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 154 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 155 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 156 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 157 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 158 | impl_spi!(SPI4, APB2); | ||
| 159 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 160 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 161 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 162 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 163 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 164 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 165 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 166 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 167 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 168 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 169 | impl_spi!(SPI5, APB2); | ||
| 170 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 171 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 172 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 173 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 174 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 175 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 176 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 177 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 178 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 179 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 180 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 181 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 182 | impl_usart!(USART1); |
| @@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 160 | pub use regs::dma_v2 as dma; | 211 | pub use regs::dma_v2 as dma; |
| 161 | pub use regs::exti_v1 as exti; | 212 | pub use regs::exti_v1 as exti; |
| 162 | pub use regs::gpio_v2 as gpio; | 213 | pub use regs::gpio_v2 as gpio; |
| 214 | pub use regs::spi_v1 as spi; | ||
| 163 | pub use regs::syscfg_f4 as syscfg; | 215 | pub use regs::syscfg_f4 as syscfg; |
| 164 | pub use regs::usart_v1 as usart; | 216 | pub use regs::usart_v1 as usart; |
| 165 | mod regs; | 217 | mod regs; |
| @@ -174,7 +226,8 @@ peripherals!( | |||
| 174 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 226 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 175 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 227 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 176 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 228 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 177 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 229 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, |
| 230 | USART6 | ||
| 178 | ); | 231 | ); |
| 179 | 232 | ||
| 180 | pub mod interrupt { | 233 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f411ce.rs b/embassy-stm32/src/pac/stm32f411ce.rs index 1e54e97c9..325aee85a 100644 --- a/embassy-stm32/src/pac/stm32f411ce.rs +++ b/embassy-stm32/src/pac/stm32f411ce.rs | |||
| @@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 146 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 147 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 148 | impl_spi!(SPI3, APB1); | ||
| 149 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 150 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 151 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 152 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 153 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 154 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 155 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 156 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 157 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 158 | impl_spi!(SPI4, APB2); | ||
| 159 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 160 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 161 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 162 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 163 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 164 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 165 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 166 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 167 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 168 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 169 | impl_spi!(SPI5, APB2); | ||
| 170 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 171 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 172 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 173 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 174 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 175 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 176 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 177 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 178 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 179 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 180 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 181 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 182 | impl_usart!(USART1); |
| @@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 160 | pub use regs::dma_v2 as dma; | 211 | pub use regs::dma_v2 as dma; |
| 161 | pub use regs::exti_v1 as exti; | 212 | pub use regs::exti_v1 as exti; |
| 162 | pub use regs::gpio_v2 as gpio; | 213 | pub use regs::gpio_v2 as gpio; |
| 214 | pub use regs::spi_v1 as spi; | ||
| 163 | pub use regs::syscfg_f4 as syscfg; | 215 | pub use regs::syscfg_f4 as syscfg; |
| 164 | pub use regs::usart_v1 as usart; | 216 | pub use regs::usart_v1 as usart; |
| 165 | mod regs; | 217 | mod regs; |
| @@ -174,7 +226,8 @@ peripherals!( | |||
| 174 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 226 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 175 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 227 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 176 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 228 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 177 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 229 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, |
| 230 | USART6 | ||
| 178 | ); | 231 | ); |
| 179 | 232 | ||
| 180 | pub mod interrupt { | 233 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f411rc.rs b/embassy-stm32/src/pac/stm32f411rc.rs index 1e54e97c9..325aee85a 100644 --- a/embassy-stm32/src/pac/stm32f411rc.rs +++ b/embassy-stm32/src/pac/stm32f411rc.rs | |||
| @@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 146 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 147 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 148 | impl_spi!(SPI3, APB1); | ||
| 149 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 150 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 151 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 152 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 153 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 154 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 155 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 156 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 157 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 158 | impl_spi!(SPI4, APB2); | ||
| 159 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 160 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 161 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 162 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 163 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 164 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 165 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 166 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 167 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 168 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 169 | impl_spi!(SPI5, APB2); | ||
| 170 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 171 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 172 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 173 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 174 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 175 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 176 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 177 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 178 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 179 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 180 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 181 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 182 | impl_usart!(USART1); |
| @@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 160 | pub use regs::dma_v2 as dma; | 211 | pub use regs::dma_v2 as dma; |
| 161 | pub use regs::exti_v1 as exti; | 212 | pub use regs::exti_v1 as exti; |
| 162 | pub use regs::gpio_v2 as gpio; | 213 | pub use regs::gpio_v2 as gpio; |
| 214 | pub use regs::spi_v1 as spi; | ||
| 163 | pub use regs::syscfg_f4 as syscfg; | 215 | pub use regs::syscfg_f4 as syscfg; |
| 164 | pub use regs::usart_v1 as usart; | 216 | pub use regs::usart_v1 as usart; |
| 165 | mod regs; | 217 | mod regs; |
| @@ -174,7 +226,8 @@ peripherals!( | |||
| 174 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 226 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 175 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 227 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 176 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 228 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 177 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 229 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, |
| 230 | USART6 | ||
| 178 | ); | 231 | ); |
| 179 | 232 | ||
| 180 | pub mod interrupt { | 233 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f411re.rs b/embassy-stm32/src/pac/stm32f411re.rs index 1e54e97c9..325aee85a 100644 --- a/embassy-stm32/src/pac/stm32f411re.rs +++ b/embassy-stm32/src/pac/stm32f411re.rs | |||
| @@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 146 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 147 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 148 | impl_spi!(SPI3, APB1); | ||
| 149 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 150 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 151 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 152 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 153 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 154 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 155 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 156 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 157 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 158 | impl_spi!(SPI4, APB2); | ||
| 159 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 160 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 161 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 162 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 163 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 164 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 165 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 166 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 167 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 168 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 169 | impl_spi!(SPI5, APB2); | ||
| 170 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 171 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 172 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 173 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 174 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 175 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 176 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 177 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 178 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 179 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 180 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 181 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 182 | impl_usart!(USART1); |
| @@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 160 | pub use regs::dma_v2 as dma; | 211 | pub use regs::dma_v2 as dma; |
| 161 | pub use regs::exti_v1 as exti; | 212 | pub use regs::exti_v1 as exti; |
| 162 | pub use regs::gpio_v2 as gpio; | 213 | pub use regs::gpio_v2 as gpio; |
| 214 | pub use regs::spi_v1 as spi; | ||
| 163 | pub use regs::syscfg_f4 as syscfg; | 215 | pub use regs::syscfg_f4 as syscfg; |
| 164 | pub use regs::usart_v1 as usart; | 216 | pub use regs::usart_v1 as usart; |
| 165 | mod regs; | 217 | mod regs; |
| @@ -174,7 +226,8 @@ peripherals!( | |||
| 174 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 226 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 175 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 227 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 176 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 228 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 177 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 229 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, |
| 230 | USART6 | ||
| 178 | ); | 231 | ); |
| 179 | 232 | ||
| 180 | pub mod interrupt { | 233 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f411vc.rs b/embassy-stm32/src/pac/stm32f411vc.rs index 1e54e97c9..325aee85a 100644 --- a/embassy-stm32/src/pac/stm32f411vc.rs +++ b/embassy-stm32/src/pac/stm32f411vc.rs | |||
| @@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 146 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 147 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 148 | impl_spi!(SPI3, APB1); | ||
| 149 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 150 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 151 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 152 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 153 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 154 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 155 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 156 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 157 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 158 | impl_spi!(SPI4, APB2); | ||
| 159 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 160 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 161 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 162 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 163 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 164 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 165 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 166 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 167 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 168 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 169 | impl_spi!(SPI5, APB2); | ||
| 170 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 171 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 172 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 173 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 174 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 175 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 176 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 177 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 178 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 179 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 180 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 181 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 182 | impl_usart!(USART1); |
| @@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 160 | pub use regs::dma_v2 as dma; | 211 | pub use regs::dma_v2 as dma; |
| 161 | pub use regs::exti_v1 as exti; | 212 | pub use regs::exti_v1 as exti; |
| 162 | pub use regs::gpio_v2 as gpio; | 213 | pub use regs::gpio_v2 as gpio; |
| 214 | pub use regs::spi_v1 as spi; | ||
| 163 | pub use regs::syscfg_f4 as syscfg; | 215 | pub use regs::syscfg_f4 as syscfg; |
| 164 | pub use regs::usart_v1 as usart; | 216 | pub use regs::usart_v1 as usart; |
| 165 | mod regs; | 217 | mod regs; |
| @@ -174,7 +226,8 @@ peripherals!( | |||
| 174 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 226 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 175 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 227 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 176 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 228 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 177 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 229 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, |
| 230 | USART6 | ||
| 178 | ); | 231 | ); |
| 179 | 232 | ||
| 180 | pub mod interrupt { | 233 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f411ve.rs b/embassy-stm32/src/pac/stm32f411ve.rs index 1e54e97c9..325aee85a 100644 --- a/embassy-stm32/src/pac/stm32f411ve.rs +++ b/embassy-stm32/src/pac/stm32f411ve.rs | |||
| @@ -126,6 +126,57 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 126 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 130 | impl_spi!(SPI1, APB2); | ||
| 131 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 132 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 133 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 134 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 135 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 136 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 137 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 138 | impl_spi!(SPI2, APB1); | ||
| 139 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 140 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 141 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 142 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 143 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 144 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 145 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 146 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 147 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 148 | impl_spi!(SPI3, APB1); | ||
| 149 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 150 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 151 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 152 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 153 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 154 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 155 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 156 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 157 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 158 | impl_spi!(SPI4, APB2); | ||
| 159 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 160 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 161 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 162 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 163 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 164 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 165 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 166 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 167 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 168 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 169 | impl_spi!(SPI5, APB2); | ||
| 170 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 171 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 172 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 173 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 174 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 175 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 176 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 177 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 178 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 179 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 129 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 180 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 130 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 181 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 131 | impl_usart!(USART1); | 182 | impl_usart!(USART1); |
| @@ -160,6 +211,7 @@ impl_usart_pin!(USART6, CkPin, PC8, 8); | |||
| 160 | pub use regs::dma_v2 as dma; | 211 | pub use regs::dma_v2 as dma; |
| 161 | pub use regs::exti_v1 as exti; | 212 | pub use regs::exti_v1 as exti; |
| 162 | pub use regs::gpio_v2 as gpio; | 213 | pub use regs::gpio_v2 as gpio; |
| 214 | pub use regs::spi_v1 as spi; | ||
| 163 | pub use regs::syscfg_f4 as syscfg; | 215 | pub use regs::syscfg_f4 as syscfg; |
| 164 | pub use regs::usart_v1 as usart; | 216 | pub use regs::usart_v1 as usart; |
| 165 | mod regs; | 217 | mod regs; |
| @@ -174,7 +226,8 @@ peripherals!( | |||
| 174 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 226 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 175 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, | 227 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PE0, PE1, PE2, PE3, PE4, PE5, PE6, PE7, |
| 176 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, | 228 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, |
| 177 | PH10, PH11, PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART6 | 229 | PH10, PH11, PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, |
| 230 | USART6 | ||
| 178 | ); | 231 | ); |
| 179 | 232 | ||
| 180 | pub mod interrupt { | 233 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f412ce.rs b/embassy-stm32/src/pac/stm32f412ce.rs index 9f734f6e1..ae976e690 100644 --- a/embassy-stm32/src/pac/stm32f412ce.rs +++ b/embassy-stm32/src/pac/stm32f412ce.rs | |||
| @@ -93,7 +93,44 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 95 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 95 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 96 | impl_rng!(RNG); | 96 | impl_rng!(RNG, RNG); |
| 97 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 98 | impl_spi!(SPI1, APB2); | ||
| 99 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 100 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 101 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 102 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 103 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 104 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 105 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 106 | impl_spi!(SPI2, APB1); | ||
| 107 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 108 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 109 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 110 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 111 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 112 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 113 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 114 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 115 | impl_spi!(SPI3, APB1); | ||
| 116 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 117 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 118 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 119 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 120 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 121 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 122 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 123 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 124 | impl_spi!(SPI4, APB2); | ||
| 125 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 126 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 127 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 128 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 129 | impl_spi!(SPI5, APB2); | ||
| 130 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 131 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 132 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 133 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 134 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 135 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 99 | impl_usart!(USART1); | 136 | impl_usart!(USART1); |
| @@ -135,6 +172,7 @@ pub use regs::dma_v2 as dma; | |||
| 135 | pub use regs::exti_v1 as exti; | 172 | pub use regs::exti_v1 as exti; |
| 136 | pub use regs::gpio_v2 as gpio; | 173 | pub use regs::gpio_v2 as gpio; |
| 137 | pub use regs::rng_v1 as rng; | 174 | pub use regs::rng_v1 as rng; |
| 175 | pub use regs::spi_v1 as spi; | ||
| 138 | pub use regs::syscfg_f4 as syscfg; | 176 | pub use regs::syscfg_f4 as syscfg; |
| 139 | pub use regs::usart_v1 as usart; | 177 | pub use regs::usart_v1 as usart; |
| 140 | mod regs; | 178 | mod regs; |
| @@ -147,8 +185,8 @@ peripherals!( | |||
| 147 | PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1, | 185 | PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1, |
| 148 | PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, | 186 | PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, |
| 149 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5, | 187 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5, |
| 150 | PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, | 188 | PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, |
| 151 | USART6 | 189 | SYSCFG, USART1, USART2, USART3, USART6 |
| 152 | ); | 190 | ); |
| 153 | 191 | ||
| 154 | pub mod interrupt { | 192 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f412cg.rs b/embassy-stm32/src/pac/stm32f412cg.rs index 9f734f6e1..ae976e690 100644 --- a/embassy-stm32/src/pac/stm32f412cg.rs +++ b/embassy-stm32/src/pac/stm32f412cg.rs | |||
| @@ -93,7 +93,44 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 95 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 95 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 96 | impl_rng!(RNG); | 96 | impl_rng!(RNG, RNG); |
| 97 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 98 | impl_spi!(SPI1, APB2); | ||
| 99 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 100 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 101 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 102 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 103 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 104 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 105 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 106 | impl_spi!(SPI2, APB1); | ||
| 107 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 108 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 109 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 110 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 111 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 112 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 113 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 114 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 115 | impl_spi!(SPI3, APB1); | ||
| 116 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 117 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 118 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 119 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 120 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 121 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 122 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 123 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 124 | impl_spi!(SPI4, APB2); | ||
| 125 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 126 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 127 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 128 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 129 | impl_spi!(SPI5, APB2); | ||
| 130 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 131 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 132 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 133 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 97 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 134 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 98 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 135 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 99 | impl_usart!(USART1); | 136 | impl_usart!(USART1); |
| @@ -135,6 +172,7 @@ pub use regs::dma_v2 as dma; | |||
| 135 | pub use regs::exti_v1 as exti; | 172 | pub use regs::exti_v1 as exti; |
| 136 | pub use regs::gpio_v2 as gpio; | 173 | pub use regs::gpio_v2 as gpio; |
| 137 | pub use regs::rng_v1 as rng; | 174 | pub use regs::rng_v1 as rng; |
| 175 | pub use regs::spi_v1 as spi; | ||
| 138 | pub use regs::syscfg_f4 as syscfg; | 176 | pub use regs::syscfg_f4 as syscfg; |
| 139 | pub use regs::usart_v1 as usart; | 177 | pub use regs::usart_v1 as usart; |
| 140 | mod regs; | 178 | mod regs; |
| @@ -147,8 +185,8 @@ peripherals!( | |||
| 147 | PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1, | 185 | PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PB0, PB1, |
| 148 | PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, | 186 | PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, |
| 149 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5, | 187 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PH0, PH1, PH2, PH3, PH4, PH5, |
| 150 | PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, | 188 | PH6, PH7, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, |
| 151 | USART6 | 189 | SYSCFG, USART1, USART2, USART3, USART6 |
| 152 | ); | 190 | ); |
| 153 | 191 | ||
| 154 | pub mod interrupt { | 192 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f412re.rs b/embassy-stm32/src/pac/stm32f412re.rs index faee66505..819f0c06c 100644 --- a/embassy-stm32/src/pac/stm32f412re.rs +++ b/embassy-stm32/src/pac/stm32f412re.rs | |||
| @@ -110,7 +110,46 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 115 | impl_spi!(SPI1, APB2); | ||
| 116 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 117 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 118 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 119 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 120 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 121 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 122 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 123 | impl_spi!(SPI2, APB1); | ||
| 124 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 125 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 126 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 127 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 128 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 129 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 130 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 131 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 132 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 133 | impl_spi!(SPI3, APB1); | ||
| 134 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 135 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 136 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 137 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 138 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 139 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 140 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 141 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 142 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 143 | impl_spi!(SPI4, APB2); | ||
| 144 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 145 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 146 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 147 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 148 | impl_spi!(SPI5, APB2); | ||
| 149 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 150 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 151 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 152 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 153 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 154 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 116 | impl_usart!(USART1); | 155 | impl_usart!(USART1); |
| @@ -162,6 +201,7 @@ pub use regs::dma_v2 as dma; | |||
| 162 | pub use regs::exti_v1 as exti; | 201 | pub use regs::exti_v1 as exti; |
| 163 | pub use regs::gpio_v2 as gpio; | 202 | pub use regs::gpio_v2 as gpio; |
| 164 | pub use regs::rng_v1 as rng; | 203 | pub use regs::rng_v1 as rng; |
| 204 | pub use regs::spi_v1 as spi; | ||
| 165 | pub use regs::syscfg_f4 as syscfg; | 205 | pub use regs::syscfg_f4 as syscfg; |
| 166 | pub use regs::usart_v1 as usart; | 206 | pub use regs::usart_v1 as usart; |
| 167 | mod regs; | 207 | mod regs; |
| @@ -175,7 +215,8 @@ peripherals!( | |||
| 175 | PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, | 215 | PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, |
| 176 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 216 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 177 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, | 217 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, |
| 178 | PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 218 | PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, |
| 219 | USART1, USART2, USART3, USART6 | ||
| 179 | ); | 220 | ); |
| 180 | 221 | ||
| 181 | pub mod interrupt { | 222 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f412rg.rs b/embassy-stm32/src/pac/stm32f412rg.rs index faee66505..819f0c06c 100644 --- a/embassy-stm32/src/pac/stm32f412rg.rs +++ b/embassy-stm32/src/pac/stm32f412rg.rs | |||
| @@ -110,7 +110,46 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 115 | impl_spi!(SPI1, APB2); | ||
| 116 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 117 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 118 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 119 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 120 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 121 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 122 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 123 | impl_spi!(SPI2, APB1); | ||
| 124 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 125 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 126 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 127 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 128 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 129 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 130 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 131 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 132 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 133 | impl_spi!(SPI3, APB1); | ||
| 134 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 135 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 136 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 137 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 138 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 139 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 140 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 141 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 142 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 143 | impl_spi!(SPI4, APB2); | ||
| 144 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 145 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 146 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 147 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 148 | impl_spi!(SPI5, APB2); | ||
| 149 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 150 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 151 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 152 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 153 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 154 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 116 | impl_usart!(USART1); | 155 | impl_usart!(USART1); |
| @@ -162,6 +201,7 @@ pub use regs::dma_v2 as dma; | |||
| 162 | pub use regs::exti_v1 as exti; | 201 | pub use regs::exti_v1 as exti; |
| 163 | pub use regs::gpio_v2 as gpio; | 202 | pub use regs::gpio_v2 as gpio; |
| 164 | pub use regs::rng_v1 as rng; | 203 | pub use regs::rng_v1 as rng; |
| 204 | pub use regs::spi_v1 as spi; | ||
| 165 | pub use regs::syscfg_f4 as syscfg; | 205 | pub use regs::syscfg_f4 as syscfg; |
| 166 | pub use regs::usart_v1 as usart; | 206 | pub use regs::usart_v1 as usart; |
| 167 | mod regs; | 207 | mod regs; |
| @@ -175,7 +215,8 @@ peripherals!( | |||
| 175 | PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, | 215 | PB2, PB3, PB4, PB5, PB6, PB7, PB8, PB9, PB10, PB11, PB12, PB13, PB14, PB15, PC0, PC1, PC2, PC3, |
| 176 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, | 216 | PC4, PC5, PC6, PC7, PC8, PC9, PC10, PC11, PC12, PC13, PC14, PC15, PD0, PD1, PD2, PD3, PD4, PD5, |
| 177 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, | 217 | PD6, PD7, PD8, PD9, PD10, PD11, PD12, PD13, PD14, PD15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, |
| 178 | PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 218 | PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, |
| 219 | USART1, USART2, USART3, USART6 | ||
| 179 | ); | 220 | ); |
| 180 | 221 | ||
| 181 | pub mod interrupt { | 222 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f412ve.rs b/embassy-stm32/src/pac/stm32f412ve.rs index 035b44f21..9e109b61f 100644 --- a/embassy-stm32/src/pac/stm32f412ve.rs +++ b/embassy-stm32/src/pac/stm32f412ve.rs | |||
| @@ -161,7 +161,58 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 177 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 186 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 187 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 188 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 192 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 193 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 194 | impl_spi!(SPI4, APB2); | ||
| 195 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 196 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 197 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 198 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 200 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 204 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 205 | impl_spi!(SPI5, APB2); | ||
| 206 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 207 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 208 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 210 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
| @@ -220,6 +271,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 271 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 272 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 273 | pub use regs::rng_v1 as rng; |
| 274 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 275 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 276 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 277 | mod regs; |
| @@ -236,7 +288,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 288 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 289 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 290 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 291 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 292 | USART6 | ||
| 240 | ); | 293 | ); |
| 241 | 294 | ||
| 242 | pub mod interrupt { | 295 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f412vg.rs b/embassy-stm32/src/pac/stm32f412vg.rs index 035b44f21..9e109b61f 100644 --- a/embassy-stm32/src/pac/stm32f412vg.rs +++ b/embassy-stm32/src/pac/stm32f412vg.rs | |||
| @@ -161,7 +161,58 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 177 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 186 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 187 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 188 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 192 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 193 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 194 | impl_spi!(SPI4, APB2); | ||
| 195 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 196 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 197 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 198 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 200 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 204 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 205 | impl_spi!(SPI5, APB2); | ||
| 206 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 207 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 208 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 210 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
| @@ -220,6 +271,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 271 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 272 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 273 | pub use regs::rng_v1 as rng; |
| 274 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 275 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 276 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 277 | mod regs; |
| @@ -236,7 +288,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 288 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 289 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 290 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 291 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 292 | USART6 | ||
| 240 | ); | 293 | ); |
| 241 | 294 | ||
| 242 | pub mod interrupt { | 295 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f412ze.rs b/embassy-stm32/src/pac/stm32f412ze.rs index 035b44f21..9e109b61f 100644 --- a/embassy-stm32/src/pac/stm32f412ze.rs +++ b/embassy-stm32/src/pac/stm32f412ze.rs | |||
| @@ -161,7 +161,58 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 177 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 186 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 187 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 188 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 192 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 193 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 194 | impl_spi!(SPI4, APB2); | ||
| 195 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 196 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 197 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 198 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 200 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 204 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 205 | impl_spi!(SPI5, APB2); | ||
| 206 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 207 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 208 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 210 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
| @@ -220,6 +271,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 271 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 272 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 273 | pub use regs::rng_v1 as rng; |
| 274 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 275 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 276 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 277 | mod regs; |
| @@ -236,7 +288,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 288 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 289 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 290 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 291 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 292 | USART6 | ||
| 240 | ); | 293 | ); |
| 241 | 294 | ||
| 242 | pub mod interrupt { | 295 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f412zg.rs b/embassy-stm32/src/pac/stm32f412zg.rs index 035b44f21..9e109b61f 100644 --- a/embassy-stm32/src/pac/stm32f412zg.rs +++ b/embassy-stm32/src/pac/stm32f412zg.rs | |||
| @@ -161,7 +161,58 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 177 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 186 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 187 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 188 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 192 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 193 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 194 | impl_spi!(SPI4, APB2); | ||
| 195 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 196 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 197 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 198 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 200 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 204 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 205 | impl_spi!(SPI5, APB2); | ||
| 206 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 207 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 208 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 210 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
| @@ -220,6 +271,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 271 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 272 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 273 | pub use regs::rng_v1 as rng; |
| 274 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 275 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 276 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 277 | mod regs; |
| @@ -236,7 +288,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 288 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 289 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 290 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 291 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 292 | USART6 | ||
| 240 | ); | 293 | ); |
| 241 | 294 | ||
| 242 | pub mod interrupt { | 295 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f413cg.rs b/embassy-stm32/src/pac/stm32f413cg.rs index b2b2c30d6..f74b0f400 100644 --- a/embassy-stm32/src/pac/stm32f413cg.rs +++ b/embassy-stm32/src/pac/stm32f413cg.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -204,6 +258,7 @@ pub use regs::dma_v2 as dma; | |||
| 204 | pub use regs::exti_v1 as exti; | 258 | pub use regs::exti_v1 as exti; |
| 205 | pub use regs::gpio_v2 as gpio; | 259 | pub use regs::gpio_v2 as gpio; |
| 206 | pub use regs::rng_v1 as rng; | 260 | pub use regs::rng_v1 as rng; |
| 261 | pub use regs::spi_v1 as spi; | ||
| 207 | pub use regs::syscfg_f4 as syscfg; | 262 | pub use regs::syscfg_f4 as syscfg; |
| 208 | pub use regs::usart_v1 as usart; | 263 | pub use regs::usart_v1 as usart; |
| 209 | mod regs; | 264 | mod regs; |
| @@ -220,7 +275,7 @@ peripherals!( | |||
| 220 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 275 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 221 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 276 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 222 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 277 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 223 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART6 | 278 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART6 |
| 224 | ); | 279 | ); |
| 225 | 280 | ||
| 226 | pub mod interrupt { | 281 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f413ch.rs b/embassy-stm32/src/pac/stm32f413ch.rs index b2b2c30d6..f74b0f400 100644 --- a/embassy-stm32/src/pac/stm32f413ch.rs +++ b/embassy-stm32/src/pac/stm32f413ch.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -204,6 +258,7 @@ pub use regs::dma_v2 as dma; | |||
| 204 | pub use regs::exti_v1 as exti; | 258 | pub use regs::exti_v1 as exti; |
| 205 | pub use regs::gpio_v2 as gpio; | 259 | pub use regs::gpio_v2 as gpio; |
| 206 | pub use regs::rng_v1 as rng; | 260 | pub use regs::rng_v1 as rng; |
| 261 | pub use regs::spi_v1 as spi; | ||
| 207 | pub use regs::syscfg_f4 as syscfg; | 262 | pub use regs::syscfg_f4 as syscfg; |
| 208 | pub use regs::usart_v1 as usart; | 263 | pub use regs::usart_v1 as usart; |
| 209 | mod regs; | 264 | mod regs; |
| @@ -220,7 +275,7 @@ peripherals!( | |||
| 220 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 275 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 221 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 276 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 222 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 277 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 223 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART6 | 278 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART6 |
| 224 | ); | 279 | ); |
| 225 | 280 | ||
| 226 | pub mod interrupt { | 281 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f413mg.rs b/embassy-stm32/src/pac/stm32f413mg.rs index e653d0cb1..f2cd2b65d 100644 --- a/embassy-stm32/src/pac/stm32f413mg.rs +++ b/embassy-stm32/src/pac/stm32f413mg.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f413mh.rs b/embassy-stm32/src/pac/stm32f413mh.rs index e653d0cb1..f2cd2b65d 100644 --- a/embassy-stm32/src/pac/stm32f413mh.rs +++ b/embassy-stm32/src/pac/stm32f413mh.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f413rg.rs b/embassy-stm32/src/pac/stm32f413rg.rs index e653d0cb1..f2cd2b65d 100644 --- a/embassy-stm32/src/pac/stm32f413rg.rs +++ b/embassy-stm32/src/pac/stm32f413rg.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f413rh.rs b/embassy-stm32/src/pac/stm32f413rh.rs index e653d0cb1..f2cd2b65d 100644 --- a/embassy-stm32/src/pac/stm32f413rh.rs +++ b/embassy-stm32/src/pac/stm32f413rh.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f413vg.rs b/embassy-stm32/src/pac/stm32f413vg.rs index e653d0cb1..f2cd2b65d 100644 --- a/embassy-stm32/src/pac/stm32f413vg.rs +++ b/embassy-stm32/src/pac/stm32f413vg.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f413vh.rs b/embassy-stm32/src/pac/stm32f413vh.rs index e653d0cb1..f2cd2b65d 100644 --- a/embassy-stm32/src/pac/stm32f413vh.rs +++ b/embassy-stm32/src/pac/stm32f413vh.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f413zg.rs b/embassy-stm32/src/pac/stm32f413zg.rs index e653d0cb1..f2cd2b65d 100644 --- a/embassy-stm32/src/pac/stm32f413zg.rs +++ b/embassy-stm32/src/pac/stm32f413zg.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f413zh.rs b/embassy-stm32/src/pac/stm32f413zh.rs index e653d0cb1..f2cd2b65d 100644 --- a/embassy-stm32/src/pac/stm32f413zh.rs +++ b/embassy-stm32/src/pac/stm32f413zh.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f415og.rs b/embassy-stm32/src/pac/stm32f415og.rs index 46f5b252c..490a8c54e 100644 --- a/embassy-stm32/src/pac/stm32f415og.rs +++ b/embassy-stm32/src/pac/stm32f415og.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f415rg.rs b/embassy-stm32/src/pac/stm32f415rg.rs index 46f5b252c..490a8c54e 100644 --- a/embassy-stm32/src/pac/stm32f415rg.rs +++ b/embassy-stm32/src/pac/stm32f415rg.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f415vg.rs b/embassy-stm32/src/pac/stm32f415vg.rs index 46f5b252c..490a8c54e 100644 --- a/embassy-stm32/src/pac/stm32f415vg.rs +++ b/embassy-stm32/src/pac/stm32f415vg.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f415zg.rs b/embassy-stm32/src/pac/stm32f415zg.rs index 46f5b252c..490a8c54e 100644 --- a/embassy-stm32/src/pac/stm32f415zg.rs +++ b/embassy-stm32/src/pac/stm32f415zg.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f417ie.rs b/embassy-stm32/src/pac/stm32f417ie.rs index 1a528a3ca..04a3e952a 100644 --- a/embassy-stm32/src/pac/stm32f417ie.rs +++ b/embassy-stm32/src/pac/stm32f417ie.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f417ig.rs b/embassy-stm32/src/pac/stm32f417ig.rs index 1a528a3ca..04a3e952a 100644 --- a/embassy-stm32/src/pac/stm32f417ig.rs +++ b/embassy-stm32/src/pac/stm32f417ig.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f417ve.rs b/embassy-stm32/src/pac/stm32f417ve.rs index 1a528a3ca..04a3e952a 100644 --- a/embassy-stm32/src/pac/stm32f417ve.rs +++ b/embassy-stm32/src/pac/stm32f417ve.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f417vg.rs b/embassy-stm32/src/pac/stm32f417vg.rs index 1a528a3ca..04a3e952a 100644 --- a/embassy-stm32/src/pac/stm32f417vg.rs +++ b/embassy-stm32/src/pac/stm32f417vg.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f417ze.rs b/embassy-stm32/src/pac/stm32f417ze.rs index 1a528a3ca..04a3e952a 100644 --- a/embassy-stm32/src/pac/stm32f417ze.rs +++ b/embassy-stm32/src/pac/stm32f417ze.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f417zg.rs b/embassy-stm32/src/pac/stm32f417zg.rs index 1a528a3ca..04a3e952a 100644 --- a/embassy-stm32/src/pac/stm32f417zg.rs +++ b/embassy-stm32/src/pac/stm32f417zg.rs | |||
| @@ -178,7 +178,34 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 183 | impl_spi!(SPI1, APB2); | ||
| 184 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 185 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 186 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 187 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 188 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 189 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 190 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 191 | impl_spi!(SPI2, APB1); | ||
| 192 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 193 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 194 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 195 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 196 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 197 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 198 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 199 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 200 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 201 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 202 | impl_spi!(SPI3, APB1); | ||
| 203 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 204 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 205 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 206 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 207 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 208 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 182 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 209 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 183 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 210 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 184 | impl_usart!(USART1); | 211 | impl_usart!(USART1); |
| @@ -232,6 +259,7 @@ pub use regs::dma_v2 as dma; | |||
| 232 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 233 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 234 | pub use regs::rng_v1 as rng; | 261 | pub use regs::rng_v1 as rng; |
| 262 | pub use regs::spi_v1 as spi; | ||
| 235 | pub use regs::syscfg_f4 as syscfg; | 263 | pub use regs::syscfg_f4 as syscfg; |
| 236 | pub use regs::usart_v1 as usart; | 264 | pub use regs::usart_v1 as usart; |
| 237 | mod regs; | 265 | mod regs; |
| @@ -249,7 +277,7 @@ peripherals!( | |||
| 249 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 277 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 250 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 278 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 251 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 279 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 252 | PI13, PI14, PI15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 280 | PI13, PI14, PI15, RNG, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 253 | ); | 281 | ); |
| 254 | 282 | ||
| 255 | pub mod interrupt { | 283 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f423ch.rs b/embassy-stm32/src/pac/stm32f423ch.rs index 887aa7126..239676a63 100644 --- a/embassy-stm32/src/pac/stm32f423ch.rs +++ b/embassy-stm32/src/pac/stm32f423ch.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -204,6 +258,7 @@ pub use regs::dma_v2 as dma; | |||
| 204 | pub use regs::exti_v1 as exti; | 258 | pub use regs::exti_v1 as exti; |
| 205 | pub use regs::gpio_v2 as gpio; | 259 | pub use regs::gpio_v2 as gpio; |
| 206 | pub use regs::rng_v1 as rng; | 260 | pub use regs::rng_v1 as rng; |
| 261 | pub use regs::spi_v1 as spi; | ||
| 207 | pub use regs::syscfg_f4 as syscfg; | 262 | pub use regs::syscfg_f4 as syscfg; |
| 208 | pub use regs::usart_v1 as usart; | 263 | pub use regs::usart_v1 as usart; |
| 209 | mod regs; | 264 | mod regs; |
| @@ -220,7 +275,7 @@ peripherals!( | |||
| 220 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 275 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 221 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 276 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 222 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 277 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 223 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART6 | 278 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART6 |
| 224 | ); | 279 | ); |
| 225 | 280 | ||
| 226 | pub mod interrupt { | 281 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f423mh.rs b/embassy-stm32/src/pac/stm32f423mh.rs index 00c927ce2..0708def54 100644 --- a/embassy-stm32/src/pac/stm32f423mh.rs +++ b/embassy-stm32/src/pac/stm32f423mh.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f423rh.rs b/embassy-stm32/src/pac/stm32f423rh.rs index 00c927ce2..0708def54 100644 --- a/embassy-stm32/src/pac/stm32f423rh.rs +++ b/embassy-stm32/src/pac/stm32f423rh.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f423vh.rs b/embassy-stm32/src/pac/stm32f423vh.rs index 00c927ce2..0708def54 100644 --- a/embassy-stm32/src/pac/stm32f423vh.rs +++ b/embassy-stm32/src/pac/stm32f423vh.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f423zh.rs b/embassy-stm32/src/pac/stm32f423zh.rs index 00c927ce2..0708def54 100644 --- a/embassy-stm32/src/pac/stm32f423zh.rs +++ b/embassy-stm32/src/pac/stm32f423zh.rs | |||
| @@ -161,7 +161,61 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 166 | impl_spi!(SPI1, APB2); | ||
| 167 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 168 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 169 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 170 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 171 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 172 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 173 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 174 | impl_spi!(SPI2, APB1); | ||
| 175 | impl_spi_pin!(SPI2, Mosi, PA10, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PA12, 5); | ||
| 177 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 178 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 179 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 180 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 181 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 182 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 183 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 184 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 185 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 186 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 187 | impl_spi!(SPI3, APB1); | ||
| 188 | impl_spi_pin!(SPI3, Sck, PB12, 7); | ||
| 189 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 190 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 191 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 192 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 193 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Mosi, PA1, 5); | ||
| 199 | impl_spi_pin!(SPI4, Miso, PA11, 6); | ||
| 200 | impl_spi_pin!(SPI4, Sck, PB13, 6); | ||
| 201 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 202 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 203 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 204 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 205 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 206 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 207 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 208 | impl_spi!(SPI5, APB2); | ||
| 209 | impl_spi_pin!(SPI5, Mosi, PA10, 6); | ||
| 210 | impl_spi_pin!(SPI5, Miso, PA12, 6); | ||
| 211 | impl_spi_pin!(SPI5, Sck, PB0, 6); | ||
| 212 | impl_spi_pin!(SPI5, Mosi, PB8, 6); | ||
| 213 | impl_spi_pin!(SPI5, Sck, PE12, 6); | ||
| 214 | impl_spi_pin!(SPI5, Miso, PE13, 6); | ||
| 215 | impl_spi_pin!(SPI5, Mosi, PE14, 6); | ||
| 216 | impl_spi_pin!(SPI5, Sck, PE2, 6); | ||
| 217 | impl_spi_pin!(SPI5, Miso, PE5, 6); | ||
| 218 | impl_spi_pin!(SPI5, Mosi, PE6, 6); | ||
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 219 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 220 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 167 | impl_usart!(USART1); | 221 | impl_usart!(USART1); |
| @@ -220,6 +274,7 @@ pub use regs::dma_v2 as dma; | |||
| 220 | pub use regs::exti_v1 as exti; | 274 | pub use regs::exti_v1 as exti; |
| 221 | pub use regs::gpio_v2 as gpio; | 275 | pub use regs::gpio_v2 as gpio; |
| 222 | pub use regs::rng_v1 as rng; | 276 | pub use regs::rng_v1 as rng; |
| 277 | pub use regs::spi_v1 as spi; | ||
| 223 | pub use regs::syscfg_f4 as syscfg; | 278 | pub use regs::syscfg_f4 as syscfg; |
| 224 | pub use regs::usart_v1 as usart; | 279 | pub use regs::usart_v1 as usart; |
| 225 | mod regs; | 280 | mod regs; |
| @@ -236,7 +291,8 @@ peripherals!( | |||
| 236 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 291 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 237 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 292 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 238 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 293 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 239 | PH12, PH13, PH14, PH15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 294 | PH12, PH13, PH14, PH15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, |
| 295 | USART6 | ||
| 240 | ); | 296 | ); |
| 241 | 297 | ||
| 242 | pub mod interrupt { | 298 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f427ag.rs b/embassy-stm32/src/pac/stm32f427ag.rs index 61acdfec2..bd166eb91 100644 --- a/embassy-stm32/src/pac/stm32f427ag.rs +++ b/embassy-stm32/src/pac/stm32f427ag.rs | |||
| @@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 261 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 262 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 263 | impl_usart!(USART1); |
| @@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 311 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 312 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 313 | pub use regs::rng_v1 as rng; |
| 314 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 315 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 316 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 317 | mod regs; |
| @@ -285,7 +331,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 331 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 332 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 333 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 334 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 335 | ); |
| 290 | 336 | ||
| 291 | pub mod interrupt { | 337 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f427ai.rs b/embassy-stm32/src/pac/stm32f427ai.rs index 61acdfec2..bd166eb91 100644 --- a/embassy-stm32/src/pac/stm32f427ai.rs +++ b/embassy-stm32/src/pac/stm32f427ai.rs | |||
| @@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 261 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 262 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 263 | impl_usart!(USART1); |
| @@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 311 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 312 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 313 | pub use regs::rng_v1 as rng; |
| 314 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 315 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 316 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 317 | mod regs; |
| @@ -285,7 +331,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 331 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 332 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 333 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 334 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 335 | ); |
| 290 | 336 | ||
| 291 | pub mod interrupt { | 337 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f427ig.rs b/embassy-stm32/src/pac/stm32f427ig.rs index 61acdfec2..6d811e913 100644 --- a/embassy-stm32/src/pac/stm32f427ig.rs +++ b/embassy-stm32/src/pac/stm32f427ig.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f427ii.rs b/embassy-stm32/src/pac/stm32f427ii.rs index 61acdfec2..6d811e913 100644 --- a/embassy-stm32/src/pac/stm32f427ii.rs +++ b/embassy-stm32/src/pac/stm32f427ii.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f427vg.rs b/embassy-stm32/src/pac/stm32f427vg.rs index 61acdfec2..a3481b099 100644 --- a/embassy-stm32/src/pac/stm32f427vg.rs +++ b/embassy-stm32/src/pac/stm32f427vg.rs | |||
| @@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 253 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 254 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 255 | impl_usart!(USART1); |
| @@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 303 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 304 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 305 | pub use regs::rng_v1 as rng; |
| 306 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 307 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 308 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 309 | mod regs; |
| @@ -285,7 +323,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 323 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 324 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 325 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 326 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 327 | ); |
| 290 | 328 | ||
| 291 | pub mod interrupt { | 329 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f427vi.rs b/embassy-stm32/src/pac/stm32f427vi.rs index 61acdfec2..a3481b099 100644 --- a/embassy-stm32/src/pac/stm32f427vi.rs +++ b/embassy-stm32/src/pac/stm32f427vi.rs | |||
| @@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 253 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 254 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 255 | impl_usart!(USART1); |
| @@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 303 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 304 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 305 | pub use regs::rng_v1 as rng; |
| 306 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 307 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 308 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 309 | mod regs; |
| @@ -285,7 +323,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 323 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 324 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 325 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 326 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 327 | ); |
| 290 | 328 | ||
| 291 | pub mod interrupt { | 329 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f427zg.rs b/embassy-stm32/src/pac/stm32f427zg.rs index 61acdfec2..6d811e913 100644 --- a/embassy-stm32/src/pac/stm32f427zg.rs +++ b/embassy-stm32/src/pac/stm32f427zg.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f427zi.rs b/embassy-stm32/src/pac/stm32f427zi.rs index 61acdfec2..6d811e913 100644 --- a/embassy-stm32/src/pac/stm32f427zi.rs +++ b/embassy-stm32/src/pac/stm32f427zi.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429ag.rs b/embassy-stm32/src/pac/stm32f429ag.rs index a1a3ab422..7b973e44c 100644 --- a/embassy-stm32/src/pac/stm32f429ag.rs +++ b/embassy-stm32/src/pac/stm32f429ag.rs | |||
| @@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 261 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 262 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 263 | impl_usart!(USART1); |
| @@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 311 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 312 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 313 | pub use regs::rng_v1 as rng; |
| 314 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 315 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 316 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 317 | mod regs; |
| @@ -285,7 +331,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 331 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 332 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 333 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 334 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 335 | ); |
| 290 | 336 | ||
| 291 | pub mod interrupt { | 337 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429ai.rs b/embassy-stm32/src/pac/stm32f429ai.rs index a1a3ab422..7b973e44c 100644 --- a/embassy-stm32/src/pac/stm32f429ai.rs +++ b/embassy-stm32/src/pac/stm32f429ai.rs | |||
| @@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 261 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 262 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 263 | impl_usart!(USART1); |
| @@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 311 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 312 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 313 | pub use regs::rng_v1 as rng; |
| 314 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 315 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 316 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 317 | mod regs; |
| @@ -285,7 +331,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 331 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 332 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 333 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 334 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 335 | ); |
| 290 | 336 | ||
| 291 | pub mod interrupt { | 337 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429be.rs b/embassy-stm32/src/pac/stm32f429be.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429be.rs +++ b/embassy-stm32/src/pac/stm32f429be.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429bg.rs b/embassy-stm32/src/pac/stm32f429bg.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429bg.rs +++ b/embassy-stm32/src/pac/stm32f429bg.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429bi.rs b/embassy-stm32/src/pac/stm32f429bi.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429bi.rs +++ b/embassy-stm32/src/pac/stm32f429bi.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429ie.rs b/embassy-stm32/src/pac/stm32f429ie.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429ie.rs +++ b/embassy-stm32/src/pac/stm32f429ie.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429ig.rs b/embassy-stm32/src/pac/stm32f429ig.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429ig.rs +++ b/embassy-stm32/src/pac/stm32f429ig.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429ii.rs b/embassy-stm32/src/pac/stm32f429ii.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429ii.rs +++ b/embassy-stm32/src/pac/stm32f429ii.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429ne.rs b/embassy-stm32/src/pac/stm32f429ne.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429ne.rs +++ b/embassy-stm32/src/pac/stm32f429ne.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429ng.rs b/embassy-stm32/src/pac/stm32f429ng.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429ng.rs +++ b/embassy-stm32/src/pac/stm32f429ng.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429ni.rs b/embassy-stm32/src/pac/stm32f429ni.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429ni.rs +++ b/embassy-stm32/src/pac/stm32f429ni.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429ve.rs b/embassy-stm32/src/pac/stm32f429ve.rs index a1a3ab422..bc50d0d0b 100644 --- a/embassy-stm32/src/pac/stm32f429ve.rs +++ b/embassy-stm32/src/pac/stm32f429ve.rs | |||
| @@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 253 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 254 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 255 | impl_usart!(USART1); |
| @@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 303 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 304 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 305 | pub use regs::rng_v1 as rng; |
| 306 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 307 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 308 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 309 | mod regs; |
| @@ -285,7 +323,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 323 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 324 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 325 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 326 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 327 | ); |
| 290 | 328 | ||
| 291 | pub mod interrupt { | 329 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429vg.rs b/embassy-stm32/src/pac/stm32f429vg.rs index a1a3ab422..bc50d0d0b 100644 --- a/embassy-stm32/src/pac/stm32f429vg.rs +++ b/embassy-stm32/src/pac/stm32f429vg.rs | |||
| @@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 253 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 254 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 255 | impl_usart!(USART1); |
| @@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 303 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 304 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 305 | pub use regs::rng_v1 as rng; |
| 306 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 307 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 308 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 309 | mod regs; |
| @@ -285,7 +323,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 323 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 324 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 325 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 326 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 327 | ); |
| 290 | 328 | ||
| 291 | pub mod interrupt { | 329 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429vi.rs b/embassy-stm32/src/pac/stm32f429vi.rs index a1a3ab422..bc50d0d0b 100644 --- a/embassy-stm32/src/pac/stm32f429vi.rs +++ b/embassy-stm32/src/pac/stm32f429vi.rs | |||
| @@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 253 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 254 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 255 | impl_usart!(USART1); |
| @@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 303 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 304 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 305 | pub use regs::rng_v1 as rng; |
| 306 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 307 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 308 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 309 | mod regs; |
| @@ -285,7 +323,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 323 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 324 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 325 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 326 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 327 | ); |
| 290 | 328 | ||
| 291 | pub mod interrupt { | 329 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429ze.rs b/embassy-stm32/src/pac/stm32f429ze.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429ze.rs +++ b/embassy-stm32/src/pac/stm32f429ze.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429zg.rs b/embassy-stm32/src/pac/stm32f429zg.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429zg.rs +++ b/embassy-stm32/src/pac/stm32f429zg.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f429zi.rs b/embassy-stm32/src/pac/stm32f429zi.rs index a1a3ab422..9a4d45b1a 100644 --- a/embassy-stm32/src/pac/stm32f429zi.rs +++ b/embassy-stm32/src/pac/stm32f429zi.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f437ai.rs b/embassy-stm32/src/pac/stm32f437ai.rs index 3c30eec9a..83748a01f 100644 --- a/embassy-stm32/src/pac/stm32f437ai.rs +++ b/embassy-stm32/src/pac/stm32f437ai.rs | |||
| @@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 261 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 262 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 263 | impl_usart!(USART1); |
| @@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 311 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 312 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 313 | pub use regs::rng_v1 as rng; |
| 314 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 315 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 316 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 317 | mod regs; |
| @@ -285,7 +331,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 331 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 332 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 333 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 334 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 335 | ); |
| 290 | 336 | ||
| 291 | pub mod interrupt { | 337 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f437ig.rs b/embassy-stm32/src/pac/stm32f437ig.rs index 3c30eec9a..30c8712e0 100644 --- a/embassy-stm32/src/pac/stm32f437ig.rs +++ b/embassy-stm32/src/pac/stm32f437ig.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f437ii.rs b/embassy-stm32/src/pac/stm32f437ii.rs index 3c30eec9a..30c8712e0 100644 --- a/embassy-stm32/src/pac/stm32f437ii.rs +++ b/embassy-stm32/src/pac/stm32f437ii.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f437vg.rs b/embassy-stm32/src/pac/stm32f437vg.rs index 3c30eec9a..f7059b8a9 100644 --- a/embassy-stm32/src/pac/stm32f437vg.rs +++ b/embassy-stm32/src/pac/stm32f437vg.rs | |||
| @@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 253 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 254 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 255 | impl_usart!(USART1); |
| @@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 303 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 304 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 305 | pub use regs::rng_v1 as rng; |
| 306 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 307 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 308 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 309 | mod regs; |
| @@ -285,7 +323,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 323 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 324 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 325 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 326 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 327 | ); |
| 290 | 328 | ||
| 291 | pub mod interrupt { | 329 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f437vi.rs b/embassy-stm32/src/pac/stm32f437vi.rs index 3c30eec9a..f7059b8a9 100644 --- a/embassy-stm32/src/pac/stm32f437vi.rs +++ b/embassy-stm32/src/pac/stm32f437vi.rs | |||
| @@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 253 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 254 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 255 | impl_usart!(USART1); |
| @@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 303 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 304 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 305 | pub use regs::rng_v1 as rng; |
| 306 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 307 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 308 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 309 | mod regs; |
| @@ -285,7 +323,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 323 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 324 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 325 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 326 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 327 | ); |
| 290 | 328 | ||
| 291 | pub mod interrupt { | 329 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f437zg.rs b/embassy-stm32/src/pac/stm32f437zg.rs index 3c30eec9a..30c8712e0 100644 --- a/embassy-stm32/src/pac/stm32f437zg.rs +++ b/embassy-stm32/src/pac/stm32f437zg.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f437zi.rs b/embassy-stm32/src/pac/stm32f437zi.rs index 3c30eec9a..30c8712e0 100644 --- a/embassy-stm32/src/pac/stm32f437zi.rs +++ b/embassy-stm32/src/pac/stm32f437zi.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f439ai.rs b/embassy-stm32/src/pac/stm32f439ai.rs index 379a3d707..128ffc57e 100644 --- a/embassy-stm32/src/pac/stm32f439ai.rs +++ b/embassy-stm32/src/pac/stm32f439ai.rs | |||
| @@ -212,7 +212,52 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 261 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 262 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 263 | impl_usart!(USART1); |
| @@ -266,6 +311,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 311 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 312 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 313 | pub use regs::rng_v1 as rng; |
| 314 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 315 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 316 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 317 | mod regs; |
| @@ -285,7 +331,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 331 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 332 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 333 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 334 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 335 | ); |
| 290 | 336 | ||
| 291 | pub mod interrupt { | 337 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f439bg.rs b/embassy-stm32/src/pac/stm32f439bg.rs index 379a3d707..34ffaac98 100644 --- a/embassy-stm32/src/pac/stm32f439bg.rs +++ b/embassy-stm32/src/pac/stm32f439bg.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f439bi.rs b/embassy-stm32/src/pac/stm32f439bi.rs index 379a3d707..34ffaac98 100644 --- a/embassy-stm32/src/pac/stm32f439bi.rs +++ b/embassy-stm32/src/pac/stm32f439bi.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f439ig.rs b/embassy-stm32/src/pac/stm32f439ig.rs index 379a3d707..34ffaac98 100644 --- a/embassy-stm32/src/pac/stm32f439ig.rs +++ b/embassy-stm32/src/pac/stm32f439ig.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f439ii.rs b/embassy-stm32/src/pac/stm32f439ii.rs index 379a3d707..34ffaac98 100644 --- a/embassy-stm32/src/pac/stm32f439ii.rs +++ b/embassy-stm32/src/pac/stm32f439ii.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f439ng.rs b/embassy-stm32/src/pac/stm32f439ng.rs index 379a3d707..34ffaac98 100644 --- a/embassy-stm32/src/pac/stm32f439ng.rs +++ b/embassy-stm32/src/pac/stm32f439ng.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f439ni.rs b/embassy-stm32/src/pac/stm32f439ni.rs index 379a3d707..34ffaac98 100644 --- a/embassy-stm32/src/pac/stm32f439ni.rs +++ b/embassy-stm32/src/pac/stm32f439ni.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f439vg.rs b/embassy-stm32/src/pac/stm32f439vg.rs index 379a3d707..3228bc47c 100644 --- a/embassy-stm32/src/pac/stm32f439vg.rs +++ b/embassy-stm32/src/pac/stm32f439vg.rs | |||
| @@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 253 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 254 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 255 | impl_usart!(USART1); |
| @@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 303 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 304 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 305 | pub use regs::rng_v1 as rng; |
| 306 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 307 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 308 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 309 | mod regs; |
| @@ -285,7 +323,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 323 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 324 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 325 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 326 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 327 | ); |
| 290 | 328 | ||
| 291 | pub mod interrupt { | 329 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f439vi.rs b/embassy-stm32/src/pac/stm32f439vi.rs index 379a3d707..3228bc47c 100644 --- a/embassy-stm32/src/pac/stm32f439vi.rs +++ b/embassy-stm32/src/pac/stm32f439vi.rs | |||
| @@ -212,7 +212,44 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 253 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 254 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 255 | impl_usart!(USART1); |
| @@ -266,6 +303,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 303 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 304 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 305 | pub use regs::rng_v1 as rng; |
| 306 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 307 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 308 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 309 | mod regs; |
| @@ -285,7 +323,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 323 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 324 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 325 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 326 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 327 | ); |
| 290 | 328 | ||
| 291 | pub mod interrupt { | 329 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f439zg.rs b/embassy-stm32/src/pac/stm32f439zg.rs index 379a3d707..34ffaac98 100644 --- a/embassy-stm32/src/pac/stm32f439zg.rs +++ b/embassy-stm32/src/pac/stm32f439zg.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f439zi.rs b/embassy-stm32/src/pac/stm32f439zi.rs index 379a3d707..34ffaac98 100644 --- a/embassy-stm32/src/pac/stm32f439zi.rs +++ b/embassy-stm32/src/pac/stm32f439zi.rs | |||
| @@ -212,7 +212,57 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 217 | impl_spi!(SPI1, APB2); | ||
| 218 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 219 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 220 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 221 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 222 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 223 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 224 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 225 | impl_spi!(SPI2, APB1); | ||
| 226 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 227 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 228 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 229 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 230 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 231 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 232 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 233 | impl_spi_pin!(SPI2, Sck, PI1, 5); | ||
| 234 | impl_spi_pin!(SPI2, Miso, PI2, 5); | ||
| 235 | impl_spi_pin!(SPI2, Mosi, PI3, 5); | ||
| 236 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 237 | impl_spi!(SPI3, APB1); | ||
| 238 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 239 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 240 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 241 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 242 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 243 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 244 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 245 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 246 | impl_spi!(SPI4, APB2); | ||
| 247 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 248 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 249 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 250 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 251 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 252 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 253 | pub const SPI5: spi::Spi = spi::Spi(0x40015000 as _); | ||
| 254 | impl_spi!(SPI5, APB2); | ||
| 255 | impl_spi_pin!(SPI5, Mosi, PF11, 5); | ||
| 256 | impl_spi_pin!(SPI5, Sck, PF7, 5); | ||
| 257 | impl_spi_pin!(SPI5, Miso, PF8, 5); | ||
| 258 | impl_spi_pin!(SPI5, Mosi, PF9, 5); | ||
| 259 | impl_spi_pin!(SPI5, Sck, PH6, 5); | ||
| 260 | impl_spi_pin!(SPI5, Miso, PH7, 5); | ||
| 261 | pub const SPI6: spi::Spi = spi::Spi(0x40015400 as _); | ||
| 262 | impl_spi!(SPI6, APB2); | ||
| 263 | impl_spi_pin!(SPI6, Miso, PG12, 5); | ||
| 264 | impl_spi_pin!(SPI6, Sck, PG13, 5); | ||
| 265 | impl_spi_pin!(SPI6, Mosi, PG14, 5); | ||
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 266 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 267 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 268 | impl_usart!(USART1); |
| @@ -266,6 +316,7 @@ pub use regs::dma_v2 as dma; | |||
| 266 | pub use regs::exti_v1 as exti; | 316 | pub use regs::exti_v1 as exti; |
| 267 | pub use regs::gpio_v2 as gpio; | 317 | pub use regs::gpio_v2 as gpio; |
| 268 | pub use regs::rng_v1 as rng; | 318 | pub use regs::rng_v1 as rng; |
| 319 | pub use regs::spi_v1 as spi; | ||
| 269 | pub use regs::syscfg_f4 as syscfg; | 320 | pub use regs::syscfg_f4 as syscfg; |
| 270 | pub use regs::usart_v1 as usart; | 321 | pub use regs::usart_v1 as usart; |
| 271 | mod regs; | 322 | mod regs; |
| @@ -285,7 +336,7 @@ peripherals!( | |||
| 285 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, | 336 | PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI4, PI5, PI6, PI7, PI8, PI9, PI10, PI11, PI12, |
| 286 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, | 337 | PI13, PI14, PI15, PJ0, PJ1, PJ2, PJ3, PJ4, PJ5, PJ6, PJ7, PJ8, PJ9, PJ10, PJ11, PJ12, PJ13, |
| 287 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, | 338 | PJ14, PJ15, PK0, PK1, PK2, PK3, PK4, PK5, PK6, PK7, PK8, PK9, PK10, PK11, PK12, PK13, PK14, |
| 288 | PK15, RNG, SYSCFG, USART1, USART2, USART3, USART6 | 339 | PK15, RNG, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SYSCFG, USART1, USART2, USART3, USART6 |
| 289 | ); | 340 | ); |
| 290 | 341 | ||
| 291 | pub mod interrupt { | 342 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f446mc.rs b/embassy-stm32/src/pac/stm32f446mc.rs index 99da317ff..eda63c600 100644 --- a/embassy-stm32/src/pac/stm32f446mc.rs +++ b/embassy-stm32/src/pac/stm32f446mc.rs | |||
| @@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 164 | impl_spi!(SPI1, APB2); | ||
| 165 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 166 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 167 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 168 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 169 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 170 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 171 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 172 | impl_spi!(SPI2, APB1); | ||
| 173 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 174 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 177 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PC1, 7); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Mosi, PB0, 7); | ||
| 186 | impl_spi_pin!(SPI3, Mosi, PB2, 7); | ||
| 187 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 188 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 189 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 190 | impl_spi_pin!(SPI3, Mosi, PC1, 5); | ||
| 191 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 192 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 193 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PD0, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Miso, PD0, 5); | ||
| 199 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 200 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 201 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 202 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 203 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 204 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 205 | impl_spi_pin!(SPI4, Sck, PG11, 6); | ||
| 206 | impl_spi_pin!(SPI4, Miso, PG12, 6); | ||
| 207 | impl_spi_pin!(SPI4, Mosi, PG13, 6); | ||
| 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 208 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 209 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 165 | impl_usart!(USART1); | 210 | impl_usart!(USART1); |
| @@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8); | |||
| 213 | pub use regs::dma_v2 as dma; | 258 | pub use regs::dma_v2 as dma; |
| 214 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 215 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 261 | pub use regs::spi_v1 as spi; | ||
| 216 | pub use regs::syscfg_f4 as syscfg; | 262 | pub use regs::syscfg_f4 as syscfg; |
| 217 | pub use regs::usart_v1 as usart; | 263 | pub use regs::usart_v1 as usart; |
| 218 | mod regs; | 264 | mod regs; |
| @@ -229,7 +275,7 @@ peripherals!( | |||
| 229 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 275 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 230 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 276 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 231 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 277 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 232 | PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 | 278 | PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 233 | ); | 279 | ); |
| 234 | 280 | ||
| 235 | pub mod interrupt { | 281 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f446me.rs b/embassy-stm32/src/pac/stm32f446me.rs index 99da317ff..eda63c600 100644 --- a/embassy-stm32/src/pac/stm32f446me.rs +++ b/embassy-stm32/src/pac/stm32f446me.rs | |||
| @@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 164 | impl_spi!(SPI1, APB2); | ||
| 165 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 166 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 167 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 168 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 169 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 170 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 171 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 172 | impl_spi!(SPI2, APB1); | ||
| 173 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 174 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 177 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PC1, 7); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Mosi, PB0, 7); | ||
| 186 | impl_spi_pin!(SPI3, Mosi, PB2, 7); | ||
| 187 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 188 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 189 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 190 | impl_spi_pin!(SPI3, Mosi, PC1, 5); | ||
| 191 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 192 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 193 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PD0, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Miso, PD0, 5); | ||
| 199 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 200 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 201 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 202 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 203 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 204 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 205 | impl_spi_pin!(SPI4, Sck, PG11, 6); | ||
| 206 | impl_spi_pin!(SPI4, Miso, PG12, 6); | ||
| 207 | impl_spi_pin!(SPI4, Mosi, PG13, 6); | ||
| 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 208 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 209 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 165 | impl_usart!(USART1); | 210 | impl_usart!(USART1); |
| @@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8); | |||
| 213 | pub use regs::dma_v2 as dma; | 258 | pub use regs::dma_v2 as dma; |
| 214 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 215 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 261 | pub use regs::spi_v1 as spi; | ||
| 216 | pub use regs::syscfg_f4 as syscfg; | 262 | pub use regs::syscfg_f4 as syscfg; |
| 217 | pub use regs::usart_v1 as usart; | 263 | pub use regs::usart_v1 as usart; |
| 218 | mod regs; | 264 | mod regs; |
| @@ -229,7 +275,7 @@ peripherals!( | |||
| 229 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 275 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 230 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 276 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 231 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 277 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 232 | PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 | 278 | PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 233 | ); | 279 | ); |
| 234 | 280 | ||
| 235 | pub mod interrupt { | 281 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f446rc.rs b/embassy-stm32/src/pac/stm32f446rc.rs index 99da317ff..78c721ce6 100644 --- a/embassy-stm32/src/pac/stm32f446rc.rs +++ b/embassy-stm32/src/pac/stm32f446rc.rs | |||
| @@ -160,6 +160,39 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 164 | impl_spi!(SPI1, APB2); | ||
| 165 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 166 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 167 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 168 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 169 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 170 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 171 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 172 | impl_spi!(SPI2, APB1); | ||
| 173 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 174 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 177 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PC1, 7); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Mosi, PB0, 7); | ||
| 186 | impl_spi_pin!(SPI3, Mosi, PB2, 7); | ||
| 187 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 188 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 189 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 190 | impl_spi_pin!(SPI3, Mosi, PC1, 5); | ||
| 191 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 192 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 193 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PD0, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 196 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 197 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 165 | impl_usart!(USART1); | 198 | impl_usart!(USART1); |
| @@ -213,6 +246,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8); | |||
| 213 | pub use regs::dma_v2 as dma; | 246 | pub use regs::dma_v2 as dma; |
| 214 | pub use regs::exti_v1 as exti; | 247 | pub use regs::exti_v1 as exti; |
| 215 | pub use regs::gpio_v2 as gpio; | 248 | pub use regs::gpio_v2 as gpio; |
| 249 | pub use regs::spi_v1 as spi; | ||
| 216 | pub use regs::syscfg_f4 as syscfg; | 250 | pub use regs::syscfg_f4 as syscfg; |
| 217 | pub use regs::usart_v1 as usart; | 251 | pub use regs::usart_v1 as usart; |
| 218 | mod regs; | 252 | mod regs; |
| @@ -229,7 +263,7 @@ peripherals!( | |||
| 229 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 263 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 230 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 264 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 231 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 265 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 232 | PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 | 266 | PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 233 | ); | 267 | ); |
| 234 | 268 | ||
| 235 | pub mod interrupt { | 269 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f446re.rs b/embassy-stm32/src/pac/stm32f446re.rs index 99da317ff..78c721ce6 100644 --- a/embassy-stm32/src/pac/stm32f446re.rs +++ b/embassy-stm32/src/pac/stm32f446re.rs | |||
| @@ -160,6 +160,39 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 164 | impl_spi!(SPI1, APB2); | ||
| 165 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 166 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 167 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 168 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 169 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 170 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 171 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 172 | impl_spi!(SPI2, APB1); | ||
| 173 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 174 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 177 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PC1, 7); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Mosi, PB0, 7); | ||
| 186 | impl_spi_pin!(SPI3, Mosi, PB2, 7); | ||
| 187 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 188 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 189 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 190 | impl_spi_pin!(SPI3, Mosi, PC1, 5); | ||
| 191 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 192 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 193 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PD0, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 196 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 197 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 165 | impl_usart!(USART1); | 198 | impl_usart!(USART1); |
| @@ -213,6 +246,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8); | |||
| 213 | pub use regs::dma_v2 as dma; | 246 | pub use regs::dma_v2 as dma; |
| 214 | pub use regs::exti_v1 as exti; | 247 | pub use regs::exti_v1 as exti; |
| 215 | pub use regs::gpio_v2 as gpio; | 248 | pub use regs::gpio_v2 as gpio; |
| 249 | pub use regs::spi_v1 as spi; | ||
| 216 | pub use regs::syscfg_f4 as syscfg; | 250 | pub use regs::syscfg_f4 as syscfg; |
| 217 | pub use regs::usart_v1 as usart; | 251 | pub use regs::usart_v1 as usart; |
| 218 | mod regs; | 252 | mod regs; |
| @@ -229,7 +263,7 @@ peripherals!( | |||
| 229 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 263 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 230 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 264 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 231 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 265 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 232 | PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 | 266 | PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SYSCFG, USART1, USART2, USART3, USART6 |
| 233 | ); | 267 | ); |
| 234 | 268 | ||
| 235 | pub mod interrupt { | 269 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f446vc.rs b/embassy-stm32/src/pac/stm32f446vc.rs index 99da317ff..eda63c600 100644 --- a/embassy-stm32/src/pac/stm32f446vc.rs +++ b/embassy-stm32/src/pac/stm32f446vc.rs | |||
| @@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 164 | impl_spi!(SPI1, APB2); | ||
| 165 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 166 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 167 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 168 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 169 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 170 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 171 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 172 | impl_spi!(SPI2, APB1); | ||
| 173 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 174 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 177 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PC1, 7); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Mosi, PB0, 7); | ||
| 186 | impl_spi_pin!(SPI3, Mosi, PB2, 7); | ||
| 187 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 188 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 189 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 190 | impl_spi_pin!(SPI3, Mosi, PC1, 5); | ||
| 191 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 192 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 193 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PD0, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Miso, PD0, 5); | ||
| 199 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 200 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 201 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 202 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 203 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 204 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 205 | impl_spi_pin!(SPI4, Sck, PG11, 6); | ||
| 206 | impl_spi_pin!(SPI4, Miso, PG12, 6); | ||
| 207 | impl_spi_pin!(SPI4, Mosi, PG13, 6); | ||
| 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 208 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 209 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 165 | impl_usart!(USART1); | 210 | impl_usart!(USART1); |
| @@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8); | |||
| 213 | pub use regs::dma_v2 as dma; | 258 | pub use regs::dma_v2 as dma; |
| 214 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 215 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 261 | pub use regs::spi_v1 as spi; | ||
| 216 | pub use regs::syscfg_f4 as syscfg; | 262 | pub use regs::syscfg_f4 as syscfg; |
| 217 | pub use regs::usart_v1 as usart; | 263 | pub use regs::usart_v1 as usart; |
| 218 | mod regs; | 264 | mod regs; |
| @@ -229,7 +275,7 @@ peripherals!( | |||
| 229 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 275 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 230 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 276 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 231 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 277 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 232 | PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 | 278 | PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 233 | ); | 279 | ); |
| 234 | 280 | ||
| 235 | pub mod interrupt { | 281 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f446ve.rs b/embassy-stm32/src/pac/stm32f446ve.rs index 99da317ff..eda63c600 100644 --- a/embassy-stm32/src/pac/stm32f446ve.rs +++ b/embassy-stm32/src/pac/stm32f446ve.rs | |||
| @@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 164 | impl_spi!(SPI1, APB2); | ||
| 165 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 166 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 167 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 168 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 169 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 170 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 171 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 172 | impl_spi!(SPI2, APB1); | ||
| 173 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 174 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 177 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PC1, 7); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Mosi, PB0, 7); | ||
| 186 | impl_spi_pin!(SPI3, Mosi, PB2, 7); | ||
| 187 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 188 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 189 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 190 | impl_spi_pin!(SPI3, Mosi, PC1, 5); | ||
| 191 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 192 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 193 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PD0, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Miso, PD0, 5); | ||
| 199 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 200 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 201 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 202 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 203 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 204 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 205 | impl_spi_pin!(SPI4, Sck, PG11, 6); | ||
| 206 | impl_spi_pin!(SPI4, Miso, PG12, 6); | ||
| 207 | impl_spi_pin!(SPI4, Mosi, PG13, 6); | ||
| 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 208 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 209 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 165 | impl_usart!(USART1); | 210 | impl_usart!(USART1); |
| @@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8); | |||
| 213 | pub use regs::dma_v2 as dma; | 258 | pub use regs::dma_v2 as dma; |
| 214 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 215 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 261 | pub use regs::spi_v1 as spi; | ||
| 216 | pub use regs::syscfg_f4 as syscfg; | 262 | pub use regs::syscfg_f4 as syscfg; |
| 217 | pub use regs::usart_v1 as usart; | 263 | pub use regs::usart_v1 as usart; |
| 218 | mod regs; | 264 | mod regs; |
| @@ -229,7 +275,7 @@ peripherals!( | |||
| 229 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 275 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 230 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 276 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 231 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 277 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 232 | PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 | 278 | PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 233 | ); | 279 | ); |
| 234 | 280 | ||
| 235 | pub mod interrupt { | 281 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f446zc.rs b/embassy-stm32/src/pac/stm32f446zc.rs index 99da317ff..eda63c600 100644 --- a/embassy-stm32/src/pac/stm32f446zc.rs +++ b/embassy-stm32/src/pac/stm32f446zc.rs | |||
| @@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 164 | impl_spi!(SPI1, APB2); | ||
| 165 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 166 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 167 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 168 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 169 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 170 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 171 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 172 | impl_spi!(SPI2, APB1); | ||
| 173 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 174 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 177 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PC1, 7); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Mosi, PB0, 7); | ||
| 186 | impl_spi_pin!(SPI3, Mosi, PB2, 7); | ||
| 187 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 188 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 189 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 190 | impl_spi_pin!(SPI3, Mosi, PC1, 5); | ||
| 191 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 192 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 193 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PD0, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Miso, PD0, 5); | ||
| 199 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 200 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 201 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 202 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 203 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 204 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 205 | impl_spi_pin!(SPI4, Sck, PG11, 6); | ||
| 206 | impl_spi_pin!(SPI4, Miso, PG12, 6); | ||
| 207 | impl_spi_pin!(SPI4, Mosi, PG13, 6); | ||
| 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 208 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 209 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 165 | impl_usart!(USART1); | 210 | impl_usart!(USART1); |
| @@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8); | |||
| 213 | pub use regs::dma_v2 as dma; | 258 | pub use regs::dma_v2 as dma; |
| 214 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 215 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 261 | pub use regs::spi_v1 as spi; | ||
| 216 | pub use regs::syscfg_f4 as syscfg; | 262 | pub use regs::syscfg_f4 as syscfg; |
| 217 | pub use regs::usart_v1 as usart; | 263 | pub use regs::usart_v1 as usart; |
| 218 | mod regs; | 264 | mod regs; |
| @@ -229,7 +275,7 @@ peripherals!( | |||
| 229 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 275 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 230 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 276 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 231 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 277 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 232 | PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 | 278 | PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 233 | ); | 279 | ); |
| 234 | 280 | ||
| 235 | pub mod interrupt { | 281 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f446ze.rs b/embassy-stm32/src/pac/stm32f446ze.rs index 99da317ff..eda63c600 100644 --- a/embassy-stm32/src/pac/stm32f446ze.rs +++ b/embassy-stm32/src/pac/stm32f446ze.rs | |||
| @@ -160,6 +160,51 @@ impl_gpio_pin!(PH12, 7, 12, EXTI12); | |||
| 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); | 160 | impl_gpio_pin!(PH13, 7, 13, EXTI13); |
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | ||
| 164 | impl_spi!(SPI1, APB2); | ||
| 165 | impl_spi_pin!(SPI1, Sck, PA5, 5); | ||
| 166 | impl_spi_pin!(SPI1, Miso, PA6, 5); | ||
| 167 | impl_spi_pin!(SPI1, Mosi, PA7, 5); | ||
| 168 | impl_spi_pin!(SPI1, Sck, PB3, 5); | ||
| 169 | impl_spi_pin!(SPI1, Miso, PB4, 5); | ||
| 170 | impl_spi_pin!(SPI1, Mosi, PB5, 5); | ||
| 171 | pub const SPI2: spi::Spi = spi::Spi(0x40003800 as _); | ||
| 172 | impl_spi!(SPI2, APB1); | ||
| 173 | impl_spi_pin!(SPI2, Sck, PA9, 5); | ||
| 174 | impl_spi_pin!(SPI2, Sck, PB10, 5); | ||
| 175 | impl_spi_pin!(SPI2, Sck, PB13, 5); | ||
| 176 | impl_spi_pin!(SPI2, Miso, PB14, 5); | ||
| 177 | impl_spi_pin!(SPI2, Mosi, PB15, 5); | ||
| 178 | impl_spi_pin!(SPI2, Mosi, PC1, 7); | ||
| 179 | impl_spi_pin!(SPI2, Miso, PC2, 5); | ||
| 180 | impl_spi_pin!(SPI2, Mosi, PC3, 5); | ||
| 181 | impl_spi_pin!(SPI2, Sck, PC7, 5); | ||
| 182 | impl_spi_pin!(SPI2, Sck, PD3, 5); | ||
| 183 | pub const SPI3: spi::Spi = spi::Spi(0x40003c00 as _); | ||
| 184 | impl_spi!(SPI3, APB1); | ||
| 185 | impl_spi_pin!(SPI3, Mosi, PB0, 7); | ||
| 186 | impl_spi_pin!(SPI3, Mosi, PB2, 7); | ||
| 187 | impl_spi_pin!(SPI3, Sck, PB3, 6); | ||
| 188 | impl_spi_pin!(SPI3, Miso, PB4, 6); | ||
| 189 | impl_spi_pin!(SPI3, Mosi, PB5, 6); | ||
| 190 | impl_spi_pin!(SPI3, Mosi, PC1, 5); | ||
| 191 | impl_spi_pin!(SPI3, Sck, PC10, 6); | ||
| 192 | impl_spi_pin!(SPI3, Miso, PC11, 6); | ||
| 193 | impl_spi_pin!(SPI3, Mosi, PC12, 6); | ||
| 194 | impl_spi_pin!(SPI3, Mosi, PD0, 6); | ||
| 195 | impl_spi_pin!(SPI3, Mosi, PD6, 5); | ||
| 196 | pub const SPI4: spi::Spi = spi::Spi(0x40013400 as _); | ||
| 197 | impl_spi!(SPI4, APB2); | ||
| 198 | impl_spi_pin!(SPI4, Miso, PD0, 5); | ||
| 199 | impl_spi_pin!(SPI4, Sck, PE12, 5); | ||
| 200 | impl_spi_pin!(SPI4, Miso, PE13, 5); | ||
| 201 | impl_spi_pin!(SPI4, Mosi, PE14, 5); | ||
| 202 | impl_spi_pin!(SPI4, Sck, PE2, 5); | ||
| 203 | impl_spi_pin!(SPI4, Miso, PE5, 5); | ||
| 204 | impl_spi_pin!(SPI4, Mosi, PE6, 5); | ||
| 205 | impl_spi_pin!(SPI4, Sck, PG11, 6); | ||
| 206 | impl_spi_pin!(SPI4, Miso, PG12, 6); | ||
| 207 | impl_spi_pin!(SPI4, Mosi, PG13, 6); | ||
| 163 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 208 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 164 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 209 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 165 | impl_usart!(USART1); | 210 | impl_usart!(USART1); |
| @@ -213,6 +258,7 @@ impl_usart_pin!(USART6, RxPin, PG9, 8); | |||
| 213 | pub use regs::dma_v2 as dma; | 258 | pub use regs::dma_v2 as dma; |
| 214 | pub use regs::exti_v1 as exti; | 259 | pub use regs::exti_v1 as exti; |
| 215 | pub use regs::gpio_v2 as gpio; | 260 | pub use regs::gpio_v2 as gpio; |
| 261 | pub use regs::spi_v1 as spi; | ||
| 216 | pub use regs::syscfg_f4 as syscfg; | 262 | pub use regs::syscfg_f4 as syscfg; |
| 217 | pub use regs::usart_v1 as usart; | 263 | pub use regs::usart_v1 as usart; |
| 218 | mod regs; | 264 | mod regs; |
| @@ -229,7 +275,7 @@ peripherals!( | |||
| 229 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, | 275 | PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PF0, PF1, PF2, PF3, PF4, PF5, PF6, PF7, PF8, PF9, |
| 230 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, | 276 | PF10, PF11, PF12, PF13, PF14, PF15, PG0, PG1, PG2, PG3, PG4, PG5, PG6, PG7, PG8, PG9, PG10, |
| 231 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, | 277 | PG11, PG12, PG13, PG14, PG15, PH0, PH1, PH2, PH3, PH4, PH5, PH6, PH7, PH8, PH9, PH10, PH11, |
| 232 | PH12, PH13, PH14, PH15, SYSCFG, USART1, USART2, USART3, USART6 | 278 | PH12, PH13, PH14, PH15, SPI1, SPI2, SPI3, SPI4, SYSCFG, USART1, USART2, USART3, USART6 |
| 233 | ); | 279 | ); |
| 234 | 280 | ||
| 235 | pub mod interrupt { | 281 | pub mod interrupt { |
diff --git a/embassy-stm32/src/pac/stm32f469ae.rs b/embassy-stm32/src/pac/stm32f469ae.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469ae.rs +++ b/embassy-stm32/src/pac/stm32f469ae.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469ag.rs b/embassy-stm32/src/pac/stm32f469ag.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469ag.rs +++ b/embassy-stm32/src/pac/stm32f469ag.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469ai.rs b/embassy-stm32/src/pac/stm32f469ai.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469ai.rs +++ b/embassy-stm32/src/pac/stm32f469ai.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469be.rs b/embassy-stm32/src/pac/stm32f469be.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469be.rs +++ b/embassy-stm32/src/pac/stm32f469be.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469bg.rs b/embassy-stm32/src/pac/stm32f469bg.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469bg.rs +++ b/embassy-stm32/src/pac/stm32f469bg.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469bi.rs b/embassy-stm32/src/pac/stm32f469bi.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469bi.rs +++ b/embassy-stm32/src/pac/stm32f469bi.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469ie.rs b/embassy-stm32/src/pac/stm32f469ie.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469ie.rs +++ b/embassy-stm32/src/pac/stm32f469ie.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469ig.rs b/embassy-stm32/src/pac/stm32f469ig.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469ig.rs +++ b/embassy-stm32/src/pac/stm32f469ig.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469ii.rs b/embassy-stm32/src/pac/stm32f469ii.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469ii.rs +++ b/embassy-stm32/src/pac/stm32f469ii.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469ne.rs b/embassy-stm32/src/pac/stm32f469ne.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469ne.rs +++ b/embassy-stm32/src/pac/stm32f469ne.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469ng.rs b/embassy-stm32/src/pac/stm32f469ng.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469ng.rs +++ b/embassy-stm32/src/pac/stm32f469ng.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469ni.rs b/embassy-stm32/src/pac/stm32f469ni.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469ni.rs +++ b/embassy-stm32/src/pac/stm32f469ni.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469ve.rs b/embassy-stm32/src/pac/stm32f469ve.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469ve.rs +++ b/embassy-stm32/src/pac/stm32f469ve.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469vg.rs b/embassy-stm32/src/pac/stm32f469vg.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469vg.rs +++ b/embassy-stm32/src/pac/stm32f469vg.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469vi.rs b/embassy-stm32/src/pac/stm32f469vi.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469vi.rs +++ b/embassy-stm32/src/pac/stm32f469vi.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469ze.rs b/embassy-stm32/src/pac/stm32f469ze.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469ze.rs +++ b/embassy-stm32/src/pac/stm32f469ze.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469zg.rs b/embassy-stm32/src/pac/stm32f469zg.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469zg.rs +++ b/embassy-stm32/src/pac/stm32f469zg.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f469zi.rs b/embassy-stm32/src/pac/stm32f469zi.rs index bf68c2f6f..c44fd8eee 100644 --- a/embassy-stm32/src/pac/stm32f469zi.rs +++ b/embassy-stm32/src/pac/stm32f469zi.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479ag.rs b/embassy-stm32/src/pac/stm32f479ag.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479ag.rs +++ b/embassy-stm32/src/pac/stm32f479ag.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479ai.rs b/embassy-stm32/src/pac/stm32f479ai.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479ai.rs +++ b/embassy-stm32/src/pac/stm32f479ai.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479bg.rs b/embassy-stm32/src/pac/stm32f479bg.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479bg.rs +++ b/embassy-stm32/src/pac/stm32f479bg.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479bi.rs b/embassy-stm32/src/pac/stm32f479bi.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479bi.rs +++ b/embassy-stm32/src/pac/stm32f479bi.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479ig.rs b/embassy-stm32/src/pac/stm32f479ig.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479ig.rs +++ b/embassy-stm32/src/pac/stm32f479ig.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479ii.rs b/embassy-stm32/src/pac/stm32f479ii.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479ii.rs +++ b/embassy-stm32/src/pac/stm32f479ii.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479ng.rs b/embassy-stm32/src/pac/stm32f479ng.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479ng.rs +++ b/embassy-stm32/src/pac/stm32f479ng.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479ni.rs b/embassy-stm32/src/pac/stm32f479ni.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479ni.rs +++ b/embassy-stm32/src/pac/stm32f479ni.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479vg.rs b/embassy-stm32/src/pac/stm32f479vg.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479vg.rs +++ b/embassy-stm32/src/pac/stm32f479vg.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479vi.rs b/embassy-stm32/src/pac/stm32f479vi.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479vi.rs +++ b/embassy-stm32/src/pac/stm32f479vi.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479zg.rs b/embassy-stm32/src/pac/stm32f479zg.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479zg.rs +++ b/embassy-stm32/src/pac/stm32f479zg.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32f479zi.rs b/embassy-stm32/src/pac/stm32f479zi.rs index 67bdb0390..fbb2b54cc 100644 --- a/embassy-stm32/src/pac/stm32f479zi.rs +++ b/embassy-stm32/src/pac/stm32f479zi.rs | |||
| @@ -212,7 +212,7 @@ impl_gpio_pin!(PK13, 10, 13, EXTI13); | |||
| 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); | 212 | impl_gpio_pin!(PK14, 10, 14, EXTI14); |
| 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); | 213 | impl_gpio_pin!(PK15, 10, 15, EXTI15); |
| 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 214 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 215 | impl_rng!(RNG); | 215 | impl_rng!(RNG, HASH_RNG); |
| 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); | 216 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40013800 as _); |
| 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); | 217 | pub const USART1: usart::Usart = usart::Usart(0x40011000 as _); |
| 218 | impl_usart!(USART1); | 218 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l412c8.rs b/embassy-stm32/src/pac/stm32l412c8.rs index 5478ea82e..6f7f9d3b4 100644 --- a/embassy-stm32/src/pac/stm32l412c8.rs +++ b/embassy-stm32/src/pac/stm32l412c8.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l412cb.rs b/embassy-stm32/src/pac/stm32l412cb.rs index 5478ea82e..6f7f9d3b4 100644 --- a/embassy-stm32/src/pac/stm32l412cb.rs +++ b/embassy-stm32/src/pac/stm32l412cb.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l412k8.rs b/embassy-stm32/src/pac/stm32l412k8.rs index f7027eeac..a8f1ee4bc 100644 --- a/embassy-stm32/src/pac/stm32l412k8.rs +++ b/embassy-stm32/src/pac/stm32l412k8.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l412kb.rs b/embassy-stm32/src/pac/stm32l412kb.rs index f7027eeac..a8f1ee4bc 100644 --- a/embassy-stm32/src/pac/stm32l412kb.rs +++ b/embassy-stm32/src/pac/stm32l412kb.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l412r8.rs b/embassy-stm32/src/pac/stm32l412r8.rs index 5478ea82e..6f7f9d3b4 100644 --- a/embassy-stm32/src/pac/stm32l412r8.rs +++ b/embassy-stm32/src/pac/stm32l412r8.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l412rb.rs b/embassy-stm32/src/pac/stm32l412rb.rs index 5478ea82e..6f7f9d3b4 100644 --- a/embassy-stm32/src/pac/stm32l412rb.rs +++ b/embassy-stm32/src/pac/stm32l412rb.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l412t8.rs b/embassy-stm32/src/pac/stm32l412t8.rs index f7027eeac..a8f1ee4bc 100644 --- a/embassy-stm32/src/pac/stm32l412t8.rs +++ b/embassy-stm32/src/pac/stm32l412t8.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l412tb.rs b/embassy-stm32/src/pac/stm32l412tb.rs index f7027eeac..a8f1ee4bc 100644 --- a/embassy-stm32/src/pac/stm32l412tb.rs +++ b/embassy-stm32/src/pac/stm32l412tb.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l422cb.rs b/embassy-stm32/src/pac/stm32l422cb.rs index 7a85aca7c..2faebe71e 100644 --- a/embassy-stm32/src/pac/stm32l422cb.rs +++ b/embassy-stm32/src/pac/stm32l422cb.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l422kb.rs b/embassy-stm32/src/pac/stm32l422kb.rs index 7de35a6c1..36dca78dd 100644 --- a/embassy-stm32/src/pac/stm32l422kb.rs +++ b/embassy-stm32/src/pac/stm32l422kb.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l422rb.rs b/embassy-stm32/src/pac/stm32l422rb.rs index 7a85aca7c..2faebe71e 100644 --- a/embassy-stm32/src/pac/stm32l422rb.rs +++ b/embassy-stm32/src/pac/stm32l422rb.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l422tb.rs b/embassy-stm32/src/pac/stm32l422tb.rs index 7de35a6c1..36dca78dd 100644 --- a/embassy-stm32/src/pac/stm32l422tb.rs +++ b/embassy-stm32/src/pac/stm32l422tb.rs | |||
| @@ -110,7 +110,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 110 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 111 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 112 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 113 | impl_rng!(RNG); | 113 | impl_rng!(RNG, RNG); |
| 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 114 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 115 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 116 | impl_usart!(USART1); | 116 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l431cb.rs b/embassy-stm32/src/pac/stm32l431cb.rs index ddb208da0..3526babf8 100644 --- a/embassy-stm32/src/pac/stm32l431cb.rs +++ b/embassy-stm32/src/pac/stm32l431cb.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l431cc.rs b/embassy-stm32/src/pac/stm32l431cc.rs index ddb208da0..3526babf8 100644 --- a/embassy-stm32/src/pac/stm32l431cc.rs +++ b/embassy-stm32/src/pac/stm32l431cc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l431kb.rs b/embassy-stm32/src/pac/stm32l431kb.rs index 89364c77e..6ee92e995 100644 --- a/embassy-stm32/src/pac/stm32l431kb.rs +++ b/embassy-stm32/src/pac/stm32l431kb.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l431kc.rs b/embassy-stm32/src/pac/stm32l431kc.rs index 89364c77e..6ee92e995 100644 --- a/embassy-stm32/src/pac/stm32l431kc.rs +++ b/embassy-stm32/src/pac/stm32l431kc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l431rb.rs b/embassy-stm32/src/pac/stm32l431rb.rs index ddb208da0..3526babf8 100644 --- a/embassy-stm32/src/pac/stm32l431rb.rs +++ b/embassy-stm32/src/pac/stm32l431rb.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l431rc.rs b/embassy-stm32/src/pac/stm32l431rc.rs index ddb208da0..3526babf8 100644 --- a/embassy-stm32/src/pac/stm32l431rc.rs +++ b/embassy-stm32/src/pac/stm32l431rc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l431vc.rs b/embassy-stm32/src/pac/stm32l431vc.rs index ddb208da0..3526babf8 100644 --- a/embassy-stm32/src/pac/stm32l431vc.rs +++ b/embassy-stm32/src/pac/stm32l431vc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l432kb.rs b/embassy-stm32/src/pac/stm32l432kb.rs index a5e060d0a..520a130a2 100644 --- a/embassy-stm32/src/pac/stm32l432kb.rs +++ b/embassy-stm32/src/pac/stm32l432kb.rs | |||
| @@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 95 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 95 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 96 | impl_rng!(RNG); | 96 | impl_rng!(RNG, RNG); |
| 97 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 97 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 98 | impl_spi!(SPI1, APB2); | 98 | impl_spi!(SPI1, APB2); |
| 99 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 99 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l432kc.rs b/embassy-stm32/src/pac/stm32l432kc.rs index a5e060d0a..520a130a2 100644 --- a/embassy-stm32/src/pac/stm32l432kc.rs +++ b/embassy-stm32/src/pac/stm32l432kc.rs | |||
| @@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 95 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 95 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 96 | impl_rng!(RNG); | 96 | impl_rng!(RNG, RNG); |
| 97 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 97 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 98 | impl_spi!(SPI1, APB2); | 98 | impl_spi!(SPI1, APB2); |
| 99 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 99 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l433cb.rs b/embassy-stm32/src/pac/stm32l433cb.rs index 0c60e842c..d7c46042a 100644 --- a/embassy-stm32/src/pac/stm32l433cb.rs +++ b/embassy-stm32/src/pac/stm32l433cb.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l433cc.rs b/embassy-stm32/src/pac/stm32l433cc.rs index 0c60e842c..d7c46042a 100644 --- a/embassy-stm32/src/pac/stm32l433cc.rs +++ b/embassy-stm32/src/pac/stm32l433cc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l433rb.rs b/embassy-stm32/src/pac/stm32l433rb.rs index 0c60e842c..d7c46042a 100644 --- a/embassy-stm32/src/pac/stm32l433rb.rs +++ b/embassy-stm32/src/pac/stm32l433rb.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l433rc.rs b/embassy-stm32/src/pac/stm32l433rc.rs index 0c60e842c..d7c46042a 100644 --- a/embassy-stm32/src/pac/stm32l433rc.rs +++ b/embassy-stm32/src/pac/stm32l433rc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l433vc.rs b/embassy-stm32/src/pac/stm32l433vc.rs index 0c60e842c..d7c46042a 100644 --- a/embassy-stm32/src/pac/stm32l433vc.rs +++ b/embassy-stm32/src/pac/stm32l433vc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l442kc.rs b/embassy-stm32/src/pac/stm32l442kc.rs index dfccb891f..7a7e0780e 100644 --- a/embassy-stm32/src/pac/stm32l442kc.rs +++ b/embassy-stm32/src/pac/stm32l442kc.rs | |||
| @@ -93,7 +93,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 93 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 94 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 95 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 95 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 96 | impl_rng!(RNG); | 96 | impl_rng!(RNG, RNG); |
| 97 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 97 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 98 | impl_spi!(SPI1, APB2); | 98 | impl_spi!(SPI1, APB2); |
| 99 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 99 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l443cc.rs b/embassy-stm32/src/pac/stm32l443cc.rs index 5e4f9fe11..a3a633823 100644 --- a/embassy-stm32/src/pac/stm32l443cc.rs +++ b/embassy-stm32/src/pac/stm32l443cc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l443rc.rs b/embassy-stm32/src/pac/stm32l443rc.rs index 5e4f9fe11..a3a633823 100644 --- a/embassy-stm32/src/pac/stm32l443rc.rs +++ b/embassy-stm32/src/pac/stm32l443rc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l443vc.rs b/embassy-stm32/src/pac/stm32l443vc.rs index 5e4f9fe11..a3a633823 100644 --- a/embassy-stm32/src/pac/stm32l443vc.rs +++ b/embassy-stm32/src/pac/stm32l443vc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 131 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 132 | impl_spi!(SPI1, APB2); | 132 | impl_spi!(SPI1, APB2); |
| 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 133 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l451cc.rs b/embassy-stm32/src/pac/stm32l451cc.rs index 031a9af00..f574c379c 100644 --- a/embassy-stm32/src/pac/stm32l451cc.rs +++ b/embassy-stm32/src/pac/stm32l451cc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l451ce.rs b/embassy-stm32/src/pac/stm32l451ce.rs index 031a9af00..f574c379c 100644 --- a/embassy-stm32/src/pac/stm32l451ce.rs +++ b/embassy-stm32/src/pac/stm32l451ce.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l451rc.rs b/embassy-stm32/src/pac/stm32l451rc.rs index 031a9af00..f574c379c 100644 --- a/embassy-stm32/src/pac/stm32l451rc.rs +++ b/embassy-stm32/src/pac/stm32l451rc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l451re.rs b/embassy-stm32/src/pac/stm32l451re.rs index 031a9af00..f574c379c 100644 --- a/embassy-stm32/src/pac/stm32l451re.rs +++ b/embassy-stm32/src/pac/stm32l451re.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l451vc.rs b/embassy-stm32/src/pac/stm32l451vc.rs index 031a9af00..f574c379c 100644 --- a/embassy-stm32/src/pac/stm32l451vc.rs +++ b/embassy-stm32/src/pac/stm32l451vc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l451ve.rs b/embassy-stm32/src/pac/stm32l451ve.rs index 031a9af00..f574c379c 100644 --- a/embassy-stm32/src/pac/stm32l451ve.rs +++ b/embassy-stm32/src/pac/stm32l451ve.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l452cc.rs b/embassy-stm32/src/pac/stm32l452cc.rs index 70c0e7e4e..fdb8f0e75 100644 --- a/embassy-stm32/src/pac/stm32l452cc.rs +++ b/embassy-stm32/src/pac/stm32l452cc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l452ce.rs b/embassy-stm32/src/pac/stm32l452ce.rs index 70c0e7e4e..fdb8f0e75 100644 --- a/embassy-stm32/src/pac/stm32l452ce.rs +++ b/embassy-stm32/src/pac/stm32l452ce.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l452rc.rs b/embassy-stm32/src/pac/stm32l452rc.rs index 70c0e7e4e..fdb8f0e75 100644 --- a/embassy-stm32/src/pac/stm32l452rc.rs +++ b/embassy-stm32/src/pac/stm32l452rc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l452re.rs b/embassy-stm32/src/pac/stm32l452re.rs index 70c0e7e4e..fdb8f0e75 100644 --- a/embassy-stm32/src/pac/stm32l452re.rs +++ b/embassy-stm32/src/pac/stm32l452re.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l452vc.rs b/embassy-stm32/src/pac/stm32l452vc.rs index 70c0e7e4e..fdb8f0e75 100644 --- a/embassy-stm32/src/pac/stm32l452vc.rs +++ b/embassy-stm32/src/pac/stm32l452vc.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l452ve.rs b/embassy-stm32/src/pac/stm32l452ve.rs index 70c0e7e4e..fdb8f0e75 100644 --- a/embassy-stm32/src/pac/stm32l452ve.rs +++ b/embassy-stm32/src/pac/stm32l452ve.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l462ce.rs b/embassy-stm32/src/pac/stm32l462ce.rs index 5eff9047e..c039d6a86 100644 --- a/embassy-stm32/src/pac/stm32l462ce.rs +++ b/embassy-stm32/src/pac/stm32l462ce.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l462re.rs b/embassy-stm32/src/pac/stm32l462re.rs index 5eff9047e..c039d6a86 100644 --- a/embassy-stm32/src/pac/stm32l462re.rs +++ b/embassy-stm32/src/pac/stm32l462re.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l462ve.rs b/embassy-stm32/src/pac/stm32l462ve.rs index 5eff9047e..c039d6a86 100644 --- a/embassy-stm32/src/pac/stm32l462ve.rs +++ b/embassy-stm32/src/pac/stm32l462ve.rs | |||
| @@ -127,7 +127,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 127 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 128 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 129 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 130 | impl_rng!(RNG); | 130 | impl_rng!(RNG, RNG); |
| 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 131 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 132 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 133 | impl_usart!(USART1); | 133 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l471qe.rs b/embassy-stm32/src/pac/stm32l471qe.rs index 719376864..2a9444a62 100644 --- a/embassy-stm32/src/pac/stm32l471qe.rs +++ b/embassy-stm32/src/pac/stm32l471qe.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l471qg.rs b/embassy-stm32/src/pac/stm32l471qg.rs index 719376864..2a9444a62 100644 --- a/embassy-stm32/src/pac/stm32l471qg.rs +++ b/embassy-stm32/src/pac/stm32l471qg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l471re.rs b/embassy-stm32/src/pac/stm32l471re.rs index 719376864..2a9444a62 100644 --- a/embassy-stm32/src/pac/stm32l471re.rs +++ b/embassy-stm32/src/pac/stm32l471re.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l471rg.rs b/embassy-stm32/src/pac/stm32l471rg.rs index 719376864..2a9444a62 100644 --- a/embassy-stm32/src/pac/stm32l471rg.rs +++ b/embassy-stm32/src/pac/stm32l471rg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l471ve.rs b/embassy-stm32/src/pac/stm32l471ve.rs index 719376864..2a9444a62 100644 --- a/embassy-stm32/src/pac/stm32l471ve.rs +++ b/embassy-stm32/src/pac/stm32l471ve.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l471vg.rs b/embassy-stm32/src/pac/stm32l471vg.rs index 719376864..2a9444a62 100644 --- a/embassy-stm32/src/pac/stm32l471vg.rs +++ b/embassy-stm32/src/pac/stm32l471vg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l471ze.rs b/embassy-stm32/src/pac/stm32l471ze.rs index 719376864..2a9444a62 100644 --- a/embassy-stm32/src/pac/stm32l471ze.rs +++ b/embassy-stm32/src/pac/stm32l471ze.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l471zg.rs b/embassy-stm32/src/pac/stm32l471zg.rs index 719376864..2a9444a62 100644 --- a/embassy-stm32/src/pac/stm32l471zg.rs +++ b/embassy-stm32/src/pac/stm32l471zg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l475rc.rs b/embassy-stm32/src/pac/stm32l475rc.rs index 5b9937410..40de9ba86 100644 --- a/embassy-stm32/src/pac/stm32l475rc.rs +++ b/embassy-stm32/src/pac/stm32l475rc.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l475re.rs b/embassy-stm32/src/pac/stm32l475re.rs index 5b9937410..40de9ba86 100644 --- a/embassy-stm32/src/pac/stm32l475re.rs +++ b/embassy-stm32/src/pac/stm32l475re.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l475rg.rs b/embassy-stm32/src/pac/stm32l475rg.rs index 5b9937410..40de9ba86 100644 --- a/embassy-stm32/src/pac/stm32l475rg.rs +++ b/embassy-stm32/src/pac/stm32l475rg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l475vc.rs b/embassy-stm32/src/pac/stm32l475vc.rs index 5b9937410..40de9ba86 100644 --- a/embassy-stm32/src/pac/stm32l475vc.rs +++ b/embassy-stm32/src/pac/stm32l475vc.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l475ve.rs b/embassy-stm32/src/pac/stm32l475ve.rs index 5b9937410..40de9ba86 100644 --- a/embassy-stm32/src/pac/stm32l475ve.rs +++ b/embassy-stm32/src/pac/stm32l475ve.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l475vg.rs b/embassy-stm32/src/pac/stm32l475vg.rs index 5b9937410..40de9ba86 100644 --- a/embassy-stm32/src/pac/stm32l475vg.rs +++ b/embassy-stm32/src/pac/stm32l475vg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476je.rs b/embassy-stm32/src/pac/stm32l476je.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476je.rs +++ b/embassy-stm32/src/pac/stm32l476je.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476jg.rs b/embassy-stm32/src/pac/stm32l476jg.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476jg.rs +++ b/embassy-stm32/src/pac/stm32l476jg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476me.rs b/embassy-stm32/src/pac/stm32l476me.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476me.rs +++ b/embassy-stm32/src/pac/stm32l476me.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476mg.rs b/embassy-stm32/src/pac/stm32l476mg.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476mg.rs +++ b/embassy-stm32/src/pac/stm32l476mg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476qe.rs b/embassy-stm32/src/pac/stm32l476qe.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476qe.rs +++ b/embassy-stm32/src/pac/stm32l476qe.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476qg.rs b/embassy-stm32/src/pac/stm32l476qg.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476qg.rs +++ b/embassy-stm32/src/pac/stm32l476qg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476rc.rs b/embassy-stm32/src/pac/stm32l476rc.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476rc.rs +++ b/embassy-stm32/src/pac/stm32l476rc.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476re.rs b/embassy-stm32/src/pac/stm32l476re.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476re.rs +++ b/embassy-stm32/src/pac/stm32l476re.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476rg.rs b/embassy-stm32/src/pac/stm32l476rg.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476rg.rs +++ b/embassy-stm32/src/pac/stm32l476rg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476vc.rs b/embassy-stm32/src/pac/stm32l476vc.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476vc.rs +++ b/embassy-stm32/src/pac/stm32l476vc.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476ve.rs b/embassy-stm32/src/pac/stm32l476ve.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476ve.rs +++ b/embassy-stm32/src/pac/stm32l476ve.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476vg.rs b/embassy-stm32/src/pac/stm32l476vg.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476vg.rs +++ b/embassy-stm32/src/pac/stm32l476vg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476ze.rs b/embassy-stm32/src/pac/stm32l476ze.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476ze.rs +++ b/embassy-stm32/src/pac/stm32l476ze.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l476zg.rs b/embassy-stm32/src/pac/stm32l476zg.rs index 1c16aaaba..c2230994a 100644 --- a/embassy-stm32/src/pac/stm32l476zg.rs +++ b/embassy-stm32/src/pac/stm32l476zg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l485jc.rs b/embassy-stm32/src/pac/stm32l485jc.rs index c5fb8087f..bab45b914 100644 --- a/embassy-stm32/src/pac/stm32l485jc.rs +++ b/embassy-stm32/src/pac/stm32l485jc.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l485je.rs b/embassy-stm32/src/pac/stm32l485je.rs index c5fb8087f..bab45b914 100644 --- a/embassy-stm32/src/pac/stm32l485je.rs +++ b/embassy-stm32/src/pac/stm32l485je.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l486jg.rs b/embassy-stm32/src/pac/stm32l486jg.rs index d791c148d..89067584a 100644 --- a/embassy-stm32/src/pac/stm32l486jg.rs +++ b/embassy-stm32/src/pac/stm32l486jg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l486qg.rs b/embassy-stm32/src/pac/stm32l486qg.rs index d791c148d..89067584a 100644 --- a/embassy-stm32/src/pac/stm32l486qg.rs +++ b/embassy-stm32/src/pac/stm32l486qg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l486rg.rs b/embassy-stm32/src/pac/stm32l486rg.rs index d791c148d..89067584a 100644 --- a/embassy-stm32/src/pac/stm32l486rg.rs +++ b/embassy-stm32/src/pac/stm32l486rg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l486vg.rs b/embassy-stm32/src/pac/stm32l486vg.rs index d791c148d..89067584a 100644 --- a/embassy-stm32/src/pac/stm32l486vg.rs +++ b/embassy-stm32/src/pac/stm32l486vg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l486zg.rs b/embassy-stm32/src/pac/stm32l486zg.rs index d791c148d..89067584a 100644 --- a/embassy-stm32/src/pac/stm32l486zg.rs +++ b/embassy-stm32/src/pac/stm32l486zg.rs | |||
| @@ -161,7 +161,7 @@ impl_gpio_pin!(PH13, 7, 13, EXTI13); | |||
| 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); | 161 | impl_gpio_pin!(PH14, 7, 14, EXTI14); |
| 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); | 162 | impl_gpio_pin!(PH15, 7, 15, EXTI15); |
| 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 163 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 164 | impl_rng!(RNG); | 164 | impl_rng!(RNG, RNG); |
| 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); | 165 | pub const SYSCFG: syscfg::Syscfg = syscfg::Syscfg(0x40010000 as _); |
| 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); | 166 | pub const USART1: usart::Usart = usart::Usart(0x40013800 as _); |
| 167 | impl_usart!(USART1); | 167 | impl_usart!(USART1); |
diff --git a/embassy-stm32/src/pac/stm32l496ae.rs b/embassy-stm32/src/pac/stm32l496ae.rs index 22dc6767d..4f15b5bf7 100644 --- a/embassy-stm32/src/pac/stm32l496ae.rs +++ b/embassy-stm32/src/pac/stm32l496ae.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l496ag.rs b/embassy-stm32/src/pac/stm32l496ag.rs index 22dc6767d..4f15b5bf7 100644 --- a/embassy-stm32/src/pac/stm32l496ag.rs +++ b/embassy-stm32/src/pac/stm32l496ag.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l496qe.rs b/embassy-stm32/src/pac/stm32l496qe.rs index 22dc6767d..4f15b5bf7 100644 --- a/embassy-stm32/src/pac/stm32l496qe.rs +++ b/embassy-stm32/src/pac/stm32l496qe.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l496qg.rs b/embassy-stm32/src/pac/stm32l496qg.rs index 22dc6767d..4f15b5bf7 100644 --- a/embassy-stm32/src/pac/stm32l496qg.rs +++ b/embassy-stm32/src/pac/stm32l496qg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l496re.rs b/embassy-stm32/src/pac/stm32l496re.rs index 22dc6767d..4f15b5bf7 100644 --- a/embassy-stm32/src/pac/stm32l496re.rs +++ b/embassy-stm32/src/pac/stm32l496re.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l496rg.rs b/embassy-stm32/src/pac/stm32l496rg.rs index 22dc6767d..4f15b5bf7 100644 --- a/embassy-stm32/src/pac/stm32l496rg.rs +++ b/embassy-stm32/src/pac/stm32l496rg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l496ve.rs b/embassy-stm32/src/pac/stm32l496ve.rs index 22dc6767d..4f15b5bf7 100644 --- a/embassy-stm32/src/pac/stm32l496ve.rs +++ b/embassy-stm32/src/pac/stm32l496ve.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l496vg.rs b/embassy-stm32/src/pac/stm32l496vg.rs index 22dc6767d..4f15b5bf7 100644 --- a/embassy-stm32/src/pac/stm32l496vg.rs +++ b/embassy-stm32/src/pac/stm32l496vg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l496wg.rs b/embassy-stm32/src/pac/stm32l496wg.rs index 22dc6767d..4f15b5bf7 100644 --- a/embassy-stm32/src/pac/stm32l496wg.rs +++ b/embassy-stm32/src/pac/stm32l496wg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l496ze.rs b/embassy-stm32/src/pac/stm32l496ze.rs index 22dc6767d..4f15b5bf7 100644 --- a/embassy-stm32/src/pac/stm32l496ze.rs +++ b/embassy-stm32/src/pac/stm32l496ze.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l496zg.rs b/embassy-stm32/src/pac/stm32l496zg.rs index 22dc6767d..4f15b5bf7 100644 --- a/embassy-stm32/src/pac/stm32l496zg.rs +++ b/embassy-stm32/src/pac/stm32l496zg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4a6ag.rs b/embassy-stm32/src/pac/stm32l4a6ag.rs index 3b8c1f094..7384744ec 100644 --- a/embassy-stm32/src/pac/stm32l4a6ag.rs +++ b/embassy-stm32/src/pac/stm32l4a6ag.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4a6qg.rs b/embassy-stm32/src/pac/stm32l4a6qg.rs index 3b8c1f094..7384744ec 100644 --- a/embassy-stm32/src/pac/stm32l4a6qg.rs +++ b/embassy-stm32/src/pac/stm32l4a6qg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4a6rg.rs b/embassy-stm32/src/pac/stm32l4a6rg.rs index 3b8c1f094..7384744ec 100644 --- a/embassy-stm32/src/pac/stm32l4a6rg.rs +++ b/embassy-stm32/src/pac/stm32l4a6rg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4a6vg.rs b/embassy-stm32/src/pac/stm32l4a6vg.rs index 3b8c1f094..7384744ec 100644 --- a/embassy-stm32/src/pac/stm32l4a6vg.rs +++ b/embassy-stm32/src/pac/stm32l4a6vg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4a6zg.rs b/embassy-stm32/src/pac/stm32l4a6zg.rs index 3b8c1f094..7384744ec 100644 --- a/embassy-stm32/src/pac/stm32l4a6zg.rs +++ b/embassy-stm32/src/pac/stm32l4a6zg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, HASH_RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5ae.rs b/embassy-stm32/src/pac/stm32l4p5ae.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5ae.rs +++ b/embassy-stm32/src/pac/stm32l4p5ae.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5ag.rs b/embassy-stm32/src/pac/stm32l4p5ag.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5ag.rs +++ b/embassy-stm32/src/pac/stm32l4p5ag.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5ce.rs b/embassy-stm32/src/pac/stm32l4p5ce.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5ce.rs +++ b/embassy-stm32/src/pac/stm32l4p5ce.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5cg.rs b/embassy-stm32/src/pac/stm32l4p5cg.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5cg.rs +++ b/embassy-stm32/src/pac/stm32l4p5cg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5qe.rs b/embassy-stm32/src/pac/stm32l4p5qe.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5qe.rs +++ b/embassy-stm32/src/pac/stm32l4p5qe.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5qg.rs b/embassy-stm32/src/pac/stm32l4p5qg.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5qg.rs +++ b/embassy-stm32/src/pac/stm32l4p5qg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5re.rs b/embassy-stm32/src/pac/stm32l4p5re.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5re.rs +++ b/embassy-stm32/src/pac/stm32l4p5re.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5rg.rs b/embassy-stm32/src/pac/stm32l4p5rg.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5rg.rs +++ b/embassy-stm32/src/pac/stm32l4p5rg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5ve.rs b/embassy-stm32/src/pac/stm32l4p5ve.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5ve.rs +++ b/embassy-stm32/src/pac/stm32l4p5ve.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5vg.rs b/embassy-stm32/src/pac/stm32l4p5vg.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5vg.rs +++ b/embassy-stm32/src/pac/stm32l4p5vg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5ze.rs b/embassy-stm32/src/pac/stm32l4p5ze.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5ze.rs +++ b/embassy-stm32/src/pac/stm32l4p5ze.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4p5zg.rs b/embassy-stm32/src/pac/stm32l4p5zg.rs index c3627b896..98ec98306 100644 --- a/embassy-stm32/src/pac/stm32l4p5zg.rs +++ b/embassy-stm32/src/pac/stm32l4p5zg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4q5ag.rs b/embassy-stm32/src/pac/stm32l4q5ag.rs index af7690f94..f7ea12de2 100644 --- a/embassy-stm32/src/pac/stm32l4q5ag.rs +++ b/embassy-stm32/src/pac/stm32l4q5ag.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4q5cg.rs b/embassy-stm32/src/pac/stm32l4q5cg.rs index af7690f94..f7ea12de2 100644 --- a/embassy-stm32/src/pac/stm32l4q5cg.rs +++ b/embassy-stm32/src/pac/stm32l4q5cg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4q5qg.rs b/embassy-stm32/src/pac/stm32l4q5qg.rs index af7690f94..f7ea12de2 100644 --- a/embassy-stm32/src/pac/stm32l4q5qg.rs +++ b/embassy-stm32/src/pac/stm32l4q5qg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4q5rg.rs b/embassy-stm32/src/pac/stm32l4q5rg.rs index af7690f94..f7ea12de2 100644 --- a/embassy-stm32/src/pac/stm32l4q5rg.rs +++ b/embassy-stm32/src/pac/stm32l4q5rg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4q5vg.rs b/embassy-stm32/src/pac/stm32l4q5vg.rs index af7690f94..f7ea12de2 100644 --- a/embassy-stm32/src/pac/stm32l4q5vg.rs +++ b/embassy-stm32/src/pac/stm32l4q5vg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4q5zg.rs b/embassy-stm32/src/pac/stm32l4q5zg.rs index af7690f94..f7ea12de2 100644 --- a/embassy-stm32/src/pac/stm32l4q5zg.rs +++ b/embassy-stm32/src/pac/stm32l4q5zg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r5ag.rs b/embassy-stm32/src/pac/stm32l4r5ag.rs index 9f7c5e88c..0fad849dd 100644 --- a/embassy-stm32/src/pac/stm32l4r5ag.rs +++ b/embassy-stm32/src/pac/stm32l4r5ag.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r5ai.rs b/embassy-stm32/src/pac/stm32l4r5ai.rs index 9f7c5e88c..0fad849dd 100644 --- a/embassy-stm32/src/pac/stm32l4r5ai.rs +++ b/embassy-stm32/src/pac/stm32l4r5ai.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r5qg.rs b/embassy-stm32/src/pac/stm32l4r5qg.rs index 9f7c5e88c..0fad849dd 100644 --- a/embassy-stm32/src/pac/stm32l4r5qg.rs +++ b/embassy-stm32/src/pac/stm32l4r5qg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r5qi.rs b/embassy-stm32/src/pac/stm32l4r5qi.rs index 9f7c5e88c..0fad849dd 100644 --- a/embassy-stm32/src/pac/stm32l4r5qi.rs +++ b/embassy-stm32/src/pac/stm32l4r5qi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r5vg.rs b/embassy-stm32/src/pac/stm32l4r5vg.rs index 9f7c5e88c..0fad849dd 100644 --- a/embassy-stm32/src/pac/stm32l4r5vg.rs +++ b/embassy-stm32/src/pac/stm32l4r5vg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r5vi.rs b/embassy-stm32/src/pac/stm32l4r5vi.rs index 9f7c5e88c..0fad849dd 100644 --- a/embassy-stm32/src/pac/stm32l4r5vi.rs +++ b/embassy-stm32/src/pac/stm32l4r5vi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r5zg.rs b/embassy-stm32/src/pac/stm32l4r5zg.rs index 9f7c5e88c..0fad849dd 100644 --- a/embassy-stm32/src/pac/stm32l4r5zg.rs +++ b/embassy-stm32/src/pac/stm32l4r5zg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r5zi.rs b/embassy-stm32/src/pac/stm32l4r5zi.rs index 9f7c5e88c..0fad849dd 100644 --- a/embassy-stm32/src/pac/stm32l4r5zi.rs +++ b/embassy-stm32/src/pac/stm32l4r5zi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r7ai.rs b/embassy-stm32/src/pac/stm32l4r7ai.rs index ae6fb4c47..4bc279c43 100644 --- a/embassy-stm32/src/pac/stm32l4r7ai.rs +++ b/embassy-stm32/src/pac/stm32l4r7ai.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r7vi.rs b/embassy-stm32/src/pac/stm32l4r7vi.rs index ae6fb4c47..4bc279c43 100644 --- a/embassy-stm32/src/pac/stm32l4r7vi.rs +++ b/embassy-stm32/src/pac/stm32l4r7vi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r7zi.rs b/embassy-stm32/src/pac/stm32l4r7zi.rs index ae6fb4c47..4bc279c43 100644 --- a/embassy-stm32/src/pac/stm32l4r7zi.rs +++ b/embassy-stm32/src/pac/stm32l4r7zi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r9ag.rs b/embassy-stm32/src/pac/stm32l4r9ag.rs index 6bf045d21..2a0a52d40 100644 --- a/embassy-stm32/src/pac/stm32l4r9ag.rs +++ b/embassy-stm32/src/pac/stm32l4r9ag.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r9ai.rs b/embassy-stm32/src/pac/stm32l4r9ai.rs index 6bf045d21..2a0a52d40 100644 --- a/embassy-stm32/src/pac/stm32l4r9ai.rs +++ b/embassy-stm32/src/pac/stm32l4r9ai.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r9vg.rs b/embassy-stm32/src/pac/stm32l4r9vg.rs index 6bf045d21..2a0a52d40 100644 --- a/embassy-stm32/src/pac/stm32l4r9vg.rs +++ b/embassy-stm32/src/pac/stm32l4r9vg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r9vi.rs b/embassy-stm32/src/pac/stm32l4r9vi.rs index 6bf045d21..2a0a52d40 100644 --- a/embassy-stm32/src/pac/stm32l4r9vi.rs +++ b/embassy-stm32/src/pac/stm32l4r9vi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r9zg.rs b/embassy-stm32/src/pac/stm32l4r9zg.rs index 6bf045d21..2a0a52d40 100644 --- a/embassy-stm32/src/pac/stm32l4r9zg.rs +++ b/embassy-stm32/src/pac/stm32l4r9zg.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4r9zi.rs b/embassy-stm32/src/pac/stm32l4r9zi.rs index 6bf045d21..2a0a52d40 100644 --- a/embassy-stm32/src/pac/stm32l4r9zi.rs +++ b/embassy-stm32/src/pac/stm32l4r9zi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4s5ai.rs b/embassy-stm32/src/pac/stm32l4s5ai.rs index ef21a80f6..81671a5d0 100644 --- a/embassy-stm32/src/pac/stm32l4s5ai.rs +++ b/embassy-stm32/src/pac/stm32l4s5ai.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4s5qi.rs b/embassy-stm32/src/pac/stm32l4s5qi.rs index ef21a80f6..81671a5d0 100644 --- a/embassy-stm32/src/pac/stm32l4s5qi.rs +++ b/embassy-stm32/src/pac/stm32l4s5qi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4s5vi.rs b/embassy-stm32/src/pac/stm32l4s5vi.rs index ef21a80f6..81671a5d0 100644 --- a/embassy-stm32/src/pac/stm32l4s5vi.rs +++ b/embassy-stm32/src/pac/stm32l4s5vi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4s5zi.rs b/embassy-stm32/src/pac/stm32l4s5zi.rs index ef21a80f6..81671a5d0 100644 --- a/embassy-stm32/src/pac/stm32l4s5zi.rs +++ b/embassy-stm32/src/pac/stm32l4s5zi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4s7ai.rs b/embassy-stm32/src/pac/stm32l4s7ai.rs index 6c5276077..402b2cadf 100644 --- a/embassy-stm32/src/pac/stm32l4s7ai.rs +++ b/embassy-stm32/src/pac/stm32l4s7ai.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4s7vi.rs b/embassy-stm32/src/pac/stm32l4s7vi.rs index 6c5276077..402b2cadf 100644 --- a/embassy-stm32/src/pac/stm32l4s7vi.rs +++ b/embassy-stm32/src/pac/stm32l4s7vi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4s7zi.rs b/embassy-stm32/src/pac/stm32l4s7zi.rs index 6c5276077..402b2cadf 100644 --- a/embassy-stm32/src/pac/stm32l4s7zi.rs +++ b/embassy-stm32/src/pac/stm32l4s7zi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4s9ai.rs b/embassy-stm32/src/pac/stm32l4s9ai.rs index 3694825e0..ccabd113d 100644 --- a/embassy-stm32/src/pac/stm32l4s9ai.rs +++ b/embassy-stm32/src/pac/stm32l4s9ai.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4s9vi.rs b/embassy-stm32/src/pac/stm32l4s9vi.rs index 3694825e0..ccabd113d 100644 --- a/embassy-stm32/src/pac/stm32l4s9vi.rs +++ b/embassy-stm32/src/pac/stm32l4s9vi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/pac/stm32l4s9zi.rs b/embassy-stm32/src/pac/stm32l4s9zi.rs index 3694825e0..ccabd113d 100644 --- a/embassy-stm32/src/pac/stm32l4s9zi.rs +++ b/embassy-stm32/src/pac/stm32l4s9zi.rs | |||
| @@ -178,7 +178,7 @@ impl_gpio_pin!(PI13, 8, 13, EXTI13); | |||
| 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); | 178 | impl_gpio_pin!(PI14, 8, 14, EXTI14); |
| 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); | 179 | impl_gpio_pin!(PI15, 8, 15, EXTI15); |
| 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); | 180 | pub const RNG: rng::Rng = rng::Rng(0x50060800 as _); |
| 181 | impl_rng!(RNG); | 181 | impl_rng!(RNG, RNG); |
| 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); | 182 | pub const SPI1: spi::Spi = spi::Spi(0x40013000 as _); |
| 183 | impl_spi!(SPI1, APB2); | 183 | impl_spi!(SPI1, APB2); |
| 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); | 184 | impl_spi_pin!(SPI1, Sck, PA1, 5); |
diff --git a/embassy-stm32/src/rng.rs b/embassy-stm32/src/rng.rs index af527cd53..672a8f624 100644 --- a/embassy-stm32/src/rng.rs +++ b/embassy-stm32/src/rng.rs | |||
| @@ -9,19 +9,10 @@ use embassy_extras::unborrow; | |||
| 9 | use futures::future::poll_fn; | 9 | use futures::future::poll_fn; |
| 10 | use rand_core::{CryptoRng, RngCore}; | 10 | use rand_core::{CryptoRng, RngCore}; |
| 11 | 11 | ||
| 12 | use crate::interrupt; | 12 | //Guse crate::interrupt; |
| 13 | use crate::pac; | 13 | use crate::pac; |
| 14 | 14 | ||
| 15 | static RNG_WAKER: AtomicWaker = AtomicWaker::new(); | 15 | pub(crate) static RNG_WAKER: AtomicWaker = AtomicWaker::new(); |
| 16 | |||
| 17 | #[interrupt] | ||
| 18 | unsafe fn RNG() { | ||
| 19 | let bits = crate::pac::RNG.sr().read(); | ||
| 20 | if bits.drdy() || bits.seis() || bits.ceis() { | ||
| 21 | crate::pac::RNG.cr().write(|reg| reg.set_ie(false)); | ||
| 22 | RNG_WAKER.wake(); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | 16 | ||
| 26 | pub struct Random<T: Instance> { | 17 | pub struct Random<T: Instance> { |
| 27 | inner: T, | 18 | inner: T, |
| @@ -146,7 +137,7 @@ pub(crate) mod sealed { | |||
| 146 | pub trait Instance: sealed::Instance {} | 137 | pub trait Instance: sealed::Instance {} |
| 147 | 138 | ||
| 148 | macro_rules! impl_rng { | 139 | macro_rules! impl_rng { |
| 149 | ($inst:ident) => { | 140 | ($inst:ident, $irq:ident) => { |
| 150 | impl crate::rng::sealed::Instance for peripherals::RNG { | 141 | impl crate::rng::sealed::Instance for peripherals::RNG { |
| 151 | fn regs() -> crate::pac::chip::rng::Rng { | 142 | fn regs() -> crate::pac::chip::rng::Rng { |
| 152 | crate::pac::RNG | 143 | crate::pac::RNG |
| @@ -154,5 +145,14 @@ macro_rules! impl_rng { | |||
| 154 | } | 145 | } |
| 155 | 146 | ||
| 156 | impl crate::rng::Instance for peripherals::RNG {} | 147 | impl crate::rng::Instance for peripherals::RNG {} |
| 148 | |||
| 149 | #[$crate::interrupt] | ||
| 150 | unsafe fn $irq() { | ||
| 151 | let bits = $crate::pac::RNG.sr().read(); | ||
| 152 | if bits.drdy() || bits.seis() || bits.ceis() { | ||
| 153 | $crate::pac::RNG.cr().write(|reg| reg.set_ie(false)); | ||
| 154 | $crate::rng::RNG_WAKER.wake(); | ||
| 155 | } | ||
| 156 | } | ||
| 157 | }; | 157 | }; |
| 158 | } | 158 | } |
diff --git a/embassy-stm32/src/spi/mod.rs b/embassy-stm32/src/spi/mod.rs new file mode 100644 index 000000000..27f1be93d --- /dev/null +++ b/embassy-stm32/src/spi/mod.rs | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #![macro_use] | ||
| 2 | |||
| 3 | #[cfg_attr(feature = "_spi_v1", path = "spi_v1.rs")] | ||
| 4 | #[cfg_attr(feature = "_spi_v2", path = "spi_v2.rs")] | ||
| 5 | mod spi; | ||
| 6 | |||
| 7 | pub use spi::*; | ||
| 8 | |||
| 9 | // TODO move upwards in the tree | ||
| 10 | pub enum ByteOrder { | ||
| 11 | LsbFirst, | ||
| 12 | MsbFirst, | ||
| 13 | } | ||
| 14 | |||
| 15 | #[derive(Copy, Clone, PartialOrd, PartialEq)] | ||
| 16 | enum WordSize { | ||
| 17 | EightBit, | ||
| 18 | SixteenBit, | ||
| 19 | } | ||
| 20 | |||
| 21 | #[non_exhaustive] | ||
| 22 | pub struct Config { | ||
| 23 | pub mode: Mode, | ||
| 24 | pub byte_order: ByteOrder, | ||
| 25 | } | ||
| 26 | |||
| 27 | impl Default for Config { | ||
| 28 | fn default() -> Self { | ||
| 29 | Self { | ||
| 30 | mode: MODE_0, | ||
| 31 | byte_order: ByteOrder::MsbFirst, | ||
| 32 | } | ||
| 33 | } | ||
| 34 | } | ||
diff --git a/embassy-stm32/src/spi/spi_v1.rs b/embassy-stm32/src/spi/spi_v1.rs new file mode 100644 index 000000000..3ef096e42 --- /dev/null +++ b/embassy-stm32/src/spi/spi_v1.rs | |||
| @@ -0,0 +1,364 @@ | |||
| 1 | #![macro_use] | ||
| 2 | |||
| 3 | pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3}; | ||
| 4 | use core::marker::PhantomData; | ||
| 5 | use embassy::interrupt::Interrupt; | ||
| 6 | use embedded_hal::blocking::spi::{Write, Transfer}; | ||
| 7 | use embassy::util::Unborrow; | ||
| 8 | use embassy_extras::{impl_unborrow, unborrow}; | ||
| 9 | use crate::gpio::{Pin, AnyPin}; | ||
| 10 | use crate::pac::gpio::vals::{Afr, Moder}; | ||
| 11 | use crate::pac::spi; | ||
| 12 | use crate::pac::gpio::Gpio; | ||
| 13 | use crate::time::Hertz; | ||
| 14 | use crate::spi::{WordSize, Config, ByteOrder}; | ||
| 15 | |||
| 16 | impl WordSize { | ||
| 17 | fn dff(&self) -> spi::vals::Dff { | ||
| 18 | match self { | ||
| 19 | WordSize::EightBit => spi::vals::Dff::EIGHTBIT, | ||
| 20 | WordSize::SixteenBit => spi::vals::Dff::SIXTEENBIT, | ||
| 21 | } | ||
| 22 | } | ||
| 23 | } | ||
| 24 | |||
| 25 | pub struct Spi<'d, T: Instance> { | ||
| 26 | peri: T, | ||
| 27 | sck: AnyPin, | ||
| 28 | mosi: AnyPin, | ||
| 29 | miso: AnyPin, | ||
| 30 | current_word_size: WordSize, | ||
| 31 | phantom: PhantomData<&'d mut T>, | ||
| 32 | } | ||
| 33 | |||
| 34 | impl<'d, T: Instance> Spi<'d, T> { | ||
| 35 | pub fn new<F>(pclk: Hertz, | ||
| 36 | peri: impl Unborrow<Target=T> + 'd, | ||
| 37 | sck: impl Unborrow<Target=impl Sck<T>>, | ||
| 38 | mosi: impl Unborrow<Target=impl Mosi<T>>, | ||
| 39 | miso: impl Unborrow<Target=impl Miso<T>>, | ||
| 40 | freq: F, | ||
| 41 | config: Config, | ||
| 42 | ) -> Self | ||
| 43 | where | ||
| 44 | F: Into<Hertz> | ||
| 45 | { | ||
| 46 | unborrow!(peri); | ||
| 47 | unborrow!(sck, mosi, miso); | ||
| 48 | |||
| 49 | unsafe { | ||
| 50 | Self::configure_pin(sck.block(), sck.pin() as _, sck.af()); | ||
| 51 | Self::configure_pin(mosi.block(), mosi.pin() as _, mosi.af()); | ||
| 52 | Self::configure_pin(miso.block(), miso.pin() as _, miso.af()); | ||
| 53 | } | ||
| 54 | |||
| 55 | let sck = sck.degrade(); | ||
| 56 | let mosi = mosi.degrade(); | ||
| 57 | let miso = miso.degrade(); | ||
| 58 | |||
| 59 | unsafe { | ||
| 60 | T::regs().cr2() | ||
| 61 | .write(|w| { | ||
| 62 | w.set_ssoe(false); | ||
| 63 | }); | ||
| 64 | } | ||
| 65 | |||
| 66 | let br = Self::compute_baud_rate(pclk, freq.into()); | ||
| 67 | |||
| 68 | unsafe { | ||
| 69 | T::regs().cr1().write(|w| { | ||
| 70 | w.set_cpha( | ||
| 71 | match config.mode.phase == Phase::CaptureOnSecondTransition { | ||
| 72 | true => spi::vals::Cpha::SECONDEDGE, | ||
| 73 | false => spi::vals::Cpha::FIRSTEDGE, | ||
| 74 | } | ||
| 75 | ); | ||
| 76 | w.set_cpol(match config.mode.polarity == Polarity::IdleHigh { | ||
| 77 | true => spi::vals::Cpol::IDLEHIGH, | ||
| 78 | false => spi::vals::Cpol::IDLELOW, | ||
| 79 | }); | ||
| 80 | |||
| 81 | w.set_mstr(spi::vals::Mstr::MASTER); | ||
| 82 | w.set_br(spi::vals::Br(br)); | ||
| 83 | w.set_spe(true); | ||
| 84 | w.set_lsbfirst( | ||
| 85 | match config.byte_order { | ||
| 86 | ByteOrder::LsbFirst => spi::vals::Lsbfirst::LSBFIRST, | ||
| 87 | ByteOrder::MsbFirst => spi::vals::Lsbfirst::MSBFIRST, | ||
| 88 | } | ||
| 89 | ); | ||
| 90 | w.set_ssi(true); | ||
| 91 | w.set_ssm(true); | ||
| 92 | w.set_crcen(false); | ||
| 93 | w.set_bidimode(spi::vals::Bidimode::UNIDIRECTIONAL); | ||
| 94 | w.set_dff( WordSize::EightBit.dff() ) | ||
| 95 | }); | ||
| 96 | } | ||
| 97 | |||
| 98 | Self { | ||
| 99 | peri, | ||
| 100 | sck, | ||
| 101 | mosi, | ||
| 102 | miso, | ||
| 103 | current_word_size: WordSize::EightBit, | ||
| 104 | phantom: PhantomData, | ||
| 105 | } | ||
| 106 | } | ||
| 107 | |||
| 108 | unsafe fn configure_pin(block: Gpio, pin: usize, af_num: u8) { | ||
| 109 | let (afr, n_af) = if pin < 8 { (0, pin) } else { (1, pin - 8) }; | ||
| 110 | block.moder().modify(|w| w.set_moder(pin, Moder::ALTERNATE)); | ||
| 111 | block.afr(afr).modify(|w| w.set_afr(n_af, Afr(af_num))); | ||
| 112 | } | ||
| 113 | |||
| 114 | unsafe fn unconfigure_pin(block: Gpio, pin: usize) { | ||
| 115 | let (afr, n_af) = if pin < 8 { (0, pin) } else { (1, pin - 8) }; | ||
| 116 | block.moder().modify(|w| w.set_moder(pin, Moder::ANALOG)); | ||
| 117 | } | ||
| 118 | |||
| 119 | fn compute_baud_rate(clocks: Hertz, freq: Hertz) -> u8 { | ||
| 120 | match clocks.0 / freq.0 { | ||
| 121 | 0 => unreachable!(), | ||
| 122 | 1..=2 => 0b000, | ||
| 123 | 3..=5 => 0b001, | ||
| 124 | 6..=11 => 0b010, | ||
| 125 | 12..=23 => 0b011, | ||
| 126 | 24..=39 => 0b100, | ||
| 127 | 40..=95 => 0b101, | ||
| 128 | 96..=191 => 0b110, | ||
| 129 | _ => 0b111, | ||
| 130 | } | ||
| 131 | } | ||
| 132 | |||
| 133 | fn set_word_size(&mut self, word_size: WordSize) { | ||
| 134 | if self.current_word_size == word_size { | ||
| 135 | return | ||
| 136 | } | ||
| 137 | unsafe { | ||
| 138 | T::regs().cr1().modify( |reg| { | ||
| 139 | reg.set_spe(false); | ||
| 140 | reg.set_dff( word_size.dff() ) | ||
| 141 | }); | ||
| 142 | T::regs().cr1().modify( |reg| { | ||
| 143 | reg.set_spe(true); | ||
| 144 | }); | ||
| 145 | self.current_word_size = word_size; | ||
| 146 | } | ||
| 147 | } | ||
| 148 | } | ||
| 149 | |||
| 150 | impl<'d, T: Instance> Drop for Spi<'d, T> { | ||
| 151 | fn drop(&mut self) { | ||
| 152 | unsafe { | ||
| 153 | Self::unconfigure_pin(self.sck.block(), self.sck.pin() as _); | ||
| 154 | Self::unconfigure_pin(self.mosi.block(), self.mosi.pin() as _); | ||
| 155 | Self::unconfigure_pin(self.miso.block(), self.miso.pin() as _); | ||
| 156 | } | ||
| 157 | } | ||
| 158 | } | ||
| 159 | |||
| 160 | pub enum Error { | ||
| 161 | Framing, | ||
| 162 | Crc, | ||
| 163 | Overrun, | ||
| 164 | } | ||
| 165 | |||
| 166 | impl<'d, T: Instance> embedded_hal::blocking::spi::Write<u8> for Spi<'d, T> { | ||
| 167 | type Error = Error; | ||
| 168 | |||
| 169 | fn write(&mut self, words: &[u8]) -> Result<(), Self::Error> { | ||
| 170 | self.set_word_size(WordSize::EightBit); | ||
| 171 | let regs = T::regs(); | ||
| 172 | |||
| 173 | for word in words.iter() { | ||
| 174 | while unsafe { !regs.sr().read().txe() } { | ||
| 175 | // spin | ||
| 176 | } | ||
| 177 | unsafe { | ||
| 178 | regs.dr().write(|reg| reg.0 = *word as u32); | ||
| 179 | } | ||
| 180 | loop { | ||
| 181 | let sr = unsafe { regs.sr().read() }; | ||
| 182 | if sr.fre() { | ||
| 183 | return Err(Error::Framing); | ||
| 184 | } | ||
| 185 | if sr.ovr() { | ||
| 186 | return Err(Error::Overrun); | ||
| 187 | } | ||
| 188 | if sr.crcerr() { | ||
| 189 | return Err(Error::Crc); | ||
| 190 | } | ||
| 191 | if !sr.txe() { | ||
| 192 | // loop waiting for TXE | ||
| 193 | } | ||
| 194 | } | ||
| 195 | } | ||
| 196 | |||
| 197 | Ok(()) | ||
| 198 | } | ||
| 199 | } | ||
| 200 | |||
| 201 | impl<'d, T: Instance> embedded_hal::blocking::spi::Transfer<u8> for Spi<'d, T> { | ||
| 202 | type Error = Error; | ||
| 203 | |||
| 204 | fn transfer<'w>(&mut self, words: &'w mut [u8]) -> Result<&'w [u8], Self::Error> { | ||
| 205 | self.set_word_size(WordSize::EightBit); | ||
| 206 | let regs = T::regs(); | ||
| 207 | |||
| 208 | for word in words.iter_mut() { | ||
| 209 | while unsafe { !regs.sr().read().txe() } { | ||
| 210 | // spin | ||
| 211 | } | ||
| 212 | unsafe { | ||
| 213 | regs.dr().write(|reg| reg.0 = *word as u32); | ||
| 214 | } | ||
| 215 | while unsafe { !regs.sr().read().rxne() } { | ||
| 216 | // spin waiting for inbound to shift in. | ||
| 217 | } | ||
| 218 | *word = unsafe { regs.dr().read().0 as u8 }; | ||
| 219 | let sr = unsafe { regs.sr().read() }; | ||
| 220 | if sr.fre() { | ||
| 221 | return Err(Error::Framing); | ||
| 222 | } | ||
| 223 | if sr.ovr() { | ||
| 224 | return Err(Error::Overrun); | ||
| 225 | } | ||
| 226 | if sr.crcerr() { | ||
| 227 | return Err(Error::Crc); | ||
| 228 | } | ||
| 229 | } | ||
| 230 | |||
| 231 | Ok(words) | ||
| 232 | } | ||
| 233 | } | ||
| 234 | |||
| 235 | impl<'d, T: Instance> embedded_hal::blocking::spi::Write<u16> for Spi<'d, T> { | ||
| 236 | type Error = Error; | ||
| 237 | |||
| 238 | fn write(&mut self, words: &[u16]) -> Result<(), Self::Error> { | ||
| 239 | self.set_word_size(WordSize::SixteenBit); | ||
| 240 | let regs = T::regs(); | ||
| 241 | |||
| 242 | for word in words.iter() { | ||
| 243 | while unsafe { !regs.sr().read().txe() } { | ||
| 244 | // spin | ||
| 245 | } | ||
| 246 | unsafe { | ||
| 247 | regs.dr().write(|reg| reg.0 = *word as u32); | ||
| 248 | } | ||
| 249 | loop { | ||
| 250 | let sr = unsafe { regs.sr().read() }; | ||
| 251 | if sr.fre() { | ||
| 252 | return Err(Error::Framing); | ||
| 253 | } | ||
| 254 | if sr.ovr() { | ||
| 255 | return Err(Error::Overrun); | ||
| 256 | } | ||
| 257 | if sr.crcerr() { | ||
| 258 | return Err(Error::Crc); | ||
| 259 | } | ||
| 260 | if !sr.txe() { | ||
| 261 | // loop waiting for TXE | ||
| 262 | } | ||
| 263 | } | ||
| 264 | } | ||
| 265 | |||
| 266 | Ok(()) | ||
| 267 | } | ||
| 268 | } | ||
| 269 | |||
| 270 | impl<'d, T: Instance> embedded_hal::blocking::spi::Transfer<u16> for Spi<'d, T> { | ||
| 271 | type Error = Error; | ||
| 272 | |||
| 273 | fn transfer<'w>(&mut self, words: &'w mut [u16]) -> Result<&'w [u16], Self::Error> { | ||
| 274 | self.set_word_size(WordSize::SixteenBit); | ||
| 275 | let regs = T::regs(); | ||
| 276 | |||
| 277 | for word in words.iter_mut() { | ||
| 278 | while unsafe { !regs.sr().read().txe() } { | ||
| 279 | // spin | ||
| 280 | } | ||
| 281 | unsafe { | ||
| 282 | regs.dr().write(|reg| reg.0 = *word as u32); | ||
| 283 | } | ||
| 284 | while unsafe { !regs.sr().read().rxne() } { | ||
| 285 | // spin waiting for inbound to shift in. | ||
| 286 | } | ||
| 287 | *word = unsafe { regs.dr().read().0 as u16 }; | ||
| 288 | let sr = unsafe { regs.sr().read() }; | ||
| 289 | if sr.fre() { | ||
| 290 | return Err(Error::Framing); | ||
| 291 | } | ||
| 292 | if sr.ovr() { | ||
| 293 | return Err(Error::Overrun); | ||
| 294 | } | ||
| 295 | if sr.crcerr() { | ||
| 296 | return Err(Error::Crc); | ||
| 297 | } | ||
| 298 | } | ||
| 299 | |||
| 300 | Ok(words) | ||
| 301 | } | ||
| 302 | } | ||
| 303 | |||
| 304 | |||
| 305 | pub(crate) mod sealed { | ||
| 306 | use super::*; | ||
| 307 | use embassy::util::AtomicWaker; | ||
| 308 | |||
| 309 | pub trait Instance { | ||
| 310 | fn regs() -> &'static spi::Spi; | ||
| 311 | } | ||
| 312 | |||
| 313 | pub trait Sck<T: Instance>: Pin { | ||
| 314 | const AF: u8; | ||
| 315 | fn af(&self) -> u8 { | ||
| 316 | Self::AF | ||
| 317 | } | ||
| 318 | } | ||
| 319 | |||
| 320 | pub trait Mosi<T: Instance>: Pin { | ||
| 321 | const AF: u8; | ||
| 322 | fn af(&self) -> u8 { | ||
| 323 | Self::AF | ||
| 324 | } | ||
| 325 | } | ||
| 326 | |||
| 327 | pub trait Miso<T: Instance>: Pin { | ||
| 328 | const AF: u8; | ||
| 329 | fn af(&self) -> u8 { | ||
| 330 | Self::AF | ||
| 331 | } | ||
| 332 | } | ||
| 333 | } | ||
| 334 | |||
| 335 | pub trait Instance: sealed::Instance + 'static {} | ||
| 336 | |||
| 337 | pub trait Sck<T: Instance>: sealed::Sck<T> + 'static {} | ||
| 338 | |||
| 339 | pub trait Mosi<T: Instance>: sealed::Mosi<T> + 'static {} | ||
| 340 | |||
| 341 | pub trait Miso<T: Instance>: sealed::Miso<T> + 'static {} | ||
| 342 | |||
| 343 | macro_rules! impl_spi { | ||
| 344 | ($inst:ident, $clk:ident) => { | ||
| 345 | impl crate::spi::sealed::Instance for peripherals::$inst { | ||
| 346 | fn regs() -> &'static crate::pac::spi::Spi { | ||
| 347 | &crate::pac::$inst | ||
| 348 | } | ||
| 349 | } | ||
| 350 | |||
| 351 | impl crate::spi::Instance for peripherals::$inst {} | ||
| 352 | }; | ||
| 353 | } | ||
| 354 | |||
| 355 | macro_rules! impl_spi_pin { | ||
| 356 | ($inst:ident, $pin_func:ident, $pin:ident, $af:expr) => { | ||
| 357 | impl crate::spi::$pin_func<peripherals::$inst> for peripherals::$pin { | ||
| 358 | } | ||
| 359 | |||
| 360 | impl crate::spi::sealed::$pin_func<peripherals::$inst> for peripherals::$pin { | ||
| 361 | const AF: u8 = $af; | ||
| 362 | } | ||
| 363 | } | ||
| 364 | } \ No newline at end of file | ||
diff --git a/embassy-stm32/src/spi.rs b/embassy-stm32/src/spi/spi_v2.rs index 40944d74c..48370c84e 100644 --- a/embassy-stm32/src/spi.rs +++ b/embassy-stm32/src/spi/spi_v2.rs | |||
| @@ -11,33 +11,7 @@ use crate::pac::gpio::vals::{Afr, Moder}; | |||
| 11 | use crate::pac::spi; | 11 | use crate::pac::spi; |
| 12 | use crate::pac::gpio::Gpio; | 12 | use crate::pac::gpio::Gpio; |
| 13 | use crate::time::Hertz; | 13 | use crate::time::Hertz; |
| 14 | use term::terminfo::parm::Param::Words; | 14 | use crate::spi::{WordSize, Config, ByteOrder}; |
| 15 | |||
| 16 | #[non_exhaustive] | ||
| 17 | pub struct Config { | ||
| 18 | pub mode: Mode, | ||
| 19 | pub byte_order: ByteOrder, | ||
| 20 | } | ||
| 21 | |||
| 22 | impl Default for Config { | ||
| 23 | fn default() -> Self { | ||
| 24 | Self { | ||
| 25 | mode: MODE_0, | ||
| 26 | byte_order: ByteOrder::MsbFirst, | ||
| 27 | } | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | // TODO move upwards in the tree | ||
| 32 | pub enum ByteOrder { | ||
| 33 | LsbFirst, | ||
| 34 | MsbFirst, | ||
| 35 | } | ||
| 36 | |||
| 37 | enum WordSize { | ||
| 38 | EightBit, | ||
| 39 | SixteenBit, | ||
| 40 | } | ||
| 41 | 15 | ||
| 42 | impl WordSize { | 16 | impl WordSize { |
| 43 | fn ds(&self) -> spi::vals::Ds { | 17 | fn ds(&self) -> spi::vals::Ds { |
| @@ -125,7 +99,6 @@ impl<'d, T: Instance> Spi<'d, T> { | |||
| 125 | w.set_crcen(false); | 99 | w.set_crcen(false); |
| 126 | w.set_bidimode(spi::vals::Bidimode::UNIDIRECTIONAL); | 100 | w.set_bidimode(spi::vals::Bidimode::UNIDIRECTIONAL); |
| 127 | }); | 101 | }); |
| 128 | T::regs().cr2().write(|w| {}) | ||
| 129 | } | 102 | } |
| 130 | 103 | ||
| 131 | Self { | 104 | Self { |
